Posted in Code on August 22nd, 2014

Upgrading Laravel Homestead to PHP 5.6

Note that while these steps will still allow you to easily update your Forge servers running Ubuntu, there is now a much simpler way to update your Homestead instances to PHP 5.6; simply run vagrant box update from the command line.

PHP 5.6 is nearly upon us! According to PHP.net, the last minor upgrade to PHP 5 will be released on August 28th, bringing with it some powerful and exciting new features including variadic functions, argument unpacking, function and constant importing, constant scalar expressions, the exponentiation operator, a new interactive debugger, and more.

The great news for Laravel Homestead users is that even though it will be some time before Ubuntu installations are shipped with the new version by default, using the popular Ondrej Personal Package Archive (PPA), the upgrade process is surprisingly smooth.

Add the Package Archive

The first step is to add the PHP 5.6 PPA to Homestead's list of package repositories. To do this, we SSH into our Homestead box and add the repository, like so:


 
 
 
root@coderabbi:~/home/blog$
sudo apt-add-repository ppa:ondrej/php5-5.6_ 

We'll be prompted to hit [enter] along the way and the output should look like this:

root@coderabbi:~/home/blog$ sudo apt-add-repository ppa:ondrej/php5-5.6
This branch follows latest PHP 5.6 packages as maintained by me & rest of the Debian pkg-php team.
 
You can get more information about the packages at https://sury.org
 
For PHP 5.5 use: ppa:ondrej/php5
For PHP 5.4 use: ppa:ondrej/php5-oldstable
 
BUGS&FEATURES: This PPA now has a issue tracker: https://deb.sury.org/pages/bugreporting.html
 
PLEASE READ: If you like my work and want to give me a little motivation, please consider donating: https://deb.sury.org/pages/donate.html
More info: https://launchpad.net/~ondrej/+archive/ubuntu/php5-5.6
Press [ENTER] to continue or ctrl-c to cancel adding it
 
gpg: keyring `/tmp/tmprvkdw9h4/secring.gpg' created
gpg: keyring `/tmp/tmprvkdw9h4/pubring.gpg' created
gpg: requesting key E5267A6C from hkp server keyserver.ubuntu.com
gpg: /tmp/tmprvkdw9h4/trustdb.gpg: trustdb created
gpg: key E5267A6C: public key "Launchpad PPA for Ondřej Surý" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
root@coderabbi:~/home/blog$ _ 

Update the Package Database

Next, we'll update the local packages database:


 
 
 
root@coderabbi:~/home/blog$
sudo apt-get update_

The resulting output should end up looking something like this:

root@coderabbi:~/home/blog$ sudo apt-get update
Ign http://ppa.launchpad.net trusty InRelease
Ign http://security.ubuntu.com trusty-security InRelease
Ign http://archive.ubuntu.com trusty InRelease
Ign http://ppa.launchpad.net trusty InRelease
Get:1 http://security.ubuntu.com trusty-security Release.gpg [933 B]
Ign http://archive.ubuntu.com trusty-updates InRelease
Ign http://ppa.launchpad.net trusty InRelease
Hit http://archive.ubuntu.com trusty Release.gpg
Get:2 http://security.ubuntu.com trusty-security Release [59.7 kB]
Ign http://ppa.launchpad.net trusty InRelease
Get:3 http://archive.ubuntu.com trusty-updates Release.gpg [933 B]
Ign http://ppa.launchpad.net trusty InRelease
Hit http://archive.ubuntu.com trusty Release
Get:4 http://ppa.launchpad.net trusty Release.gpg [316 B]
Get:5 http://archive.ubuntu.com trusty-updates Release [59.7 kB]
Hit http://ppa.launchpad.net trusty Release.gpg
Get:6 http://security.ubuntu.com trusty-security/main Sources [41.4 kB]
Get:7 http://ppa.launchpad.net trusty Release.gpg [316 B]
Get:8 http://ppa.launchpad.net trusty Release.gpg [316 B]
Get:9 http://security.ubuntu.com trusty-security/universe Sources [11.3 kB]
Hit http://ppa.launchpad.net trusty Release.gpg
Hit http://archive.ubuntu.com trusty/main Sources
Get:10 http://security.ubuntu.com trusty-security/main amd64 Packages [132 kB]
Get:11 http://ppa.launchpad.net trusty Release [14.0 kB]
Hit http://archive.ubuntu.com trusty/universe Sources
Hit http://ppa.launchpad.net trusty Release
Hit http://archive.ubuntu.com trusty/main amd64 Packages
Get:12 http://ppa.launchpad.net trusty Release [14.0 kB]
Hit http://archive.ubuntu.com trusty/universe amd64 Packages
Get:13 http://ppa.launchpad.net trusty Release [14.0 kB]
Get:14 http://security.ubuntu.com trusty-security/universe amd64 Packages [46.6 kB]
Hit http://ppa.launchpad.net trusty Release
Get:15 http://security.ubuntu.com trusty-security/main Translation-en [64.2 kB]
Get:16 http://ppa.launchpad.net trusty/main amd64 Packages [1,133 B]
Get:17 http://security.ubuntu.com trusty-security/universe Translation-en [26.8 kB]
Hit http://archive.ubuntu.com trusty/main Translation-en
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://archive.ubuntu.com trusty/universe Translation-en
Get:18 http://archive.ubuntu.com trusty-updates/main Sources [110 kB]
Get:19 http://ppa.launchpad.net trusty/main amd64 Packages [19.3 kB]
Get:20 http://archive.ubuntu.com trusty-updates/universe Sources [76.6 kB]
Get:21 http://ppa.launchpad.net trusty/main amd64 Packages [21.2 kB]
Get:22 http://archive.ubuntu.com trusty-updates/main amd64 Packages [296 kB]
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Get:23 http://archive.ubuntu.com trusty-updates/universe amd64 Packages [184 kB]
Get:24 http://archive.ubuntu.com trusty-updates/main Translation-en [130 kB]
Get:25 http://archive.ubuntu.com trusty-updates/universe Translation-en [90.6 kB]
Ign http://ppa.launchpad.net trusty/main Translation-en_US
Ign http://archive.ubuntu.com trusty/main Translation-en_US
Ign http://ppa.launchpad.net trusty/main Translation-en
Ign http://archive.ubuntu.com trusty/universe Translation-en_US
Ign http://ppa.launchpad.net trusty/main Translation-en_US
Ign http://ppa.launchpad.net trusty/main Translation-en
Ign http://ppa.launchpad.net trusty/main Translation-en_US
Ign http://ppa.launchpad.net trusty/main Translation-en
Ign http://ppa.launchpad.net trusty/main Translation-en_US
Ign http://ppa.launchpad.net trusty/main Translation-en
Ign http://ppa.launchpad.net trusty/main Translation-en_US
Ign http://ppa.launchpad.net trusty/main Translation-en
Fetched 1,416 kB in 6s (214 kB/s)
Reading package lists... Done
root@coderabbi:~/home/blog$ _ 

Install PHP 5.6

Finally, we can install PHP 5.6, like this:


 
 
 
root@coderabbi:~/home/blog$ sudo apt-get install php5_ 

We will be prompted to confirm the installation by pressing [y]. This will result in a long series of output followed by two visual prompts, which look like this:


In both cases we need to select the highlighted option "Keep the local version currently installed".

After the two visual prompts, we'll see another long stream of output. At the end of this process we might notice that it attempts to start Apache and fails. This is okay as Homestead uses Nginx. It will do this three times before the installation process completes. The result should look similar to this:

root@coderabbi:~/home/blog$ sudo apt-get install php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
apache2 apache2-bin apache2-data libapache2-mod-php5 libapr1 libaprutil1
libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.1-0 php5-apcu php5-cli
php5-common php5-curl php5-fpm php5-gd php5-gmp php5-imap php5-json
php5-mcrypt php5-memcached php5-mysqlnd php5-pgsql php5-readline php5-redis
php5-sqlite
Suggested packages:
apache2-doc apache2-suexec-pristine apache2-suexec-custom apache2-utils
The following packages will be REMOVED:
php5-xdebug
The following NEW packages will be installed:
apache2 apache2-bin apache2-data libapache2-mod-php5 libapr1 libaprutil1
libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.1-0 php5
The following packages will be upgraded:
php5-apcu php5-cli php5-common php5-curl php5-fpm php5-gd php5-gmp php5-imap
php5-json php5-mcrypt php5-memcached php5-mysqlnd php5-pgsql php5-readline
php5-redis php5-sqlite
16 upgraded, 10 newly installed, 1 to remove and 63 not upgraded.
Need to get 9,191 kB of archives.
After this operation, 15.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu/ trusty/main liblua5.1-0 amd64 5.1.5-5 [173 kB]
Get:2 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main libapr1 amd64 1.5.1-2+deb.sury.org~trusty+1 [90.3 kB]
Get:3 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main libaprutil1 amd64 1.5.3-2+deb.sury.org~trusty+1 [80.1 kB]
Get:4 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5-readline amd64 5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1 [12.1 kB]
Get:5 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5-imap amd64 5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1 [30.2 kB]
Get:6 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5-cli amd64 5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1 [2,127 kB]
Get:7 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5-mcrypt amd64 5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1 [14.7 kB]
Get:8 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5-fpm amd64 5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1 [2,142 kB]
Get:9 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5-curl amd64 5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1 [27.4 kB]
Get:10 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5-sqlite amd64 5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1 [24.4 kB]
Get:11 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5-gd amd64 5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1 [28.0 kB]
Get:12 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5-gmp amd64 5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1 [19.8 kB]
Get:13 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5-mysqlnd amd64 5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1 [138 kB]
Get:14 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5-pgsql amd64 5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1 [56.2 kB]
Get:15 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5-apcu amd64 4.0.6-1+deb.sury.org~trusty+1 [80.1 kB]
Get:16 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5-redis amd64 2.2.5-1+deb.sury.org~trusty+1 [112 kB]
Get:17 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5-memcached amd64 2.2.0-1+deb.sury.org~trusty+1 [55.7 kB]
Get:18 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5-common amd64 5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1 [537 kB]
Get:19 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5-json amd64 1.3.6-1+deb.sury.org~trusty+1 [18.6 kB]
Get:20 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main libaprutil1-dbd-sqlite3 amd64 1.5.3-2+deb.sury.org~trusty+1 [16.3 kB]
Get:21 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main libaprutil1-ldap amd64 1.5.3-2+deb.sury.org~trusty+1 [14.4 kB]
Get:22 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main apache2-bin amd64 2.4.10-1+deb.sury.org~trusty+1 [933 kB]
Get:23 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main apache2-data all 2.4.10-1+deb.sury.org~trusty+1 [162 kB]
Get:24 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main apache2 amd64 2.4.10-1+deb.sury.org~trusty+1 [143 kB]
Get:25 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main libapache2-mod-php5 amd64 5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1 [2,154 kB]
Get:26 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5 all 5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1 [1,272 B]
Fetched 9,191 kB in 6s (1,427 kB/s)
(Reading database ... 70093 files and directories currently installed.)
Removing php5-xdebug (2.2.5-1+deb.sury.org~trusty+1) ...
php5_invoke prerm: Disable module xdebug for fpm SAPI
php5_invoke prerm: Disable module xdebug for cli SAPI
Selecting previously unselected package libapr1:amd64.
(Reading database ... 70089 files and directories currently installed.)
Preparing to unpack .../libapr1_1.5.1-2+deb.sury.org~trusty+1_amd64.deb ...
Unpacking libapr1:amd64 (1.5.1-2+deb.sury.org~trusty+1) ...
Selecting previously unselected package libaprutil1:amd64.
Preparing to unpack .../libaprutil1_1.5.3-2+deb.sury.org~trusty+1_amd64.deb ...
Unpacking libaprutil1:amd64 (1.5.3-2+deb.sury.org~trusty+1) ...
Selecting previously unselected package liblua5.1-0:amd64.
Preparing to unpack .../liblua5.1-0_5.1.5-5_amd64.deb ...
Unpacking liblua5.1-0:amd64 (5.1.5-5) ...
Preparing to unpack .../php5-readline_5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5-readline (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) over (5.5.15~rc1+dfsg-1+deb.sury.org~trusty+1) ...
Preparing to unpack .../php5-imap_5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5-imap (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) over (5.5.15~rc1+dfsg-1+deb.sury.org~trusty+1) ...
Preparing to unpack .../php5-cli_5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5-cli (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) over (5.5.15~rc1+dfsg-1+deb.sury.org~trusty+1) ...
Preparing to unpack .../php5-mcrypt_5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5-mcrypt (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) over (5.5.15~rc1+dfsg-1+deb.sury.org~trusty+1) ...
Preparing to unpack .../php5-fpm_5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1_amd64.deb ...
php5-fpm stop/waiting
Unpacking php5-fpm (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) over (5.5.15~rc1+dfsg-1+deb.sury.org~trusty+1) ...
Preparing to unpack .../php5-curl_5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5-curl (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) over (5.5.15~rc1+dfsg-1+deb.sury.org~trusty+1) ...
Preparing to unpack .../php5-sqlite_5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5-sqlite (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) over (5.5.15~rc1+dfsg-1+deb.sury.org~trusty+1) ...
Preparing to unpack .../php5-gd_5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5-gd (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) over (5.5.15~rc1+dfsg-1+deb.sury.org~trusty+1) ...
Preparing to unpack .../php5-gmp_5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5-gmp (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) over (5.5.15~rc1+dfsg-1+deb.sury.org~trusty+1) ...
Preparing to unpack .../php5-mysqlnd_5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5-mysqlnd (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) over (5.5.15~rc1+dfsg-1+deb.sury.org~trusty+1) ...
Preparing to unpack .../php5-pgsql_5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5-pgsql (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) over (5.5.15~rc1+dfsg-1+deb.sury.org~trusty+1) ...
Preparing to unpack .../php5-apcu_4.0.6-1+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5-apcu (4.0.6-1+deb.sury.org~trusty+1) over (4.0.6-1+deb.sury.org~trusty+1) ...
Preparing to unpack .../php5-redis_2.2.5-1+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5-redis (2.2.5-1+deb.sury.org~trusty+1) over (2.2.5-1+deb.sury.org~trusty+1) ...
Preparing to unpack .../php5-memcached_2.2.0-1+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5-memcached (2.2.0-1+deb.sury.org~trusty+1) over (2.2.0-1+deb.sury.org~trusty+1) ...
Preparing to unpack .../php5-common_5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5-common (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) over (5.5.15~rc1+dfsg-1+deb.sury.org~trusty+1) ...
Preparing to unpack .../php5-json_1.3.6-1+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5-json (1.3.6-1+deb.sury.org~trusty+1) over (1.3.5-3+deb.sury.org~trusty+1) ...
dpkg: warning: unable to delete old directory '/usr/lib/php5/20121212': Directory not empty
Selecting previously unselected package libaprutil1-dbd-sqlite3:amd64.
Preparing to unpack .../libaprutil1-dbd-sqlite3_1.5.3-2+deb.sury.org~trusty+1_amd64.deb ...
Unpacking libaprutil1-dbd-sqlite3:amd64 (1.5.3-2+deb.sury.org~trusty+1) ...
Selecting previously unselected package libaprutil1-ldap:amd64.
Preparing to unpack .../libaprutil1-ldap_1.5.3-2+deb.sury.org~trusty+1_amd64.deb ...
Unpacking libaprutil1-ldap:amd64 (1.5.3-2+deb.sury.org~trusty+1) ...
Selecting previously unselected package apache2-bin.
Preparing to unpack .../apache2-bin_2.4.10-1+deb.sury.org~trusty+1_amd64.deb ...
Unpacking apache2-bin (2.4.10-1+deb.sury.org~trusty+1) ...
Selecting previously unselected package apache2-data.
Preparing to unpack .../apache2-data_2.4.10-1+deb.sury.org~trusty+1_all.deb ...
Unpacking apache2-data (2.4.10-1+deb.sury.org~trusty+1) ...
Selecting previously unselected package apache2.
Preparing to unpack .../apache2_2.4.10-1+deb.sury.org~trusty+1_amd64.deb ...
Unpacking apache2 (2.4.10-1+deb.sury.org~trusty+1) ...
Selecting previously unselected package libapache2-mod-php5.
Preparing to unpack .../libapache2-mod-php5_5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1_amd64.deb ...
Unpacking libapache2-mod-php5 (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) ...
Selecting previously unselected package php5.
Preparing to unpack .../php5_5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1_all.deb ...
Unpacking php5 (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) ...
Processing triggers for man-db (2.6.7.1-1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up libapr1:amd64 (1.5.1-2+deb.sury.org~trusty+1) ...
Setting up libaprutil1:amd64 (1.5.3-2+deb.sury.org~trusty+1) ...
Setting up liblua5.1-0:amd64 (5.1.5-5) ...
Setting up php5-common (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) ...
Installing new version of config file /etc/cron.d/php5 ...
php5_invoke: Enable module pdo for apache2 SAPI
php5_invoke: Enable module opcache for apache2 SAPI
Setting up php5-json (1.3.6-1+deb.sury.org~trusty+1) ...
php5_invoke: Enable module json for apache2 SAPI
Setting up php5-cli (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) ...
Setting up php5-readline (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) ...
php5_invoke: Enable module readline for apache2 SAPI
Setting up php5-imap (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) ...
php5_invoke: Enable module imap for apache2 SAPI
Setting up php5-mcrypt (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) ...
php5_invoke: Enable module mcrypt for apache2 SAPI
Setting up php5-fpm (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) ...
php5-fpm start/running, process 6624
Setting up php5-curl (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) ...
php5_invoke: Enable module curl for apache2 SAPI
Setting up php5-sqlite (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) ...
php5_invoke: Enable module sqlite3 for apache2 SAPI
php5_invoke: Enable module pdo_sqlite for apache2 SAPI
Setting up php5-gd (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) ...
php5_invoke: Enable module gd for apache2 SAPI
Setting up php5-gmp (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) ...
php5_invoke: Enable module gmp for apache2 SAPI
Setting up php5-mysqlnd (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) ...
php5_invoke: Enable module mysqlnd for apache2 SAPI
php5_invoke: Enable module mysql for apache2 SAPI
php5_invoke: Enable module mysqli for apache2 SAPI
php5_invoke: Enable module pdo_mysql for apache2 SAPI
Setting up php5-pgsql (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) ...
php5_invoke: Enable module pgsql for apache2 SAPI
php5_invoke: Enable module pdo_pgsql for apache2 SAPI
Setting up php5-apcu (4.0.6-1+deb.sury.org~trusty+1) ...
php5_invoke: Enable module apcu for apache2 SAPI
Setting up php5-redis (2.2.5-1+deb.sury.org~trusty+1) ...
php5_invoke: Enable module redis for apache2 SAPI
Setting up php5-memcached (2.2.0-1+deb.sury.org~trusty+1) ...
Setting up libaprutil1-dbd-sqlite3:amd64 (1.5.3-2+deb.sury.org~trusty+1) ...
Setting up libaprutil1-ldap:amd64 (1.5.3-2+deb.sury.org~trusty+1) ...
Setting up apache2-bin (2.4.10-1+deb.sury.org~trusty+1) ...
Setting up apache2-data (2.4.10-1+deb.sury.org~trusty+1) ...
Setting up apache2 (2.4.10-1+deb.sury.org~trusty+1) ...
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
* Starting web server apache2
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
*
* The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
invoke-rc.d: initscript apache2, action "start" failed.
Setting up php5 (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up libapache2-mod-php5 (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) ...
 
Creating config file /etc/php5/apache2/php.ini with new version
Module mpm_event disabled.
Enabling module mpm_prefork.
apache2_switch_mpm Switch to prefork
* Restarting web server apache2
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
[fail]
* The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
invoke-rc.d: initscript apache2, action "restart" failed.
apache2_invoke: Enable module php5
* Restarting web server apache2
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
[fail]
* The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
invoke-rc.d: initscript apache2, action "restart" failed.
Processing triggers for libc-bin (2.19-0ubuntu6) ...
Processing triggers for php5-fpm (5.6.0~rc4+dfsg-4+deb.sury.org~trusty+1) ...
php5-fpm stop/waiting
php5-fpm start/running, process 10317
root@coderabbi:~/home/blog$ _ 

Enjoy

That's it! If we check the PHP version using using php -v, we'll see that we're now running the most recent version¹:


 
root@coderabbi:~/home/blog$
php -v
PHP 5.6.0RC4 (cli) (built: Aug 19 2014 15:47:31)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0-dev, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
root@coderabbi:~/home/blog$ _ 

Total elapsed time: about 5 minutes... Now go explore some of those great new features!

Update: Don't feel as though you must perform the upgrade yourself. This is really intended for those who want to explore the Release Candidate or who simply can't wait for August 28th. If you're one of those developers who actually has a shred of patience (not me!), Taylor will be updating the primary Homestead image and will provide a simple upgrade path:



¹ The most recent version at the time of this writing is 5.6.0RC4, but these instructions will result in a fully updated version 5.6.0 shortly after August 28th (allowing time for the package archive maintainer to update the repository).
 
 
Applies to:
  • Laravel Homestead 4.2.*

Updated:   September 1st, 2014