Re: Unable to use exec() in php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:
makhan 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






--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Unknown

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux