After installing Drush 5.5 I got the following error when running drush:

finfo::finfo(): Failed to load magic database at '/usr/share/misc/magic'. drush.inc:909 [warning]
finfo::file(): The invalid fileinfo object. drush.inc:911 [warning]
string(2) "#"
array(1) {
[1]=>
int(35615)
}
finfo::finfo(): Failed to load magic database at '/usr/share/misc/magic'. drush.inc:909 [warning]
finfo::file(): The invalid fileinfo object. drush.inc:911 [warning]
string(2) "#"
array(1) {
[1]=>
int(35615)
}

OS: Centos 5.8
PHP: 5.2

The '/usr/share/misc/magic' file can be opened by the current user.

Comments

jonhattan’s picture

I was able to reproduce this with php 5.2 and pecl's fileinfo.

You get the warning but drush is working, right?

Patch in #1721334-6: Unable to extract /usr/local/lib/php/drush/lib/drush-library-x. Unknown archive format. get rid of the warning messages.

joostvdl’s picture

Correct. Drush is working correct.

Joel MMCC’s picture

Just so you know, this bit of your output:

string(2) "#"
array(1) {
[1]=>
int(35615)
} 

is actually caused by this fixed Issue:
#1721304: Debug strings displayed while running pm-update since upgrade to 5.5.

Basically, a couple of debugging “var_dump(…);” lines remained present in the uploaded version of includes/drush.inc around lines 929 (“…” = “$first”) and 938 (“…” = “$data”). Simply comment out or delete those lines if you don’t want to have to re-download the fixed master.

jonhattan’s picture

Status: Active » Fixed

Let's mark as fixed as the patch in the other issue will be committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.