How can I enable readline for PHP 5.4 on Ubuntu 11.10?

Posted by dotweb on Super User See other posts from Super User or by dotweb
Published on 2012-04-03T23:26:37Z Indexed on 2012/04/03 23:32 UTC
Read the original article Hit count: 258

Filed under:
|
|

I installed PHP 5.4 on my Ubuntu 11.10 PC like this:

$ sudo add-apt-repository ppa:ondrej/php5
$ sudo apt-get update
$ sudo apt-get install php5

It's working fine but I don't have the readline function anymore that I need for my PHP CLI scripts. libreadline-dev is installed and readline was working perfectly in 5.3.

I also tried to compile 5.4 with readline:

$ wget http://de2.php.net/get/php-5.4.0.tar.gz/from/de.php.net/mirror
$ tar xzvf mirror
$ cd php-5.4.0/
$ ./configure --with-readline
$ make test

But the last command echoed this error after compiling for some minutes:

FAILED TEST SUMMARY Test 7: DTD tests [ext/dom/tests/dom007.phpt] You may have found a problem in PHP.

I appreciate any help on how to get readline working!

© Super User or respective owner

Related posts about ubuntu

Related posts about php