I need to use php in some interactive way by terminal. So, I installed php5-cli (but not php and Apache).
Now, according the manual page, I should run the following command in the terminal to use php in interactive mode.
And it's what I did. The output is
~$ php -a Interactive mode enabled
It doesn't work, in fact nothing happen if I write
Also, when I try to use the arrows (left and right) to move backward and forward, some strange characters appears..
I reinstalled the new !#
~$ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 7.1 (wheezy) Release: 7.1 Codename: wheezy ~$ uname -a Linux tronix 3.2.0-4-686-pae #1 SMP Debian 3.2.46-1 i686 GNU/Linux
but with the previous version everything work.. (Don't know if it's important, but I had php and Apache installed in the previous !#).
Last edited by donpi (2013-12-17 01:11:54)
it seems you have "interactive mode", but not "interactive shell".
in your case you should type something like this:
~$ php -a Interactive mode enabled <?php echo "hello world\n"; ?>
then press Ctrl-D
to get your output
take a look here for more info:
http://php.net/manual/en/features.comma … php#108006
about "arrows": some prompts don't recognize 'em as a "move to" key. that's probably be the case of php-cli.
I fixed the problem installing a different repository version.
In my apt/source.list file
## DotDeb.org deb http://packages.dotdeb.org wheezy all deb-src http://packages.dotdeb.org wheezy all deb http://packages.dotdeb.org wheezy-php55 all deb-src http://packages.dotdeb.org wheezy-php55 all