Hi,
I want to write a simple php program to show the user the status of the
RAID array on the system. The user is not linux literate so I want to
make it as idiot proof as possible. Not that I'm much better ;>)
The command: dmraid -r displays the raid status.
I'm using the php passthru() function to display the result of the above
command on a web page.
Here's a snippet from the php script to demonstrate that this doesn't
work from php.
echo '';
// this works and outputs several lines of text
passthru('ls -l',$retval);
// return value=0 (success)
echo '
'.$retval;
echo '
';
// this outputs nothing
passthru('dmraid -r',$retval);
// return value=1 (error)
echo '
'.$retval;
exit();
echo '
';
?>
So why does passthru('ls -l') work and passthru('dmraid -r') not work?
Thanks,
Frank