Connecting Tech Pros Worldwide Forums | Help | Site Map

Imagemagick and php

eholz1
Guest
 
Posts: n/a
#1: Jan 7 '07
Hello Users,

I am not sure if this is the place to post an imagemagick question -
please advise.
I have imagemagick 6.3 installed, runs from command line ok, etc.

I have tried (several times now) to install the "MagicWand" PHP api
from the imagemagik site.

This flatly refused to "make" configure seems ok, I follow the
directions provided from the Imagemagick "INSTALL" file that comes in
the source tar.gz file (0-1.9)

I always get this error when I try to do the "make" for php after the
../configure (with a whole bunch of options (pdo, gc, zlib, etc)

error:
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

the /files/PHP etc if the path to my php source.

Any one seen this error before??

eholz1


Andy Hassall
Guest
 
Posts: n/a
#2: Jan 8 '07

re: Imagemagick and php


On 7 Jan 2007 15:07:08 -0800, "eholz1" <ewholz@gmail.comwrote:
Quote:
>Hello Users,
>
>I am not sure if this is the place to post an imagemagick question -
>please advise.
>I have imagemagick 6.3 installed, runs from command line ok, etc.
>
>I have tried (several times now) to install the "MagicWand" PHP api
>from the imagemagik site.
>
>This flatly refused to "make" configure seems ok, I follow the
>directions provided from the Imagemagick "INSTALL" file that comes in
>the source tar.gz file (0-1.9)
>
>I always get this error when I try to do the "make" for php after the
>./configure (with a whole bunch of options (pdo, gc, zlib, etc)
>
>error:
>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
>
>the /files/PHP etc if the path to my php source.
>
>Any one seen this error before??
I just compiled up ImageMagick and MagickWand and it went smoothly. Where did
you install the ImageMagick libraries - it seems that your linker can't find
them when it's building MagickWand.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
eholz1
Guest
 
Posts: n/a
#3: Jan 9 '07

re: Imagemagick and php


here is where imagemagick put the libraries:

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

tnx,

eholz1

Andy Hassall wrote:
Quote:
On 7 Jan 2007 15:07:08 -0800, "eholz1" <ewholz@gmail.comwrote:
>
Quote:
Hello Users,

I am not sure if this is the place to post an imagemagick question -
please advise.
I have imagemagick 6.3 installed, runs from command line ok, etc.

I have tried (several times now) to install the "MagicWand" PHP api
from the imagemagik site.

This flatly refused to "make" configure seems ok, I follow the
directions provided from the Imagemagick "INSTALL" file that comes in
the source tar.gz file (0-1.9)

I always get this error when I try to do the "make" for php after the
./configure (with a whole bunch of options (pdo, gc, zlib, etc)

error:
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

the /files/PHP etc if the path to my php source.

Any one seen this error before??
>
I just compiled up ImageMagick and MagickWand and it went smoothly. Where did
you install the ImageMagick libraries - it seems that your linker can't find
them when it's building MagickWand.
>
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
eholz1
Guest
 
Posts: n/a
#4: Jan 9 '07

re: Imagemagick and php


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.

Thanks again,

eholz1


eholz1 wrote:
Quote:
here is where imagemagick put the libraries:
>
Libraries have been installed in:
/files/PHP/php-5.2.0/ext/magickwand/modules
how to I tell php where to find them???
>
tnx,
>
eholz1
>
Andy Hassall wrote:
Quote:
On 7 Jan 2007 15:07:08 -0800, "eholz1" <ewholz@gmail.comwrote:
Quote:
>Hello Users,
>
>I am not sure if this is the place to post an imagemagick question -
>please advise.
>I have imagemagick 6.3 installed, runs from command line ok, etc.
>
>I have tried (several times now) to install the "MagicWand" PHP api
>from the imagemagik site.
>
>This flatly refused to "make" configure seems ok, I follow the
>directions provided from the Imagemagick "INSTALL" file that comes in
>the source tar.gz file (0-1.9)
>
>I always get this error when I try to do the "make" for php after the
>./configure (with a whole bunch of options (pdo, gc, zlib, etc)
>
>error:
>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
>
>the /files/PHP etc if the path to my php source.
>
>Any one seen this error before??
I just compiled up ImageMagick and MagickWand and it went smoothly. Where did
you install the ImageMagick libraries - it seems that your linker can't find
them when it's building MagickWand.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Andy Hassall
Guest
 
Posts: n/a
#5: Jan 9 '07

re: Imagemagick and php


On 8 Jan 2007 22:02:45 -0800, "eholz1" <ewholz@gmail.comwrote:
Quote:
>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.
Quote:
>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/ImageM...eMagick.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/p...-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
eholz1
Guest
 
Posts: n/a
#6: Jan 10 '07

re: Imagemagick and php


Thanks Andy,

It seems I have other problems as well - PHP is reading a php.ini file,
but not the one I think it is supposed to be reading! I will see if
there is another file hiding!!!

Thanks,

eric
Your step by step is good. I also need to find out how to reset my
LD_LIBRARY_PATH env variable, I exported the wrong one


Andy Hassall wrote:
Quote:
On 8 Jan 2007 22:02:45 -0800, "eholz1" <ewholz@gmail.comwrote:
>
Quote:
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.
>
Quote:
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/ImageM...eMagick.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/p...-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
eholz1
Guest
 
Posts: n/a
#7: Jan 10 '07

re: Imagemagick and php


Success At last!

Hello Andy (do you know you have over 2300 posts in this group!!!)!

I followed your set up suggestions - I am not quite sure what actually
worked, but
I ended up rebuilding php, and added the --with-magickwand=/usr/local
option and
the configure and make actually ran without errors (my box may be
faster than yours, it is a rompin-stomping 700mhz PIII!). I did a make
install, and fired up apache and php, and
the phpinfo() showed the magickwand stuff - the old demo.php page for
MagickWand works.
Now all i have to do is figure out how to use it!!!

Thanks for the tips

eholz1


eholz1 wrote:
Quote:
Thanks Andy,
>
It seems I have other problems as well - PHP is reading a php.ini file,
but not the one I think it is supposed to be reading! I will see if
there is another file hiding!!!
>
Thanks,
>
eric
Your step by step is good. I also need to find out how to reset my
LD_LIBRARY_PATH env variable, I exported the wrong one
>
>
Andy Hassall wrote:
Quote:
On 8 Jan 2007 22:02:45 -0800, "eholz1" <ewholz@gmail.comwrote:
Quote:
>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.
Quote:
>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/ImageM...eMagick.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/p...-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
Closed Thread