Page 1 of 1
shell_exec
Posted: Sun Oct 22, 2006 4:57 pm
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.
Posted: Sun Oct 22, 2006 8:56 pm
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.