and i put a.jpg into the script folder
my code is :
Code: Select all
putenv("MAGICK_THREAD_LIMIT=1");
putenv("PATH=/usr/local/bin:/usr/bin:/bin");
exec("/usr/bin/convert -debug exception '".__DIR__."/a.jpg"."' '".__DIR__."/b.jpg"."' 2>&1",$array);
echo "<br>".print_r($array)."<br>";
but when i switch the jpg with new jpg file , convert is stop working
looks like it dose not work all kind of jpgs
above code work with this img :
and stop working with this one :
and output for bad jpg is :
Code: Select all
Array ( [0] => 2014-02-28T23:53:12-06:00 0:00.010 0.000u 6.7.1 Exception convert[625869]: xml-tree.c/ParseCloseTag/1358/Exception [1] => ParseError unexpected closing tag [2] => 2014-02-28T23:53:12-06:00 0:00.010 0.000u 6.7.1 Exception convert[625869]: xml-tree.c/ParseCloseTag/1358/Exception [3] => ParseError unexpected closing tag [4] => 2014-02-28T23:53:12-06:00 0:00.010 0.000u 6.7.1 Exception convert[625869]: xml-tree.c/ParseCloseTag/1358/Exception [5] => ParseError unexpected closing tag )
1
i search all over the google but i cannot find any help