0

I am using Ubuntu 10.04.1 LTS Server with PHP Version 5.3.2-1ubuntu4.19 Apache/2.2.14 (Ubuntu).

I login to the server via putty and want to upgrade to php 5.4. I could not find the right commands from Google.I am not expert in Linux Please help me step by step.

Hojat Taheri
  • 5,539

1 Answers1

1

It's not recommended to install a version of php that isn't provided by the default ppa's, but if you want to do it this is what you should do:

First we add a repo that contains the file we need, but as Ubuntu Server can't add repos at the default setting write the following command to be able to add repos:

sudo apt-get install python-software-properties

After that we can add the repo by typing:

sudo add-apt-repository ppa:ondrej/php5

Then we can upgrade php by typing these two commands:

sudo apt-get update
sudo apt-get upgrade

To be sure if you have the right version type:

php -v