shell_exec grep command execution from PHP script
Posted on 2009-04-08
any thoughts on debugging the following script?
- echo shell_exec(uptime); works fine
- echo "grep $SearchString /var/log/exim_mainlog"; displays the get param fine
- but the second echo as shown below displays nothing.
- this is executed from the base apache/htdocs directory
$SearchString = $_GET['s'];
echo shell_exec("grep $SearchString /var/log/exim_mainlog");