Link to home
Start Free TrialLog in
Avatar of mag1c1an
mag1c1an

asked on

Check if imagemagick is installed via php

Hi,
How can i check if image magick is installed from my php program?

Thanks,
Mag
SOLUTION
Avatar of basiclife
basiclife

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mag1c1an
mag1c1an

ASKER

Hi,
I did that, what am I looking for? (eg: imagick)
Thanks,
Mag
hang on and let me have a look
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.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Nice workaround
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

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.
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