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

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
SEO

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

Post 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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post 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').
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply