Page 1 of 1

Two versions run

Posted: 2010-07-08T06:12:18-07:00
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.

Re: Two versions run

Posted: 2010-07-08T07:34:33-07:00
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>";
?> 

Re: Two versions run

Posted: 2010-07-08T08:38:54-07:00
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