Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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!

share|improve this question
2  
Oh no! Please consider reporting this bug to the PHP team. php.net/mailing-lists.php –  mcandre May 7 '13 at 19:33
    
PHP regularly has broken tests, you may want to build without running them. Also, if the PPA repo has source packages, you may want to get them and start from there. –  Janoszen May 15 '13 at 20:56

1 Answer 1

Try with this:

$ cd php-5.4.0/ext/readline
$ phpize && ./configure && make

Then you will end up with a modules/readline.so which can be loaded from php.ini (make install will move it to extension_dir).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.