How use shell_exec funtion in php 5.2.5 over linux
Hi I am new in php and try to use shell_exec function but don't work properly, the problem is donīt show any message error. my script is
$cli = "/public_html/newcli"; $dat = "-P/public_html/"; $execute = $cli." aut ".$tarjeta." ".$mesexpira." ".$anexpira." ".$monto2." ".$dat; $cliresult = shell_exec($execute); in variable &cli search a newcli file in variable $dat search a cgi.dat file in variable $clireult sow result of process but donīt show anything, I think if can not find the folder should be display an error, but does not give me any error and not run the process please help me. Thanks. |
Welcome to LQ!
Try echo'ing $execute before shell_exec.. Also try running a simpler command (ls comes to mind..) at first www.php.net Quote:
HTH, Cheers |
Thanks for help
Tanks but not understand your response, sorry I am very very new in php, this is my first experience in php, if you could expand a little more your response, I appreciate.
|
Hello, sorry for answering so late. Here's what you should do:
1. Make sure this function is available to you: PHP Code:
2. Then, if that works: PHP Code:
You will see the command as it would be run by shell_exec. Try running it by hand and see what happens. Cheers :) |
All times are GMT -5. The time now is 12:54 AM. |