Page 1 of 1

Can't exec convert through exec() in php

Posted: 2010-03-26T08:01:18-07:00
by sebtucknott
Hi Guys,

Really pulling my hair out with this one...

Tried to upgrade my imagemagick from 6.5.5 to 6.6.0 (wish I hadn't bothered now!) and now when I try to run convert through php using exec() I get the following;

Version return code is 127
Array ( [0] => convert: error while loading shared libraries: libMagick.so.10: cannot open shared object file: No such file or directory )

I have tried uninstalling and reinstalling both versions. I am now back to 6.5.5 however still doesn't work.

If I do;

[root@]# convert -version
Version: ImageMagick 6.5.6-6 2010-03-26 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

So imagemagick is working and I can convert images through the command line.

Can anyone please help!

Thanks,

Seb

Re: Can't exec convert through exec() in php

Posted: 2010-03-26T10:15:48-07:00
by Bonzo
I had a similar problem and here is the thread: viewtopic.php?f=1&t=15702

The first 2 lines of code posted by snibgo worked but the second did not.

Re: Can't exec convert through exec() in php

Posted: 2010-03-26T10:23:54-07:00
by sebtucknott
Fixed the problem...

The new version seemed to install in /usr/local/bin rather than /usr/bin like it was before. When calling it from command doesn't seem to make a difference but from exec() you have to use /usr/local/bin

Well I hope this post helps someone else because I was stuck with it for about 6 hours!

Thanks,

Seb