phMagick :: Testing the instalation
phMagick requires 2 things ImageMagick and the ability to issues systems calls with the exec() function
The easiest way to test the installation is to issue a system call to the convert binary
You can also activate phMagick Debug Mode and see if after running a command you get any errors.
One common error on windows systems is "invalid parameter", it usually means that windows is using the convert.exe from system32 (convert is used to convert a file system to NTFS) instead of the ImageMagick convert
Hi -
Your library works great on my local MAMP install; however, I would also like to use it on our server (which has imageMagick installed).
I have permissions to run shell “exec” commands, but one (small) problem I am having is that if I would like to call the script from a browser, the default web-user doesn’t know the full path to the ‘convert’ program that your phmagick class wrapper is calling. I noticed that ‘convert’ is called in several of your plugin files, and rather than changing the path in all of them, I would like to set a path variable in one place (or once in each file that uses convert) and then append this to the convert calls — e.g., $cmd = $p->getBinary(‘convert’); ==> $cmd = $p->getBinary($path.’convert’);
Where is the best file to add the path to, so it will cascade through the dependent files, and so it will minimize editing through all your plugin files?
Alternatively, I suppose I could set a $PATH variable for the web-user so that it finds the ‘convert’ program without modifying anything. I just thought the path might be a nice option to have.
Thank you again for the phmagick class and scripts!
@ Elizabeth
please see this link http://www.francodacosta.com/blog/phmagick/examples/error-convert-invalid-parameter it has information how how to change the path of imagemagick binaries
IF you need more help, just ask
Hi,
I have installed ImageMagick on a CentOS. “Make check” passed all 12 tests.
exec() is not limited by disable_functions in the php.ini, but the testing script do not create the resized.jpg-Image or get any errors.
I try to set the path to convert with $imageMagickPath = ‘/usr/local/bin/’ and $imageMagickPath = ‘/usr/local/bin/convert’ – no resized-image no any errors.
Can you help me nuno costa?
@nuno costa,
sorry – the problem is solved – this was a case sensitive file name problem, but now i get a return code: 127.
The printed command run fine without error in the command line and create the resized.jpg
@ enrico,
Did you manage to fix this issue? I have the same exact problem.
@ nuno costa,
can you help here?
Thanks!
It looks like you don’t have imagemagick on you system path
try using $phMagick->setImageMagickPath(‘path to imagemagick bin folder’)
keep me posted
Yes.
Solved the problem.
Thanks!