Solved

Check if imagemagick is installed via php

Posted on 2004-10-21
1,376 Views
Last Modified: 2008-01-16
Hi,
How can i check if image magick is installed from my php program?

Thanks,
Mag
0
Question by:mag1c1an
    9 Comments
     
    LVL 5

    Assisted Solution

    by:basiclife
    Look at the output form phpinfo()
    0
     
    LVL 2

    Author Comment

    by:mag1c1an
    Hi,
    I did that, what am I looking for? (eg: imagick)
    Thanks,
    Mag
    0
     
    LVL 5

    Expert Comment

    by:basiclife
    hang on and let me have a look
    0
     
    LVL 5

    Expert Comment

    by:basiclife
    Ok, Imagemagick isn't a PHP module so it won't show on phpinfo() My fault.  Are you the server admin? You need to call imagemagick using some sort of execution command ie shell_exec() etc... and you'll need to know the path. Unfortunately, unless you KNOW the path you can't check it using PHP. Also, if safe mode is on, it will only work if it's in a place that PHP is allowed to execute from.

    Finally, if you are the server admin you should telnet/ssh to the server and do:

    find / -name imagemagick which will tell you where it is.

    I can't think of a way to do this unless you have some sort of shell account at least.

    Sorry about the mistake in the last post. Should've checked my facts.
    0
     
    LVL 27

    Accepted Solution

    by:
    Hi,

    go to http://www.jmbsoft.com/software/tools/ . At the bottom of the page you can download the ImageMagick Test Suite for free. It's not a php-script but a perl one, which you should run on your server.
    The script tells you, if ImageMagick is installed working.
    0
     
    LVL 5

    Expert Comment

    by:basiclife
    Nice workaround
    0
     
    LVL 2

    Author Comment

    by:mag1c1an
    Hi guys,
    Basiclife, I know you tried your best to help me even though you should have checked first ;-p so I have increased the points and you get the original points since you took the time to try to help me.

    caterham_www, the tool works great, thanks! Extra points to you for giving me the solution.

    Thanks,
    Mag

    0
     
    LVL 5

    Expert Comment

    by:basiclife
    Thanks for that, but it wasn't required. I'd not have felt badly about it if you'd given the lot to caterham_www since he actually solved the problem but I appreciate it.
    0
     
    LVL 2

    Author Comment

    by:mag1c1an
    Hi,
    No, thats ok, I thought this was an easy question (something like looking in the phpinfo() function) but in the end that was not the case and I  think if someone takes the time to help you.....

    Thanks,
    Mag
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

     Java Android Coding Bundle

    Whether you're an Apple user or Android addict, learning to code for the Android platform is an extremely valuable, in-demand skill. It all starts with Java, the language behind the apps and games that make Android the top platform it is today.

    Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
    Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    857 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now