HOW to change PHP version from v 5.5.9 to v 5.6.16
You can use phpbrew
on Cloud9. I found that the standard installation process works fine, just run the commands below.
We first install the libmcrypt-dev
package to avoid running into dependency issues during build:
$ sudo apt-get update
$ sudo apt-get install libmcrypt-dev
Next, we download phpbrew
and move it to /usr/local/bin
:
$ curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew
$ chmod +x phpbrew
$ sudo mv phpbrew /usr/local/bin/
$ phpbrew init
# add this to your ~/.bashrc
$ [[ -e ~/.phpbrew/bashrc ]] && source ~/.phpbrew/bashrc
$ phpbrew lookup-prefix ubuntu
Once set up, we install and load PHP 5.6:
$ phpbrew install 5.6 +default
$ phpbrew switch php-5.6.16
$ phpbrew use php-5.6.16
$ php -v
PHP 5.6.16 (cli) (built: Dec 29 2015 21:31:19)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies