command line by php shell not working for SOME files

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
gulp
Posts: 2
Joined: 2014-08-05T01:44:11-07:00
Authentication code: 6789

command line by php shell not working for SOME files

Post by gulp »

Hello,
my versions:
Windows Server 2008 R2 Enterprise SP1
PHP 5.5.14
ImageMagick 6.8.9-6 Q16 x64 2014-07-22


I'm using imagemagik to batch convert some files calling from php with "system()" function (also test with exec() and passthru() )
For all files it works well except for .ai or .pdf files.

The same call works well by command line, but doesn't works with the php call, without throwing errors...

Code: Select all

$command = 'convert -density 99 -verbose "d:\\exe\\temp\\imagemagik\\icons.ai" "d:\\exe\\temp\\imagemagik\\icons.ai.png" ';	
$result_var = NULL;
$result = system($command,$result_var);	
I've put also the verbose flag that doesn't reports anything strange, except that the print result is cut out just after the printing of -sOutputFile an the temp files ...
I've found in the C:\Windows\Temp directory the temp files created each time by imagemagic, and these contains the correct conversion of the files .ai, these just doesn't comes copied to the directory.
Should it be due to a permission issue over the C:/Users/Administrators/AppData/Local/Temp/ directory for the php/iis users ?

Is there a way to solve ?
gulp
Posts: 2
Joined: 2014-08-05T01:44:11-07:00
Authentication code: 6789

[SOLVED]Re: command line by php shell not working for SOME f

Post by gulp »

I've solved setting the read/write permission on the C:/Windows/Temp folder for the IUSR user,
this is request by ghostscript !
Post Reply