Issue
I'm running Debian Squeeze & am trying to get to the PHP interactive mode. (I've installed php5-cli along with the usual php install packages)
Normally I would do this by running php -a
on this system I get the following, with no usual php prompt:
Interactive mode enabled
Any help much appreciated.
Solution
The other answer is missing out on a solution.
If you want a few short commands without a persistent environment, do
while read -er line; do php -r "$line"; done
Get a different php, (via compiling or other means) which links to readline instead of libedit (this was not done in debian because someone involved in php packaging does not want readline's gpl to apply to php), or a newer version of php which has this bug fixed.
Answered By - Ian Kelling