1

I am having issues in compiling the PHP 5.3.29 on Ubuntu 16.04

My question: Say if I compile PHP on earlier version of ubuntu and copy it over to Ubuntu 16.04. Will it work as expected or it will fail?

Joshi
  • 343
  • The libraries it's expecting will be different. You can't safely just 'copy' data over. Also keep in mind that 5.3.29 is ancient and probably won't compile with the latest libraries lying around. – Thomas Ward Aug 28 '17 at 18:34
  • I think you will not get succesfully to install php 5.3.29, Ondrej (https://launchpad.net/~ondrej/+archive/ubuntu/php) has older PHP repositories, but the earlier he has is 5.6 – Redbob Aug 28 '17 at 18:39

1 Answers1

1

I use ubuntu 16.04, and all work's fine. Here example how install php5.x.x link

Pre-requisites

You will need these two extra packages if you don't have them:

sudo apt-get install build-essential libxml2-dev

Install PHP

In terminal:

wget http://in1.php.net/distributions/php-5.3.29.tar.bz2
tar -xvf php-5.3.29.tar.bz2
cd php-5.3.29
./configure
make
make test # Neither mandatory nor a bad idea.
sudo make install

The instructions will untar the source build and they will install php in your system.