Page 1 of 1

How do I make /usr/local/bin/convert become 'convert'?

Posted: 2009-07-30T05:14:39-07:00
by SEO
Dear ImageMagick experts,

I was wondering how I can setup my Unix webserver (Cent OS) to enable access to the convert command without providing the full path /usr/local/bin/ in PHP exec("..."); commands.

Best Regards,
SEO

Re: How do I make /usr/local/bin/convert become 'convert'?

Posted: 2009-08-03T00:19:47-07:00
by anthony
Add /usr/local/bin to the PATH environment variable!!!!

You may also need similar LD_LIBRARY_PATH changed too so it can find the libraries it needs.

Also watch out for delegate paths such a to ghostscript ('gs').

Re: How do I make /usr/local/bin/convert become 'convert'?

Posted: 2009-08-06T20:09:54-07:00
by anthony
See the update in PHP with command line API
http://www.imagemagick.org/Usage/api/#php

You can also set teh path BEFORE the webserver starts, or code it into the system "php.ini" file, however this requires system root access.