Results 1 to 2 of 2
Hello, I have php page like this:
<?php
if (isset($_POST['logFilePath']))
{
$logFilePath = $_POST['logFilePath'];
}
else
logFilePath ="";
$command = "wireshark " . $logFilePath ;
shell_exec($command);
?>
wireshark is a ...
- 01-29-2009 #1Just Joined!
- Join Date
- Aug 2008
- Posts
- 10
can not run linux external program with php through browser
Hello, I have php page like this:
<?php
if (isset($_POST['logFilePath']))
{
$logFilePath = $_POST['logFilePath'];
}
else
logFilePath ="";
$command = "wireshark " . $logFilePath ;
shell_exec($command);
?>
wireshark is a linux application that analyze traffic or tcpdump format files
I test echo shell_exec('ls');
and it works but my command not.
I copy wireshark at the current directory of my php page and change it chmod to 777 to give access of running it to apache but it doesn't work yet.
when I run it as command line it works correctly and wireshark opens but when I run it through browser it doesn't work. What it the problem and how can i solve that.
- 01-29-2009 #2
instead of just using the command as wireshark include the full path to the executable, my guess is its in a location that isn't on the apache user's path


Reply With Quote