Convert working in Shell for PDF but not in PHP
Posted: 2008-10-29T11:45:53-07:00
Hi,
I have ImageMagick-6.4.2 installed along with ghostscript. I can successfully run the following command in Shell:
$ /usr/local/bin/convert -trim -density 150x150 -units pixelsperinch /usr/local/www/.../input.pdf /usr/local/www/.../output_%d.gif
but when I try this using exec(), passthrough(), shell_exec() or system() I get a failure code of 1.
This code works through PHP system("/usr/local/bin/convert logo: /usr/local/www/.../imlogo.gif", $rcode);
I'm thinking the problem might just be with PDF's but they seem to convert OK when running commands through the shell interface. Can anyone help or point me in the right direction? Is this a permissions problem? Permissions on the folders and files in question are 777.
Could this be a problem with the path to ghostscript in deligatemap.xml?
Many Thanks
I have ImageMagick-6.4.2 installed along with ghostscript. I can successfully run the following command in Shell:
$ /usr/local/bin/convert -trim -density 150x150 -units pixelsperinch /usr/local/www/.../input.pdf /usr/local/www/.../output_%d.gif
but when I try this using exec(), passthrough(), shell_exec() or system() I get a failure code of 1.
This code works through PHP system("/usr/local/bin/convert logo: /usr/local/www/.../imlogo.gif", $rcode);
I'm thinking the problem might just be with PDF's but they seem to convert OK when running commands through the shell interface. Can anyone help or point me in the right direction? Is this a permissions problem? Permissions on the folders and files in question are 777.
Could this be a problem with the path to ghostscript in deligatemap.xml?
Many Thanks