Why can't ImageMagick be run from a script?

Category: Image Editing

jdgrimes
Asked:
2013-01-24 4:12 pm EST

Hits: 558
I am on a shared server, and would like to use ImageMagick to convert an SVG file to a jpeg image, but I have found that I can't run ImageMagick from within a PHP script. According to this page, it can only be run from the command line, or, on a shared server by using exec() or a cron job:

http://www.inmotionhosting.com/support/website/general-server-setup/is-imagemagick-installed-on-the-servers


1) Why aren't the API's installed?
2) Is it possible to install them? Or is using exec() or a cron job really my only option?

You must login before you can ask a follow up question.

You must login before you can submit an answer.

Best answer chosen by User

0

Arn
Staff
15,484 Points
2013-01-24 4:53 pm EST
Hello Jdgrimes,

The API's for Imagemagick ARE installed- as per the article you listed, Imagemagick is MOGRIFY and CONVERT. That article gives you the commands that you need to use. I had a systems person check and it definitely supports the conversion of SVG files. He asked that I warn you however that using the CONVERT command on the server can consume high resources depending on the number of images that you are converting. He suggested that you convert your images locally and then put them on the server to avoid possible issues. Running this for a large number of images on a shared server is not recommended.

If you have any further questions, please contact technical support or leave a comment at the bottom of the page.

Regards,

Arnel C.

You must login before you can post a comment about this answer.

Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!