A Blog Of Random Coding Techniques & Experiments Robert Askam

Upgrade Cloud9 PHP to 7.1.14 for Laravel 5.3 installation Post Upgrade Cloud9 PHP to 7.1.14 for Laravel 5.3 installation 1 year ago

When trying to add Laravel 5.3 to Cloud9 composer was failing to run because the PHP version was to low. To upgrade the PHP to version 7.1.14 follow these steps.

sudo apt-get update


sudo apt-get install libmcrypt-dev


Next we download a package that is used to build and install multiple versions of PHP in your $HOME directory.

curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew
chmod +x phpbrew
sudo mv phpbrew /usr/local/bin/
phpbrew init

#In your ~/.bashrc add this
[[ -e ~/.phpbrew/bashrc ]] && source ~/.phpbrew/bashrc

#Open a new terminal
phpbrew lookup-prefix ubuntu


Lets load PHP

phpbrew install 7.0 +default
phpbrew switch php-7.0.14
phpbrew use php-7.0.14


Use php-v to see the version. Should now state 7.0.14