PHP PECL Extension Installation Failure

John P john at
Wed Nov 28 16:18:37 PST 2007

Thanks Bjarne.  I got it working finally!

I followed your suggestion using the instructions at  and did the following:

   pecl download fileinfo
   tar xvzf Fileinfo-1.0.4.tgz
   cd Fileinfo-1.0.4
   ./configure --with-fileinfo=/opt/local
   make install

This creates the extension file

Edit php.ini to load the dynamic extension from where ever the
file is located by adding the following line:
   extension=<path to>

Restart of apache and it all appears to work.

Thanks again.  Really appreciate it.


Bjarne D Mathiesen wrote:
> 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:
> phpize
> ./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ø
> _______________________________________________
> macports-users mailing list
> macports-users at

View this message in context:
Sent from the MacPorts - Users mailing list archive at

More information about the macports-users mailing list