Comments on How to install PHP 7.1.16 as PHP-FPM & FastCGI for ISPConfig 3.1 on Debian 8 (Jessie)

This tutorial shows how to build PHP 7.1 as a PHP-FPM and a FastCGI version on Debian 8 (Jessie) which can also be used for the multi PHP version function in the ISPConfig Hosting Control Panel. This PHP 7.1 build includes many compiled in extensions and Zend OPcache and Memcached as loadable modules.

71 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Alaska

Hello,First off, I love ISPConfig :)I followed the tuto for the perfect debian jessie server, I don't think this is a huge problem since the step was optional but thought I would mention, tried using this tuto to add php 7 and got this error when installing memcache:

 

root@host:/usr/local/src/php7-build/php-memcache/php-memcached-php7# /opt/php-7.1/bin/phpize

Configuring for:

PHP Api Version:         20160303

Zend Module Api No:      20160303

Zend Extension Api No:   320160303

root@host:/usr/local/src/php7-build/php-memcache/php-memcached-php7# ./configure --with-php-config=/opt/php-7.1/bin/php-config

checking for grep that handles long lines and -e... /bin/grep

checking for egrep... /bin/grep -E

checking for a sed that does not truncate output... /bin/sed

checking for cc... cc

checking whether the C compiler works... yes

checking for C compiler default output file name... a.out

checking for suffix of executables...

checking whether we are cross compiling... no

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether cc accepts -g... yes

checking for cc option to accept ISO C89... none needed

checking how to run the C preprocessor... cc -E

checking for icc... no

checking for suncc... no

checking whether cc understands -c and -o together... yes

checking for system library directory... lib

checking if compiler supports -R... no

checking if compiler supports -Wl,-rpath,... yes

checking build system type... x86_64-unknown-linux-gnu

checking host system type... x86_64-unknown-linux-gnu

checking target system type... x86_64-unknown-linux-gnu

checking for PHP prefix... /opt/php-7.1

checking for PHP includes... -I/opt/php-7.1/include/php -I/opt/php-7.1/include/php/main -I/opt/php-7.1/include/php/TSRM -I/opt/php-7.1/include/php/Zend -I/opt/php-7.1/include/php/ext -I/opt/php-7.1/include/php/ext/date/lib

checking for PHP extension directory... /opt/php-7.1/lib/php/extensions/no-debug-non-zts-20160303

checking for PHP installed headers prefix... /opt/php-7.1/include/php

checking if debug is enabled... no

checking if zts is enabled... no

checking for re2c... re2c

checking for re2c version... 0.13.5 (ok)

checking for gawk... no

checking for nawk... nawk

checking if nawk is broken... no

checking whether to enable memcached support... yes, shared

checking for libmemcached... yes, shared

checking whether to enable memcached session handler support... yes

checking whether to enable memcached igbinary serializer support... no

checking whether to enable memcached json serializer support... no

checking whether to enable memcached msgpack serializer support... no

checking whether to enable memcached sasl support... yes

checking whether to enable memcached protocol support... no

checking whether to use system FastLZ bibrary... no

checking for ZLIB... yes, shared

checking for pkg-config... no

pkg-config not found

configure: error: Please reinstall the pkg-config distribution

root@host:/usr/local/src/php7-build/php-memcache/php-memcached-php7# make

make: *** No targets specified and no makefile found.  Stop.

 

By: till

Maybe you missed installing the build-essential package?

run:

 

apt-get install build-essential

 

if this won't help, then install the missing package manually with:

 

apt-get install pkg-config

By: Cli69

Indeed !

apt-get install pkg-config

thanks

By: Lenny

I can't pass through step 2 (Debian 8.6, sources.list - main contrib non-free)

E: Unable to locate package libc-client2007e-dev libxml2-dev libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev libfreetype6-dev libkrb5-dev libpq-devE: Unable to locate package libxml2-dev libxslt1-dev

Thanks for help

By: till

The packages are available here on my Debian 8.6. The sources.list is:

 

deb http://ftp.us.debian.org/debian/ jessie main contrib non-freedeb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free

deb http://security.debian.org/ jessie/updates main contrib non-freedeb-src http://security.debian.org/ jessie/updates main contrib non-free

By: rene

Enable Memcache (optional)

gives me the follwing error on Debian 8.6

checking for pkg-config... no

pkg-config not found

configure: error: Please reinstall the pkg-config distribution

By: till

See posts above.

By: thctlo

Hai, to get the build dependecy fixed, and easy fix/try is. add the sid source line to the sources.list. deb-src http://ftp.us.debian.org/debian/ sid main contrib non-free

run apt-get update

run : apt-get build-dep php7.0 i dont think the depencies changed much here. Packages that didnt install due to version mismatch, install these manually. now compile php7.1

 

By: thctlo

Till, i forgot to ask. If i setup on debian jessie and i create debian packages for php7(.1)( like the debdot versions php7.0 ) Can we still mix php5.6 with php7.x on debian jessie even with only debian packages installed? im asking this because only create debian packages and install with apt.

Source/compiling software is not allowed on my servers, so its a bit more difficult sometimes to setup.

 

By: Alfio Saitta

Please, add the intl extension

apt-get install libfcgi-dev libfcgi0ldbl libjpeg62-turbo-dbg libmcrypt-dev libssl-dev libc-client2007e libc-client2007e-dev libxml2-dev libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev libfreetype6-dev libkrb5-dev libpq-dev libxml2-dev libxslt1-dev libicu-dev

 ./configure --prefix=/opt/php-7.1 --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-pdo-mysql --with-mysqli --with-mysql-sock=/var/run/mysqld/mysqld.sock --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 --enable-intl

By: M1r

for php_intl error:configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.

 

apt-get install libicu-dev

By: Johnymas

Hi,

I got an error on ubuntu lts 16.04

E: Unable to locate package libjpeg62-turbo-dbg

Any suggestion?

By: till

This tutorial is for Debian 8 only, not Ubuntu. The pacjage names on Ubuntu are different.

By: Johnymas

Ok, thanks.

Till, is there any tutorial to install PHP 7.1 as PHP-FPM & FastCGI for ISPConfig 3.1 on ubuntu lts 16.04?

By: V-II

so i've updated and installed 7.1 - appears to be going good..

biggest question...

what about updates?

another package i use is i-mscp.net 

they utilize a script to update the /opt/php7 - /opt/php5.6 - /opt/php/7.1 folders when a new version is released

 

When an updated 7.1 version is released do we need to remove the service so we can continue to use the port?

would be good to upate the existing links and use a master location that is updated when a version is updated. 

 

Client picks 7.0 / 7.1 / 5.6 - updates happen under them...

----

haven't seen how ISPCP would update vs just installing a new one and manually changing sites then deleting and backing out every change - eventually using up a crazy amount of listen ports!?! if not removed manually?

By: till

Compile the new version into the same folder and restart php-fpm. Or you use folders for the sub versions like /opt/php/7.1.0, /opt/php/7.1.1 etc. and create a symlink /opt/php/7.1 that points to the recent version and then alter that symlink when you compiled a new version. The ports have not to be altered when you replace a version.

 

Btw. the above applies to the control panel ISPConfig and not ISPCP.

By: Sunny

@til to Update for further Question (i could directly comment to that):

i tested your suggestion and create /opt/php/7.1/ with symlink to /opt/php/7.1.0 where i installed all like this tutorial says, thanks for that. it seems to work fine, but i got a mail from ispconfig with "WARNING - Action aborted, file is a symlink: /opt/php/7.1/lib/php.ini" so how to work with that and what does it mean at all, because the website works and shows working php 7.1 ?! thx

By: Ralf Behrendt

Please add the save command after editing the files. Maybe some beginner is not sure if he should do it or not. Because in any other case you can copy & past, but how to save nano is not mentioned.

By the way on debian 8 adn ispconfig 3 the turorial works perfect for me.

By: Thomas

If you go with the systemd script option, what is the path that you set in the "Path to the PHP-FPM init script" setting in ISPConfig?

By: till

Just set it as if you would have added a init script, ispconfig detects that systemd is installed and uses a systemd unit with the name of the init script. S just do it as shown in the tutorial, the settings will work for init.d and systemd.

By: Thomas

Thanks a lot for your response! The thing is that the path will be non-existent. Do I have to create the init.d script in /etc/init.d/php-7.1-fpm and just rely on the fact that ISPConfig will not use it if systemd is installed or just point to the non-existent location? The reason that I'm asking is that if I leave this line empty, the new version does not show up in my users' websites.

By: till

Just do what the tutorial tells you to do in step 6 on your server. If you would have to do something different, then the tutorial would have told you. It does not matter if this path exists or not.

By: onastvar

ISPConfig 3.1 does not SAVE the following entries. I have to click on CANCEL to get out of the screen.

Path to the PHP-FPM init script: /etc/init.d/php-7.1-fpmPath to the php.ini directory: /opt/php-7.1/libPath to the PHP-FPM pool directory: /opt/php-7.1/etc/php-fpm.d

By: till

Just tested it here, the paths save fine. I guess you might have copied a whitespace or something like that and not just the path.

By: fbarcenas

Any IONCUBE for this yet??

By: Andreas

Hello,

i am very unexperiencend with linux an tried to follow these instructions. But after "make" and "make install" i can´t go one because the path /opt/php-7.1 is empty. What´s wrong?I use Debian 8 on bananapi

Thanks for help

Andreas

By: krishna

same issue

By: DonMcCoy

If you are on Debian 8 by now, install through the repo it's available now, don't go through the compiling hassle, when you compile it you can upgraded it in future or your can't add new components unless you recompile everything, but when you simply install it from a repo it's so flexible to upgrade, delete and add new componenets.

By: Maycon Brito

Thank you! This was the first time that I instaled PHP from source with successfull. I put this page in my favorites.

I've installed  with debian:latest docker image and now I'm developing the Docker file from this tutorial.

By: Markus

Hi, i installed the server with this tutorial https://www.howtoforge.com/tutorial/perfect-server-debian-8-jessie-apache-bind-dovecot-ispconfig-3/3/

and when I try to start /etc/init.d/php-7.1-fpm i get the following error:

 

root@webserver:/usr/local/src/php7-build/php-7.1.0# /etc/init.d/php-7.1-fpm start

Starting php-fpm [11-Jan-2017 18:53:49] ALERT: [pool www] the process manager is missing (static, dynamic or ondemand)

[11-Jan-2017 18:53:49] ERROR: failed to post process the configuration

[11-Jan-2017 18:53:49] ERROR: FPM initialization failed

 failed

Can you help me?

By: Christoforos Korifidis

I follow the instruction but there are not any etc/fpm* files. Instead these files are under the directory sapi/. Can I use these files?

 

By: Max Devaine

Configuration is very strange. You have some files in "/opt", some files in "/usr/share", you have configuration in "/opt/php-7.1/lib". This does not make sense. Why does not use dir options? For example :

./configure --prefix=/opt/php/7.1.1 \--bindir=/opt/php/7.1.1/bin \--sbindir=/opt/php/7.1.1/sbin \--libexecdir=/opt/php/7.1.1/lib \--datadir=/opt/php/7.1.1/share \--sysconfdir=/opt/php/7.1.1/etc \--sharedstatedir=/php/7.1.1/com \--localstatedir=/opt/php/7.1.1/var \--libdir=/opt/php/7.1.1/lib/x86_64-linux-gnu \--includedir=/opt/php/7.1.1/include \--infodir=/opt/php/7.1.1/share/info \--mandir=/opt/php/7.1.1/share/man \--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-pdo-mysql --with-mysqli --with-mysql-sock=/var/run/mysqld/mysqld.sock --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: abce

Wow, Thanks.

I want a install php 5 near php7 in ispconfig on server decieded, How i can do it?

By: Jango

if you have problem compile error: cc: Internal error: Killed (program cc1)

just add this in configure: --disable-fileinfo

By: Mat

thanks for this great guide works perfect!

i have added it to my imscp ;-)

is for php7.1 also redis & apcu / apcu bc extensions available?

I cannot find the github to install it similar to memcache above

 

thx in advance 

By: Hirbod

It is possible to install APCU.

cd /tmpgit clone https://github.com/krakjoe/apcucd apcu/opt/php-7.1/bin/phpize./configure --with-php-config=/opt/php-7.1/bin/php-configmakeexport TEST_PHP_ARGS='-n'make testmake installnano /opt/php-7.1/lib/php.ini (put at the end of file)Content:extension=apcu.soapc.enabled=1apc.shm_size=32Mapc.ttl=7200apc.enable_cli=1 

By: Porompompero

Hi guys. I followed the tutorial. Fast-cgi works like a charm, but FPM doesn't work. I test with the classical "<?php phpinfo(); ?>", but my browser show the same code (no interpreting): "<?php phpinfo(); ?>"

Can you help me, please? Thanks.

By: helios

hi, how fixed thie error please? thx

 

pkg-config est déjà la plus récente version disponible.

0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.

root@ns33XXX:/usr/local/src/php7-build/php-memcache/php-memcached-php7# /opt/php-7.1/bin/phpize

Configuring for:

PHP Api Version:         20160303

Zend Module Api No:      20160303

Zend Extension Api No:   320160303

Cannot find autoconf. Please check your autoconf installation and the

$PHP_AUTOCONF environment variable. Then, rerun this script.

 

root@ns33XXX:/usr/local/src/php7-build/php-memcache/php-memcached-php7#

By: Hbod

PHP 7.1 has "WebP" support, please also add this into the Howto. apt-get install webp libwebp-devAnd add --with-webp-dir=/usrto the configure line!

By: SimonGilli

Hi Till

Thanks for that great guide, everthing worked fine as expected!

But I really don't like to compile and install software by myself, I love debian packages ;-)

So I searched for an other way last week and I have found the PHP package maintainers site at https://deb.sury.org/ for Debian and Ubuntu packages. I followed the instructions at https://packages.sury.org/php/README.txt and installed versions 7.0 and 7.1 by apt-get (the default packages from debian were already installed before). Then I added the following PHP configs to IPSConfig and everything works fine so far:

PHP 5.6 (default packages by Debian):

PHP FastCGI Binary: php5-cgiphp.ini: /etc/php5/cgi/php.ini

PHP-FPM Init Script: php5-fpmphp.ini: /etc/php5/fpm/php.iniPHP-FPM Pool: /etc/php5/fpm/pool.d

PHP 7.0:

PHP FastCGI Binary: php-cgi7.0php.ini: /etc/php/7.0/cgi/php.ini

PHP-FPM Init Script: php-fpm7.0php.ini: /etc/php/7.0/fpm/php.iniPHP-FPM Pool: /etc/php/7.0/fpm/pool.d

PHP 7.1:

PHP FastCGI Binary: php-cgi7.1php.ini: /etc/php/7.1/cgi/php.ini

PHP-FPM Init Script: php-fpm7.1php.ini: /etc/php/7.1/fpm/php.iniPHP-FPM Pool: /etc/php/7.1/fpm/pool.d

I only tested Fast-CGI for the moment, it's possible that the FPM ports needs to be addaped to get FPM working. I will test that a.s.a.p.

I think the links in /etc/alternatives are pointing always to the highest version of PHP, so I had to add the 5.6 config because Default in ISPConfig points to 7.1 after that procedure and not longer to 5.6.

If you like this alternative procedure for installing PHP on Debian and Ubuntu, I will write an article for howtoforge after my tests are finished.

What do you think?

RegardsSimon

By: till

Hi Simon,

thank you for posting the instructions. It would be great if you could write a tutorial about that for howtoforge.

Regards

Till

By: SimonGilli

Hi Till,

I made some progress in my investigations, but one question on your tutorial is resting:

Why do you use an IP connection in /opt/php-7.1/etc/php-fpm.d/www.conf and not use the default socket connection? Is there a special reason for that? I think the socket connection is more lightweight than an IP connection and IP is only necessary for distributed installs where FPM runs on an other server.

RegardsSimon

By: Chris

When I install this, it keeps throwing me the following error:

/etc/init.d/php-7.1-fpm startStarting php-fpm [07-Apr-2017 10:30:59] ERROR: No pool defined. at least one pool section must be specified in config file[07-Apr-2017 10:30:59] ERROR: failed to post process the configuration[07-Apr-2017 10:30:59] ERROR: FPM initialization failed failed

Any ideas?

By: cipito

Does this work for CENTOS 7?

I need to add PHP 7 on my server.

I could not find any tutorial with Centos.

Thank you

By: LA

Hi,

Thank you very much for this tutorial. I had followed every step. I have no error during installation and process.

But now when I chose PHP-FPM mode in Ispconfig with addionnal PHP version 7.1, I see the php source on the website. When I do the same thing chosing Fast-CGI mode with php 7.1 it run...

Do you have an idea ? 

thank you?

By: vikozo

Hello

quiet at the beginnig i have a problem

# apt-get install libfcgi-dev libfcgi0ldbl libjpeg62-turbo-dbg libmcrypt-dev libssl-dev libc-client2007e libc-client2007e-dev libxml2-dev libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev libfreetype6-dev libkrb5-dev libpq-dev libxml2-dev libxslt1-devPaketlisten werden gelesen... FertigAbhängigkeitsbaum wird aufgebaut.Statusinformationen werden eingelesen.... Fertiglibc-client2007e ist schon die neueste Version.libc-client2007e wurde als manuell installiert festgelegt.Einige Pakete konnten nicht installiert werden. Das kann bedeuten, dassSie eine unmögliche Situation angefordert haben oder, wenn Sie dieUnstable-Distribution verwenden, dass einige erforderliche Pakete nochnicht erstellt wurden oder Incoming noch nicht verlassen haben.Die folgenden Informationen helfen Ihnen vielleicht, die Situation zu lösen:Die folgenden Pakete haben unerfüllte Abhängigkeiten: libc-client2007e-dev : Hängt ab von: comerr-dev soll aber nicht installiert werden                        Hängt ab von: krb5-multidev soll aber nicht installiert werden libkrb5-dev : Hängt ab von: krb5-multidev (= 1.12.1+dfsg-19+deb8u2) soll aber nicht installiert werden libpq-dev : Hängt ab von: krb5-multidev soll aber nicht installiert werden             Hängt ab von: comerr-dev soll aber nicht installiert werden libssl-dev : Hängt ab von: libssl1.0.0 (= 1.0.1t-1+deb8u6) aber 1.0.2k-1~bpo8+1 soll installiert werden              Empfiehlt: libssl-doc soll aber nicht installiert werdenE: Probleme können nicht korrigiert werden, Sie haben zurückgehaltene defekte Pakete.

By: Dahero

I'm wondering whats wrong with my install. Alternate PHP 7.1 shows up, I set it for the first site, and it goes 503. The error.log and the vhost conf file references to php5-fpm.

[Wed May 10 17:25:23.110960 2017] [proxy:error] [pid 24326] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/lib/php5-fpm/web1.sock (*) failed

[Wed May 10 17:25:23.137629 2017] [proxy_fcgi:error] [pid 24326] [client 10.211.55.2:58629] AH01079: failed to make connection to backend: httpd-UDS

I just upgraded ISPConfig3 to git-stable with no luck. Any idea other than hardcoding all the conf files?

By: Aloa

Hi,I use this tutorial on Ubintu 12.04 with nginx. Everything work fantastic and correct like other Till's tutorials. Thank you!Now i need to install intl. I try:cd /opt/php-7.1/etcpecl -C ./pear.conf update-channelspecl -C ./pear.conf install intland get this error: ERROR: `/tmp/pear/temp/intl/configure --with-icu-dir=DEFAULT' failedi read some info and go to: apt-get install libicu-devNow i have new error:In file included from /tmp/pear/temp/intl/php_intl.h:34:0,                 from /tmp/pear/temp/intl/php_intl.c:25:/tmp/pear/temp/intl/intl_error.h:24:40: fatal error: ext/standard/php_smart_str.h: No such file or directory #include <ext/standard/php_smart_str.h>                                        ^compilation terminated.make: *** [php_intl.lo] Error 1ERROR: `make' failed Can anyone help me whit this error ?

By: oir91

I have the same problem installing pecl and I don't find information about this. Could anyone help with this error?

By: pix3l

The installation worked on my system without any error. But when I create an info.php I get an ERROR 500 Internal Server error. But nothing is shown in the error/logfiles. There is also no php7-fpm error logfile in /var/log.

I also checked the rights and they seem to be correct as well (644 owned by webXY)

Any idea?

By: Rafael Santana

Hi,

I got an error in instalation

root@server:/usr/local/src/php7-build/php-7.1.2# cp /usr/local/src/php7-build/php-7.1.2/php.ini-production /opt/php-7.1/lib/php.ini

cp: cannot create regular file '/opt/php-7.1/lib/php.ini': No such file or directory

root@server:/usr/local/src/php7-build/php-7.1.2# cp /opt/php-7.1/etc/php-fpm.conf.default /opt/php-7.1/etc/php-fpm.conf

cp: cannot stat '/opt/php-7.1/etc/php-fpm.conf.default': No such file or directory

root@server:/usr/local/src/php7-build/php-7.1.2# cp /opt/php-7.1/etc/php-fpm.d/www.conf.default /opt/php-7.1/etc/php-fpm.d/www.conf

cp: cannot stat '/opt/php-7.1/etc/php-fpm.d/www.conf.default': No such file or directory

 

By: Joel

Error during install process:

pi@raspberrypi:~ $ sudo cp /opt/php-7.1/etc/php-fpm.conf.default /opt/php-7.1/etc/php-fpm.conf

cp: cannot stat ‘/opt/php-7.1/etc/php-fpm.conf.default’: No such file or directory

 

By: till

Either the compilation with the make command failed or the make install failed on your system. Check make output for errors.

By: Yang Ke

I have the same problem. Please help.

By: Roland Barkoczi

Thank you for sharing this tutorial. My system built on Debian 7. Will this tutorial work on it?

By: Lukas Vlek

Hellou, please help me. Installing php 7 is complete ok, in isp config added new php version. When I change the version of the website, the php version will remain unchanged. Why ? In apache vhost config file is link to php5-fcgi ... i dont know ... Thanks for help.

By: hsluis

Hello Till, please update to 7.1.7 version, this is a security release.

By: fx

 i'm noob and french :-( and i've succeeded at the 1er attempt. Thanks for this excellent tutoriel !

By: Eveny

Resolv problem with OpenSSL configureapt-get install pkg-config

By: azu

Thanks for this tutorial.

May I use it for install PHP 7.1x  To a server with debian 9,isp config, php7?

Or it is possible to replace PHP7 with PHP7.1.X and add future update in sources list?

By: quaz22

Hello

Debian 8.9 - clean installation according to (The Perfect Server - Debian 8.4 Jessie (Apache2, BIND, Dovecot, ISPConfig 3.1))

----------------

I did everything according to instructions but PHP 7.1.10 FPM not working.

ERROR 500 - Internal Server Error!

----------------

PHP 7.1.10 Fast-CGI is working.

 

By: quaz22

I do not know why but somehow it worked

After restart the server still did not work

I gave the command

/etc/init.d/php-7.1-fpm stop

service apache2 restart

Once again, even though I did it before

  chmod 755 /etc/init.d/php-7.1-fpm

  insserv php-7.1-fpm

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

/etc/init.d/php-7.1-fpm stop

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

service apache2 restart

and it worked

Restart the Apache may need to enable it

Great big thanks for the tutorial

Good job

 

By: Florent

This tutorial is excellent, work like a charm!

By: halycon

I installed php7.1 as additional php version. now i need ldap extension. in php5 i can install the extension simply by using apt-get. How to install extensions with this compiled version?

Thanks :)

By: nazih ridwan

I get an error:

virtual memory exhausted: Cannot allocate memory

By: webguyz

Install swap file on your OS so it uses disk space for virtual memory

By: Muneeb

Hello everyo,

Everything installed fine, however i needed to use php-fpm 7.1 with nginx, and i followed this tutorial here: https://www.howtoforge.com/tutorial/install-nginx-php-and-mysql-lemp-stack-on-opensuse-leap-42.1/ to install nginx.

in thins, its mentioned to add php config in nginx.conf file, and there is this line:

                fastcgi_pass unix:/var/run/php-fpm.sock;

i wonder what is path of php-fpm.sock ? may be i'm missing something, i don't know. Please Help.

Best regards,

By: Andrei Coman

The config it works with intl and ldap for moodle I used is:

After you need to do this.

For intl

apt-get install libicu-dev

For ldap

apt-get install libldb-dev libldap2-dev

./configure --prefix=/opt/php-7.1 --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-pdo-mysql --with-mysqli --with-mysql-sock=/var/run/mysqld/mysqld.sock --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 --enable-intl --with-ldap

By: Paul

Hi! I got error after 'make':

Generating phar.phar                                                                                                                                              Warning: Unknown: Unable to find the wrapper "php" - did you forget to enable it  when you configured PHP? in Unknown on line 0                                                                                                                    Warning: Unknown: Unable to find the wrapper "php" - did you forget to enable it  when you configured PHP? in Unknown on line 0                                                                                                                    Warning: Unknown: Unable to find the wrapper "php" - did you forget to enable it  when you configured PHP? in Unknown on line 0                                                                                                                    Parse error: syntax error, unexpected 'error' (T_STRING) in /usr/local/src/php7- build/php-7.1.1/ext/phar/phar.php on line 26

Makefile:464: recipe for target 'ext/phar/phar.phar' failed

make: *** [ext/phar/phar.phar] Error 255

I can't find any answer...

By: valentin1000

/opt/php-7.1/etc# pecl -C ./pear.conf install xdebugpecl/xdebug requires PHP (version >= 7.0.0), installed version is 5.6.38-0+deb8u1No valid packages foundinstall failed

Any help please...

By: Laszlo Csurulya

Thank you.