Page 1 of 1

error executing shell_exec

Posted: Wed Aug 19, 2009 10:05 am
by celalo
hello, I am trying to execute a shell command via:

Code: Select all

<php echo shell_execute("tac /home/kusmuk/access-logs/kusmuk.org"); ?>
But it does not give any output. What could be the reason?

altough it does not work those following lines works as expected:

Code: Select all

<php echo shell_execute("ls -al triogrup.com"); ?>
//outputs: -rw-r----- 2 root kusmuk 28640 Aug 19 17:44 kusmuk.org

Code: Select all

<php echo shell_execute("pwd"); ?>
//outputs: /home/kusmuk/public_html

Re: error executing shell_exec

Posted: Wed Aug 19, 2009 12:03 pm
by AlanG
The function name is shell_exec(), change it to that. Did those other commands work with shell_execute()?