LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Executing system commands in a php script (https://www.linuxquestions.org/questions/linux-server-73/executing-system-commands-in-a-php-script-532529/)

atiq 02-26-2007 07:51 AM

Executing system commands in a php script
 
Hi,
I have a php script in which i am executing some shell commands (e.g date, who, ping, shutdown:) etc) using the System command. When I run the script from command line, every thing goes fine because I have the root privileges.
But if I run the script from web browser, only those commands are executed which don't need root privilages.
How to fix it?
It might be insecure but at the moment, I am not concerned about security.

Regards,
Atiq

avallach 02-26-2007 08:14 AM

Maybe it will work when running those commands by sudo ?

atiq 02-26-2007 09:45 AM

Quote:

Originally Posted by avallach
Maybe it will work when running those commands by sudo ?

No it doesn't work. :confused:


All times are GMT -5. The time now is 12:58 PM.