Install PHP 5.3 on Ubuntu 17.10

I know, I know, I know, I know! I need to update my code! If I haven’t said it already, I know! But… I don’t have time to updated hundreds upon hundreds of lines of code, so I’m taking the easy way out.

I found the steps to do it here:

The system I’m installing from is a fresh install of Ubuntu 17.10, so I’m assuming NOTHING has been pre-installed with these instructions.

Install PHP

sudo apt install php -y

Download and configure phpbrew

sudo apt install -y curl
curl -L -O
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   130  100   130    0     0     43      0  0:00:03  0:00:03 --:--:--    42
100 1792k  100 1792k    0     0   224k      0  0:00:08  0:00:08 --:--:--  460k
chmod +x phpbrew
sudo mv phpbrew /usr/bin/phpbrew
sudo nano /root/.bashrc
# Added this line to install PHP 5.3 per instructions found here:
[[ -e ~/.phpbrew/bashrc ]] && source ~/.phpbrew/bashrc

Initialize phpbrew

phpbrew init
Using root: /home/thomasr/.phpbrew
Initialization successfully finished!
Phpbrew environment is initialized, required directories are created under


Paste the following line(s) to the end of your ~/.bashrc and start a
new shell, phpbrew should be up and fully functional from there:

    source /home/thomasr/.phpbrew/bashrc

To enable PHP version info in your shell prompt, please set PHPBREW_SET_PROMPT=1
in your `~/.bashrc` before you source `~/.phpbrew/bashrc`


To enable .phpbrewrc file searching, please export the following variable:

    export PHPBREW_RC_ENABLE=1

For further instructions, simply run `phpbrew` to see the help message.

Enjoy phpbrew at $HOME!!


Update for old versions and display

phpbrew update --old
===> Fetching release list...
Downloading via php stream
Downloading via php stream
7.2: 4 releases
7.1: 16 releases
7.0: 29 releases
5.6: 35 releases
5.5: 39 releases
5.4: 46 releases
5.3: 30 releases
5.2: 17 releases
5.1: 7 releases
5.0: 6 releases
===> Done

phpbrew known

Author: admin on March 2, 2018
Category: Debian / Ubuntu, Linux, PHP

Last articles