You are here: Re: Imagemagick and php « PHP Programming Language « IT news, forums, messages
Re: Imagemagick and php

Posted by Andy Hassall on 01/09/07 21:50

On 8 Jan 2007 22:02:45 -0800, "eholz1" <ewholz@gmail.com> wrote:

>Libraries have been installed in:
> /files/PHP/php-5.2.0/ext/magickwand/modules
>how to I tell php where to find them???

That's a slightly odd location for the ImageMagick libraries? That's where the
magickwand extension might end up though.

>And here is the error message I get
>(I have attempted to export the LD_LIBRARY_PATH, no guarantee I did it
>correctly!)
>
>ext/magickwand/.libs/magickwand.o: In function
>`zif_magickrecolorimage':
>/files/PHP/php-5.2.0/ext/magickwand/magickwand.c:7763: undefined
>reference to `MagickRecolorImage'
>collect2: ld returned 1 exit status
>make: *** [sapi/cli/php] Error 1
>
>Above is the error I get.

Here's what I did (I've copied these from my shell history - I'm not running
them again as this is on my severely ancient Linux server and it takes ages!)

(1) Compile and install ImageMagick. I put it in /usr, you may well have it
somewhere else, or perhaps you've installed it from an RPM.

wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
tar zxvf ImageMagick.tar.gz.1
cd ImageMagick-6.3.1/
../configure --prefix=/usr
make
make install

(2) Compile and install MagickWand PHP extension. I didn't follow the
instructions in the INSTALL file as I didn't want to rebuild PHP entirely and
static link it in; instead I've built a shared module.

wget http://www.magickwand.org/download/php/magickwand-0.1.9.tar.bz2
tar jxvf magickwand-0.1.9.tar.bz2
cd magickwand
phpize
../configure --with-magickwand=shared,/usr
make
make install

The directory after the comma in configure might be the key to you getting it
working.

(3) Add an extension= to php.ini, stop'n'start Apache and look in the output of
phpinfo() - magickwand is loaded. Or:

$ php -m | grep magick
magickwand

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация