Running PHP7-FPM Nightly Build on Ubuntu 14.04

As I’m writing this, the calendar shows April 14 2015. According to the PHP 7.0 timeline, it has a projected release date of November 2015. But if you want to try it out (to check out the speed), you can already do so.

UPDATE: PHP 7 stable was released December 3, 2015.
You might want to use a stable version instead of nightlies,
so head over to How to upgrade to PHP 7 on Ubuntu.

This guide assumes you already know how to setup PHP5-FPM with your web server. You might want to setup that first and make sure it is running fine with your web server of choice.

Oh, and all commands are executed as root. Use sudo if you like to.

First of all, head on over to the PHP7 Nightly Builds page at Zend and download the ZIP for DEB.

(The URL may or may not change, so check the above mentioned page first).

Zend also provides an installation guide for Ubuntu. It is missing documentation for installing as FPM, but we can at least use it as a starting point.

Install the required dependencies according to the Zend install guide mentioned (again, check the Zend page first):

Then, unpack the archive. Note that the following command will unpack to /usr/local/php7 – Also note that the command on the Zend page uses an incorrect file name:

Now you need to create your php-fpm.conf (use /usr/local/php7/etc/php-fpm.conf for your sanity). Use this as a starting point and adjust to your liking:

Make sure the listen config does not collide with your php5-fpm config. Change port or socket file name if needed.

Next, you need the System V init script in /etc/init.d/php7-fpm. I took the php5-fpm script from Ondřej Surý as a basis and just fixed the paths to php7-fpm. Feel free to download it here and make it executable:

Then you need the init script in /etc/init/php7-fpm.conf. This one is also just an adaptation of Ondřej Surý’s script. Download from here.

You also need the checkconf script. Create the file /usr/local/lib/php7-fpm-checkconf and put this in it:

Make it executable:

Make sure php7-fpm starts when your system boots:

Start php7-fpm

Have fun!

There are 7 comments

I love comments that bring new insights, shares ideas and experiences, and most of all: corrects my mistakes. For support questions, there are other fora, like Stack Overflow, Server Fault and the WordPress support forum.

Your email address will not be published. Required fields are marked *