PHPBrew on PHP workspaces



The workspaces seem to come with nvm and rvm installed. Perhaps should be installed as well. It is the leader in the equivalents among PHP as far as I can tell.

Anyway, I just installed phpbrew. Just follow the instructions:

curl -L -O
chmod +x phpbrew
sudo mv phpbrew /usr/local/bin/phpbrew

I used sudo -s to create a new shell and do it because I’m still new to this, but it seems like you’re given root privileges anyway so that may not be necessary.

Use PHP7 in workspaces by default

@jcrben: how do you setup PHP 7 after the third command? I’m not familiar with phpbrew. Thanks.


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
$ 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


@xoob Thanks! I was composing the exact same post.

I will share this repo ( for a fast install of the useful stuff I use on C9 workspaces. Fork it first.

git clone
sh CloudDeploymentManager/
#Install PHP 5.6.10 and set it as the version used.
sh CloudDeploymentManager/

There is one manual input in your ~/.bashrc file during the execution.

You can tweak the version of PHP in as you fancy .

Unable to start my apache after trying to upgrade php 5.6.34 version

Thank you, the script works great!
Except, last line should include the version number

sh CloudDeploymentManager/ 5.6