SOLVED - Weird problem with +polaroid in exec()
Posted: 2009-05-06T14:09:27-07:00
Hi All,
I've been struggling with something really weird for the last couple of hours. Let me expalin.
I try to run this cmd in a PHP script:
exec ("convert test.jpg -background black +polaroid -background white -flatten test2.jpg");
RESULT: Doesn't work. test2.jpg is not created. Tried "convert test.jpg +polaroid test2.png" but no result either.
I then try to run the cmd convert test.jpg -background black +polaroid -background white -flatten test2.jpg from a root shell on my server.
RESULT: It works perfectly and the file test2.jpg is created.
Then I try to troubleshoot my PHP script to see where it goes wrong.
I try to exec the cmd without the +polaroid: exec ("convert test.jpg -background black -flatten test2.jpg");
RESULT: works perfectly and test2.jpg is created.
NOTE:After some more testing, I found out that the cmd -sketch doesnt work either from exec() within php.
but works fine from root shell...
Can anybody explain me why, when I have +polaroid in my exec cmd it doesnt work ?
Version supports polaroid because I tried from a root shell and all fine...
Thanks for the help on this crazy problem.
I've been struggling with something really weird for the last couple of hours. Let me expalin.
I try to run this cmd in a PHP script:
exec ("convert test.jpg -background black +polaroid -background white -flatten test2.jpg");
RESULT: Doesn't work. test2.jpg is not created. Tried "convert test.jpg +polaroid test2.png" but no result either.
I then try to run the cmd convert test.jpg -background black +polaroid -background white -flatten test2.jpg from a root shell on my server.
RESULT: It works perfectly and the file test2.jpg is created.
Then I try to troubleshoot my PHP script to see where it goes wrong.
I try to exec the cmd without the +polaroid: exec ("convert test.jpg -background black -flatten test2.jpg");
RESULT: works perfectly and test2.jpg is created.
NOTE:After some more testing, I found out that the cmd -sketch doesnt work either from exec() within php.
but works fine from root shell...
Can anybody explain me why, when I have +polaroid in my exec cmd it doesnt work ?
Version supports polaroid because I tried from a root shell and all fine...
Thanks for the help on this crazy problem.