Re: Unable to use exec() in php
| From: | Jim Lucas | Date: | Mon, 18 Jun 2007 06:19:11 +0000 |
| Subject: | Re: Unable to use exec() in php | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-257257@lists.php.net to get a copy of this message | ||
makhan wrote:
Thanks jim for your reponse , from no success means I am not able to get any output. I am also using shell_exec('matlab -r myscript') to run my matlab script. I see a new matlab.exe process starting in the windows task manager. And the browser keeps busy trying to open this php page. I have made my matlab script to write on a text file but this file is never created.Try this <?php exec('yourcommand.sh', $output); echo $output; ?> This should return to you any output that the program may have. You might have to look into redirecting your standard out and your standard error Jim
Jim Lucas-2 wrote:-- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Unknownmakhan wrote:Hi I am using exec() funtions to run simple commands like exec('date') in php without any success. I am using apache on my windows system. Can someno guid me what could be wrong. I have checked the php.ini file and its not in the safe mode."without any success" What exactly does this mean? You get no output? Read this: and read up on the second argument. http://us2.php.net/manual/en/function.exec.php Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php