No PHP5 Readline in Debian?

PHP5-Readline Debian Package

I'm working on a command line PHP script and I've come to realize that there is no readline capability compiled into the php5-cli package. That's too bad, as command line php usage is gaining a lot of popularity.

From what I've read, this may be due to licensing issues, which is also too bad.

Why do I want PHP5 readline support? Mostly so that when using interactive php command line scripts, I can use the "up arrow" keystroke to recall my last command, as well as tab completion. Those are my favorite things about the command line and what make it such an efficient way to interact with computers.

UPDATE: I was able to compile and install readline as a module! That makes creating command line PHP applications much easier.

./configure --disable-cgi --enable-cli --with-readline=shared,/usr/include/readline/

Control file:


Package: php5-readline

Version: 5.2.3

Section: web

Priority: optional

Architecture: i386

Depends: php5-cli (>=5.2), libreadline5

Maintainer: Albert Lash 

Description: PHP 5 Readline Shared Object Helpful in the creation of interactive command line scripts written in PHP.

Package contents:


php5-readline

php5-readline/etc

php5-readline/etc/php5

php5-readline/etc/php5/conf.d

php5-readline/etc/php5/conf.d/readline.ini

php5-readline/usr

php5-readline/usr/lib

php5-readline/usr/lib/php5

php5-readline/usr/lib/php5/20060613+lfs

php5-readline/usr/lib/php5/20060613+lfs/readline.so

php5-readline/DEBIAN

php5-readline/DEBIAN/control

php5-readline_5.2.3.deb

Note: The above debian package was created with my very limited experience! Use at your own risk!

UPDATE November 12, 2007: Thanks to an email exchange with Felipe (see my new post on the php5-xsltcache package), the licensing issue with a php5-readline has been confirmed. So this package will not make it into the debian repositories. See debian bug report #341864 regarding php5-readline licensing issues.

By Albert on October 19, 2007 8:44 AM

7 Comments

I tried downloading the package, but get a 404. I would really like to get my hands on this package.

Hi Troels, thanks for the heads up. Try it now, should be fixed. Might have to refresh.

I cannot get the debian Packeg through this Link it redirects to another Page

Hi outsider - thanks for the heads up. I fixed it so you should be able to download it now.

I plan to update this package with one of these:

http://www.s11n.net/editline/

http://www.thrysoee.dk/editline/

to free it from license issues.

You rock! I've been looking for this in all of Debian's package repositories.

Thanks for compiling this package!

- Charlie

Thank you. This is a help.