Pangurban wrote:
>I have
>Fedora Core 3
>PHP Version 4.3.9
>Apache/2.0.52 (Fedora)
>>Safe Mode is Off
>>A little script using the php exec() function
>>when run as root as in
>[.root at machine]php test.php
>produces the desired result
>>when run as a user
>[user at machine] php test.php
>produces the same result
>>but when run in a browser
>>http://machine/test.php>or
>http://localhost/test.php>>produces the result of the other php commands in test.php
>but not the result of the exec() command
>>You either need to pass an array to exec to store the output, or use
passthru() to return the raw output, at a guess.
Cheers,
/Ciaran
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!