Comments on How to install PHP 7 (PHP-FPM & FastCGI) for ISPConfig 3 on Debian 8 (Jessie)

This tutorial shows how to build the new PHP 7 (Beta) as a PHP-FPM and a FastCGI version on Debian 8 (Jessie). PHP 7 is up to 2 times faster then php 5.6 and 14 times faster then php 5.0 according to the release notes.

18 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: rober

Hi!

This Guide work also with Ubuntu 15.04?

By: till

Yes, I think it should work for the latest Ubuntu version as well.

By: Joern

It dont work for me. Installed it without error, but if I want to choose it in ISPconfig, it just jumps back to default if I want to safe the selected PHP Option :(

By: Sunil

how to update php7.0.0 beta1 beta2 with php7.0.0? Thank you

By: till

Red the same steps with 7.0 final.

By: DjYXA

the ./configure option has --with-mysqli two times.. Change the first --with-mysqli with --with-mysql like this:

./configure --prefix=/opt/php-7.0.0 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-mysql --with-pdo-mysql --with-mysqli --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-openssl --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-imap --with-imap-ssl --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm

By: Andreas

I've followed this tutorial on a basically fresh install of Debian 8 and ISPConfig 3 and seen that I lack mysql support aside mysqli. So I changed the configure command options as someone pointed out here just to get

configure: WARNING: unrecognized options: --with-mysql

 

Any ideas?

 

I'm trying to run Textpattern which still has mysql, not mysqli..

By: Madalin Ignisca

Hello Andreas.

The MySQL extension has been removed from PHP 7: http://php.net/manual/en/function.mysql-info.php

To have the old extension, you should use the latest version of PHP 5.4 for best support with it.

You could use multiple PHP versions very easy and with ISPConfig's help or even manually.

By: Marek

Its bad becose ispconfig still generate conf file with socket system, which goes to 502 Bad Gateway. Is there any solution with php 7 and socket system instead of pool listening?

By: till

ISPConfig supports both modes, socket and port and the PHP 7 configuration above works in ispconfig with socket and port mode.

By: Mtx

Hello. Thanks a lot for this tutorial, really comprehensive. 

I'm using it to setup PHP7 with nginx server. And those words make me ask this question "Please note that PHP-FPM can be used on both Apache and nginx servers, while FastCGI is available only for Apache servers.".

With PHP 5.x, i was using PHP-fpm with fastCGI to process PHP scripts (from my nginx conf files). But with those words, i dont know if I'll be able to.

So following this, i'll not be able to use fastCGI socket to pass my PHP script ? Do we need to wait for PHP7 final build ?

thanks a lot !

 

By: till

The current PHP 7 release will work for nginx setups as well.

By: Jürgen Dorn

Hi, thanks for your guide but I had issue to establish a database connection using PHP 7 , maybe due to usign mariadb, from what I found in the apache logs. So I configured using the correct header paths

--with-mysqli=/usr/bin/mysql_config --with-pdo-mysql=/usr

finally looks like:

./configure --prefix=/opt/php-7 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-mysqli=/usr/bin/mysql_config --with-pdo-mysql=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-openssl --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-imap --with-imap-ssl --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm

 

By: Thomas

Hi, I tried to add php7 as an additional php version on my server. It runs on Ubunto 14.04.3 LTS and the latest version of ISPConfig3. All packages are up to date.

I followed the tutorial until step

insserv php-7.0.0-fpm

and used

update-rc.d php-7.0.0-fpm defaults

/etc/init.d/php-7.0.0-fpm start

instead.

But now I run in to the following error:

-bash: /etc/init.d/php-7.0.0-fpm: /bin/sh^M: bad interpreter: No such file or directory

Does someone have an Idea, where I went wrong?

Cheers and Happy Holidays!

By: till

Checj the init file that you created, it seems as if it contains windows linebreaks ^M instead of Linux linebreaks.

By: DjYXA

Change the fpm sock for this in nginx conf -> fastcgi_pass 127.0.0.1:8999;

And... voilá, fastCGI on nginx Ó_ò

By: gdecris

Would it be possible to add a status to the service commands? besides that this is great

By: franck

Thanks for this useful guide ! I suggest adding --with-inconv and --enable-intl build options, as these packages are often used by frameworks such as Symfony.