0

I followed the steps here: Update server php version to 5.4.10 via the command line

and finally I get the message that it is the newest version, but it is version 5.36, far from the newest version.

I want to upgrade to at least php version 5.37 so my Laravel framework works good, and there is a much newer version of php released already:

http://php.net/archive/2014.php#id2014-01-10-1

Can you help me to upgrade php5?

Jesse C
  • 28
Darius.V
  • 287

3 Answers3

0

I have php5 5.5.8 on my Trusty Ubuntu, so you have to upgrade your ubuntu to a newer version to get a more recent php5. Edit /etc/apt/sources.list, replace the version with a newer one (like trusty or saucy), and apt-get upgrade will bring you the most recent one.

Ron
  • 20,938
0

As you'll be able to see from the php5-oldstable PPA page the current version in there is 5.4.23. If you're not seeing that:

  • You either haven't followed that post correctly (have you run an apt-get update? did you add the repo properly?) Double check.
  • You're not running a supported version of Ubuntu. The PPA caters to Lucid, Precise, Quantal and Raring. Not Saucy. If you PHP5 for a different version of Ubuntu, check the Ondřej Surý's main PHP5 PPA.
Oli
  • 299,380
0

Get the latest stable release of PHP:

Open a terminal(Ctrl+Alt+t) and cd to the directory where you downloaded the tar ball and then type:

tar -zxvf php-5.5.8.tar.gz

After the extraction has completed, type

cd php-5.5.8
./configure
make
sudo make install

Log out and log in to reload all packages that depend on PHP and you will have PHP version 5.5.8!

For a detailed instruction manual, refer to the INSTALL file in the extracted directory and scroll down to Installation on Unix systems.


Before updating, when I did php --version, I got:

PHP 5.4.6-1ubuntu1.5 (cli) (built: Dec 12 2013 04:39:44) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

After updating, php --version gives me:

PHP 5.5.8 (cli) (built: Jan 22 2014 21:12:05) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
jobin
  • 28,567