Re: Problem with the passthru function

From: Date: Wed, 14 Jun 2006 10:27:48 +0000
Subject: Re: Problem with the passthru function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-237963@lists.php.net to get a copy of this message
Hi, Thanks for your response .... safe_mode is Off but still I'm getting this problem. Thank you, Venkatesh --- Rabin Vincent <rabin@rab.in> wrote: > On 6/14/06, Venkatesh Babu <venkatbabukr@yahoo.com> > wrote: > > 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? > > Check if safe_mode is on in your php.ini. Turn it > off > if it is enabled. > > Rabin > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

« previous php.general (#237963) next »