Problem with the passthru function

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

 



Hello All,

I have a small php file (test.php) whose code is shown
below:

<?php
    $retval=1;
    $command='/bin/ls';
    passthru($command, $retval);
    print("Exit status: " . $retval);
?>

This test.php works fine when I execute from command
prompt as "php test.php", but when I access it through
web browser, it seems not to be working fine, I get an
exit status of 127 (which means command not found). I
checked for permissions of ls, gave full path, but
still it is failing.

Can anybody help me in indentifying what is the
potential problem?

Thank you,
Venkatesh

ps: Sorry if this is the wrong mailing list. I have
subscribed to this list, so posting here.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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