shell_exec

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
calmchess
Forum Commoner
Posts: 33
Joined: Fri Aug 18, 2006 8:14 pm

shell_exec

Post by calmchess »

how do I execute shell_exec(); from a webpage? I don't have a problem using it if i run the php file from the command line...but if i stick it on my webserver then browse to and open the webpage it doesn't work.
User avatar
Cameri
Forum Commoner
Posts: 87
Joined: Tue Apr 12, 2005 4:12 pm
Location: Santo Domingo, Dominican Republic

Post by Cameri »

That's because most web hosting services disable that function, due to the fact that it can be used to create malicious/harmful scripts. I mean, who wouldn't be scared of letting anyone execute commands on their shell?

Now, if it is a webserver on your computer, that's a different story, can't tell you why.
Post Reply