Two versions run

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
lsteamgeo

Two versions run

Post by lsteamgeo »

Hi,

I have a problem. I feel like I have two versions of ImageMagick which runs on the server.

When I do a "convert --version" with SSH i've the following response:

Code: Select all

Version: ImageMagick 6.6.3-0 Q16 http://www.imagemagick.org 2010-07-08
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP
When I do a "convert --version" with an exec() in php I have the following response:

Code: Select all

Version:ImageMagick 6.2.8 04/17/08 Q16 file: / usr/share/ImageMagick-6.2.8/doc/index.html
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC
I resize the images with an exec in PHP so I have the black background.

How can I ask PHP to use the latest version of ImageMagick is installed.

I'm on CentOS with cpanel
Thank you.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Two versions run

Post by Bonzo »

You would have been better posting this in the user section of the forum.

You might get away with using more than convert e.g. /usr/local/bin/convert Try running this and see what path you get and try that:

Code: Select all

<?php
echo "<pre>";
system("type convert"); 
echo "</pre>";
?> 
lsteamgeo

Re: Two versions run

Post by lsteamgeo »

Thanks you Bonzo,

When I do :

Code: Select all

<?php
echo "<pre>";
system("type convert");
echo "</pre>";
?> 
I've this response :

Code: Select all

convert is /usr/bin/convert
/usr/bin/convert is the old version 6.2.8. How i can change with the new installed version ?

Thanks
Post Reply