想象一下Mac上的xampp:无法获得image.so使用

having overcome all the hurdles (there were a few for me) of installing Image Magick, of installing and compiling imagick on XAMPP, I have the feeling that I am almost there but I cannot manage to have the extension working in apache.

The last things that I did were:

  • downloading imagick from XAMPP with pecl
  • unpacking it, editing the config.m4 file to have it find the Wand, cding to the root of the folder, running phpize, then ./configure, then make, then sudo make install, which output this Installing shared extensions: /usr/lib/php/extensions/no-debug-non-zts-20090626/ Installing header files: /usr/include/php/
  • then copying this imagick.so file to /Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions
  • then restarting Apache to see that imagick didn't seem to be installed, as it wasn't mentionned in phpinfo

So after searching around, I tried also to copy imagick.so into the no-debug-non-zts-20090626 folder, also located in the /Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions folder and in which I noticed a few .so files.

Restarted Apache, still no sign of imagick in the output phpinfo()

I then googled further, and found a tutorial mentioning that the php.ini file had to be edited as to be aware of the extension. So I added extension=imagick.so in the php.ini file (located in /Applications/XAMPP/xamppfiles/etc), at the appropriate place, just right after extension=imap.so. Again, restarted Apache, checked my phpinfo, no imagick.

I am quite frustrated as I got the feeling that I am soooo close to be there, but honestly I really don't know what I have to do know. So I would be more than thankful for any advice, help or idea, what I need to do next.

Cheers

Check the PHP errror log, it might be that it requires a higher version of libfreetype.6 than your apache server is using.

If so you might be able to copy the one X11 is using to the apache dir. Don't forget to backup your current version of libfreetype.6