10

php -v shows me this

PHP 5.5.9-1ubuntu4.19 (cli) (built: Jul 28 2016 19:31:33) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

I want to upgrade it to php 5.6.4

I am not sure for the solutions i found who had php 5.5.9deb versions.

2
  • what makes you not sure about the solutions you found ? Please give more details to give you a better answer to your question.
    – 0x0C4
    Aug 24, 2016 at 6:16
  • I just wanted to be sure that what i am doing is not just copy and paste but understanding the reason for it.
    – Samvedna
    Aug 24, 2016 at 6:24

1 Answer 1

18

Found the answer here:

sudo apt-get -y update
sudo add-apt-repository ppa:ondrej/php
sudo apt-get -y update
sudo apt-get -y install php5.6 php5.6-mcrypt php5.6-mbstring php5.6-curl php5.6-cli php5.6-mysql php5.6-gd php5.6-intl php5.6-xsl php5.6-zip
php -v
4
  • 1
    verified working as of star date: 2016 december 12 Dec 12, 2016 at 7:05
  • I did this and the final command output: PHP 5.6.30-5+deb.sury.org~trusty+2 (cli) not 5.6.4 Feb 23, 2017 at 12:06
  • Verified today: Ubuntu 14.04, php 5.5.4 > 5.6.30-7
    – Jacksonkr
    Mar 7, 2017 at 18:20
  • The reference link is not pointing to a working page. Feb 8, 2023 at 4:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .