|
Shell commands from PHP
i need to run some shell commands in PHP to resize images... has anyone done this? i am using this
$cmd = "cd /usr2/hsphere/home/sdravers/sdravers.com/new/images/events
jpegtopnm temp.jpg > temp.ppm
pnmscale -xysize 600 600 temp.ppm > full.ppm
pnmscale -xysize 120 120 temp.ppm > thumb.ppm
pnmtojpeg thumb.ppm > $id_thumb.jpg
pnmtojpeg full.ppm > $id_full.jpg
rm *.ppm
rm temp.jpg
y";
shell_exec($cmd);
and i get the following error
Warning: Cannot execute using backquotes in safe mode in /usr2/hsphere/home/sdravers/sdravers.com/new/add_event.php on line 78
help?
|