PHP PECL Extension Installation Failure

Bjarne D Mathiesen macintosh at
Wed Nov 28 08:56:22 PST 2007

John P wrote:
> I've come to a dead end on this one.  Think I'll have to resort to Linux on a
> virtual machine.

What's the libmagic library that the PHP PECL extension tries to bind to
? (

The magic.h you've found in /opt/local seems to belong to the
ImageMagick package (port provides /opt/local/includes/magick/magic.h)

There's a libmagic project
( but that
doesn't seem to be available from macports.

I've been able to get as far as you by going another way: following the
instructions here -
and modifying the config.m4 file in the distribution.

That means using:
pecl download fileinfo
tar -xf Fileinfo-1.0.4

My modifications to config.m4 consists of modifying one of the if
sentences - to be more specific, the statement in line 9:
if test -r $PHP_FILEINFO/includes/magick/magic.h

in line 33, I've been experimenting with diffent names for the LIBNAME
without success

After my modifications to config.m4, I executed:
./configure --with-fileinfo=/opt/local

Following this route will also give you the config.log file you've been
uable to find (

After eache change to config.m4 you'll have to do a
phpize --clean
before trying again.

I'm hoping this is of help to you :-)

Bjarne D Mathiesen
København N ; Danmark ; Europa
denne besked er skrevet i et totalt M$-frit miljø

More information about the macports-users mailing list