convert strings run by php's exec give weird errors
Posted: 2008-10-22T05:27:38-07:00
if I run this in command prompt:
it runs perfectly fine. it generates a nice thumbnail, and ends up at the correct location.
However, if I try to run it with php's exec, even going as far as to literally entering the above, trying each combination of escaping things out etc, no thumbnail is generated, and apache's error log gives me the following line:
the code executed in php is the following:
Can anyone give me any clues on what causes this weird difference between simple command prompt and exec? : / I run a local webserver so I don't see how there should be much difference.
Code: Select all
convert -resize 71x100! "c:/webserver/images/users/avo/artworks/1.png" "c:/webserver/images/users/avo/thumbnails/1.png"
However, if I try to run it with php's exec, even going as far as to literally entering the above, trying each combination of escaping things out etc, no thumbnail is generated, and apache's error log gives me the following line:
Code: Select all
Invalid Parameter - 71x100!
Code: Select all
$query= "convert -resize {$width}x{$height}! \"{$source}\" \"{$destination}\"";
echo $query;
exec($query);