When I install php5-cli on Debian Wheezy (currently testing), the interactive prompt is very unusable due to missing readline support (bug 341868). What's the easiest way to install a version linked against libreadline (for usable line editing)?
|
Use the Dotdeb Debian stable packages. Although the documentation does not note this, the stable packages currently work fine with Wheezy/testing. After following the instructions, do:
as root. |
|||
|
|
|
As an addition to the answer by Gilles who suggest recompiling the complete PHP package you can also wait for PHP 5.4. In 5.4 I restructured the realdine functionality that all required parts are in the readline module, so you can built that stand alone.
Then you will end up with a Alternatively the distributor may ship the readline module (maybe linked against libedit, not readline) and the interactive mode will be available. This all won't help you now (as PHP 5.4. isn't out, yet) but might help others finding this question later. Some more details on my blog: http://schlueters.de/blog/archives/133-Now-in-trunk-Improved-interactive-shell.html Edit: Actually the blog post is older than this change, but might stillbe interesting. A little information is in the bug report #53878 but not much either ... after release http://php.net/commandline.interactive should have more. |
|||||
|
|
Install Alternatively, get the source package and rebuild it with readline support. Readline support was only left out due to licensing issues, but these issues only forbid distributing PHP5 linked with readline, they don't forbid you from using it.
|
|||||||||||||
|
|
Try this:
The press Ctrl-d |
|||||||
|
|
None of these worked for me. Use http://www.phpsh.org/ instead. |
|||
|
|