This is driving me nuts:
On a Windows box running abyss web server i am trying to pass a simple command to the system using “exec()”…have also tried using system(), etc.
I am trying to call ImageMagick to convert a photo The command works ok from the command prompt on the server itself, but I think PHP is not escaping spaces properly.
[code=php]
$tmp = “C:Program FilesAbyss Web Serverhtdocsimages\”.$file_basename.”.tiff”;
$jpg = “C:Program FilesAbyss Web Serverhtdocsimages\”.$file_basename.”.jpg”;
$convert = “convert “.$tmp.” “.$jpg;
exec($convert,$out);
print_r($out);
I have tried several methods of escaping parts of the command but the same error keeps coming back:
[CODE]
Array ( [0] => Invalid Parameter – FilesAbyss )
The error implies the first space in the arguement is being interpreted as parameter separator…Whats the deal? I’ve tried escaping spaces using ” “, “^ “, encapsulating the arguements in quotes, etc.