I want to install PHP 5.1.6 on Ubuntu in order to work on legacy PHP application. How can I install PHP 5.1.6 on Ubuntu. I have tried to install 11.10 and followed many online resources to get it working but all in vain. Kindly help in this regard.

  • Go through this link it will help you. Follow the instruction carefully and installed according to your php version. May 23, 2014 at 5:11
  • @AbdulKadir: I tried but compiling php 5.1.6 is not an option. It gives error during step of compile.
    – azeem
    May 25, 2014 at 23:12
  • Send me the error. May 26, 2014 at 4:39
  • last few lines are as follow /opt/phpfarm/src/php-5.1.6/ext/dom/documenttype.c:219:65: error: dereferencing pointer to incomplete type strintsubset = xmlStrndup(buff->buffer->content, buff->buffer->use); ^ make: *** [ext/dom/documenttype.lo] Error 1 make failed.
    – azeem
    May 26, 2014 at 11:57
  • Did you manage to resolve this?
    – Ain Tohvri
    Dec 4, 2015 at 1:05

1 Answer 1


Use Docker. I've produced a 5.1.3 version of PHP running on Apache. See (and contribute!) at https://github.com/ain/docker-httpd


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .