Re: CLI - php shell script worked under php4, breaks under php5

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

 



On Mon, Jun 26, 2006 at 01:53:31PM +1000, David Tulloh wrote:
>
> weston@xxxxxxxxxxxxxxxx wrote:
> > A while back I wrote a little read-eval-print loop that essentially constituted a very basic php shell:
> > 
> > http://weston.canncentral.org/misc/phpsh.txt
> > 
> > However, I just recently tried to use this with PHP 5.1.2, and found that it doesn't work. 
> 
> Works for me, PHP 5.1.4.  Perhaps you have some kind of output 
> buffering enabled.  Using the -n command line switch will disable 
> your php.ini which should stop anything like that.

Thank you! It is apparently exactly as you say. :) Adding a -n makes it run just fine.

> The syntax error you are getting is caused by not entering 
> any input.
> Your line 23 becomes:
> $returnval = eval("return();");
> Return expects some value to be provided, hence the syntax error.

Makes sense. Thanks again!

-WEston

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