I am trying to use a old version of PHP - Specifically PHP 5.3.8 I really need to use this version, it is not possible to update it since the system is huge and it is very old - It needs to run on PHP 5.3.8.
So... Let's get to it:
About the Server Specs i am using:
O.S is Ubuntu 20.04 - I also tried all this on Debian Bullseye.
The things i tried so far: 1 Compiling from source 2 Using phpbrew 3 Few other methods that uses some repositories i found on some tutorials.
But this is been extremelly difficult to acomplish! Using phpbrew just feels impossible since everytime i try to install php 5.3.8 it gives me A LOT of erros, i go and i fix them but they will just keep appearing everytime... Really, i think i fixed like 20 different problems regarding packages compatibility and even some code directly on the source.
Had to even install some packages from source, like ICU for example!
Please, can someone point me in the right direction on what's the best way to do this????
I think i will try Docker next, but i DO NOT know how to start on Docker (Im new on the field.) I also know of a Software called ISPCONFIG but i'm not sure if it'ill work...
Please, any help, really, is much appreciate it! Thanks...
31 Answer
Here is what I have done to install php5.3 (5.3.29) to my Ubuntu 20.04
- Download the latest tar from here
- Extract to /var/lib/php/modules
sudo cp ~/Downloads/php-5.3.29.tar.gz
cd /var/lib/php/modules
tar -xzvf php-5.3.29.tar.gz- Install php
cd php-5.3.29
./configure
sudo make
sudo make installError may occur with missing libxml2 after ./configure command, just install missing lib (sudo apt install libxml2-dev) then rerun ./configure after that you can continue with installation!
Check php -v
I found that you can't switch from this old php version to the new one if you have such :( So you will need to uninstall php5.3 to be able to use php5.5 or newer.
sudo apt-get install checkinstall
cd /var/lib/php/modules/php-5.3.29
sudo checkinstall
sudo dpkg -i php_5.3.29-1amd64.deb
sudo apt purge phpCredits to
Hope it will help!
Personally, I prefer using Docker though.
2