By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,241 Members | 733 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,241 IT Pros & Developers. It's quick & easy.

Imagemagick and php

P: n/a
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

Jan 7 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On 7 Jan 2007 15:07:08 -0800, "eholz1" <ew****@gmail.comwrote:
>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 :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jan 8 '07 #2

P: n/a
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:
On 7 Jan 2007 15:07:08 -0800, "eholz1" <ew****@gmail.comwrote:
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 :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jan 9 '07 #3

P: n/a
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:
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:
On 7 Jan 2007 15:07:08 -0800, "eholz1" <ew****@gmail.comwrote:
>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 :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jan 9 '07 #4

P: n/a
On 8 Jan 2007 22:02:45 -0800, "eholz1" <ew****@gmail.comwrote:
>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/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 :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jan 9 '07 #5

P: n/a
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:
On 8 Jan 2007 22:02:45 -0800, "eholz1" <ew****@gmail.comwrote:
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/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 :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jan 10 '07 #6

P: n/a
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:
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:
On 8 Jan 2007 22:02:45 -0800, "eholz1" <ew****@gmail.comwrote:
>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/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 :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jan 10 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.