Problem about exec shell command

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
yue520
Forum Newbie
Posts: 3
Joined: Fri Jun 16, 2006 2:01 pm

Problem about exec shell command

Post by yue520 »

Hey guys:

I am trying to execute a shell command in PHP page.

The command is
convert inputfile.jpg outputfile.ppm

it suppose to generate a outputfile.ppm in the current or desired directory.

what I did was:

exec("convert uploads/dino_gif.gif Pop/dino_gif.ppm"); I also tried system(..); But none of these generate anything. Anybody have any ideas?

Thanks
:D
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

yue520
Forum Newbie
Posts: 3
Joined: Fri Jun 16, 2006 2:01 pm

Post by yue520 »

shell_exec("convert uploads/dino_gif.gif Pop/dino_gif.ppm");

doesn't work
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Do you need SSH enabled to get exec and shell_exec to work ?
Post Reply