Did you make all the changes from my Pointers on my home page?
I can only surmise that something is wrong with your PHP setup or command. I am not an expert on PHP. Does PHP allow single quotes inside of your PHP outer quotes? Do the inner ones need escaping?
Try putting your images in the same directory as the script? Does that help with regard to snibgo's comments?
Try running a simple IM command
exec("convert rose: rose.jpg")
Does that work? If so, then try a simpler script such as 2colorthresh. Does that work?
When you downloaded the script, does the file have .sh appended? If so, then you need to change it or the PHP command to be consistent.
Do you have proper permissions for your PHP?
Try adding bash to your command as
Code: Select all
<?php
exec("bash ./tshirt -r '325x325+36+40' -f distort {$url} ../test/tshirt.jpg ../test/test.jpg 2>&1",$out,$returnval);
foreach($out as $text)
{echo "$text<br>";}
?>
Does your tmp directory have enough disk space?
There is no jpg2 file created in my script. That could only come from your $url.
The .cache files are created with corresponding .mpc files that are created as tmp files in the script and should go away automatically. What are the full filenames for the .jpg2 and .cache files?
The script creates a temp folder to contain all the images and the temp folder gets deleted automatically. So there should be no .cache files remaining if the folder is properly deleted. Check your tmp directory to see what is there and if close to full? Any of them contain the name imagemagick?
Try changing lines 380,381,382 from
trap "rm -rf $dir;" 0
trap "rm -rf $dir; exit 1" 1 2 3 10 15
trap "rm -rf $dir; exit 1" ERR
to
trap "rm -rf $dir; exit 0" 0
trap "rm -rf $dir; exit 1" 1 2 3 10 15
Does that make a difference?