I'm having some problems accessing the command line from PHP. I've never used any of the standard functions, so hopefully I'm overlooking something obvious... Here's the function I'm using:
function append_frame($file) {
if (!file_exists($file))
return false;
if (is_animated_gif($file))
return false;
if (filesize($file)>6300)
return false;
$file = escapeshellcmd($file);
$oops = system("/usr/local/bin/gifsicle --loopcount -d 500 $file -d 100 append.gif > animated.gif");
return true;
}
It's supposed to take the filename supplied, and merge that file (if it passes all the tests) with append.gif, creating an animated gif. The same command works from command line. I've already tried system(), exec(), and passthru().
Any ideas?