How to install PHP 7.1, 7.2 and 5.6 as PHP-FPM & FastCGI for ISPConfig 3 on Debian 9

Debian 9 ships with PHP 7.0 as default PHP version. Major PHP versions are not 100% compatible with each other, so a website might require a newer or older PHP version to work. ISPConfig supports it to use multiple PHP versions on the same server, the PHP version can be selected for each website individually in the website settings. This tutorial shows how to install PHP 7.1, 7.2, and 5.6 as FPM and FCGI mode alongside PHP 7.0 on a Debian 9 server. The additional PHP versions are installed in the /opt folder, so their installation does nit affect the default PHP version

1 Preliminary Note

I will install PHP 7.1, 7.2 and 5.6. Please note that PHP-FPM can be used on both Apache and Nginx servers while FastCGI is available only for Apache servers.

2 Install the prerequisites

Install the prerequisites for building PHP and the nano editor that I will use to edit the config files:

apt-get install build-essential nano

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

ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a

cd /usr/include
ln -s x86_64-linux-gnu/curl

(The last command is needed if you build PHP with --with-imap, because otherwise ./configure will stop with the following error:

checking for crypt in -lcrypt... yes
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
[email protected]:/usr/local/src/php5-build/php-7.1.14#

)

3 Compile PHP 7.1 as PHP-FPM and Fastcgi

Download and extract PHP archive:

mkdir -p /opt/php-7.1
mkdir /usr/local/src/php7.1-build
cd /usr/local/src/php7.1-build
wget http://de2.php.net/get/php-7.1.14.tar.bz2/from/this/mirror -O php-7.1.14.tar.bz2
tar jxf php-7.1.14.tar.bz2

cd php-7.1.14/

Configure and build PHP 7.1 as follows (you can adjust the ./configure command to your needs, take a look at

./configure --help

to see all available options; if you use a different ./configure command, it is possible that additional libraries are required, or the build process will fail):

./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

The last switch (--enable-fpm) makes sure this PHP version will work with PHP-FPM.

make
make install

Copy php.ini and php-fpm.conf to the correct locations:

cp /usr/local/src/php7.1-build/php-7.1/php.ini-production /opt/php-7.1/lib/php.ini

cp /opt/php-7.1/etc/php-fpm.conf.default /opt/php-7.1/etc/php-fpm.conf
cp /opt/php-7.1/etc/php-fpm.d/www.conf.default /opt/php-7.1/etc/php-fpm.d/www.conf

Open /opt/php-7.1/etc/php-fpm.conf and adjust the following setting (remove the ; in front of the pid line):

nano /opt/php-7.1/etc/php-fpm.conf

[...]
pid = run/php-fpm.pid
[...]

Then open /opt/php-7.1/etc/php-fpm.d/www.conf and adjust the listen line, you must use an unused port (e.g. 8999; port 9000 might be in use by Debian's default PHP-FPM already):

nano /opt/php-7.1/etc/php-fpm.d/www.conf

[...]
listen = 127.0.0.1:8999
[...]

3.1 Create the systemd unit file

Next, we'll create the system unit file which is used to start and stop the PHP-FPM daemon.

nano /lib/systemd/system/php-7.1-fpm.service

with the following content:

[Unit]
Description=The PHP 7.1 FastCGI Process Manager
After=network.target

[Service]
Type=simple
PIDFile=/opt/php-7.1/var/run/php-fpm.pid
ExecStart=/opt/php-7.1/sbin/php-fpm --nodaemonize --fpm-config /opt/php-7.1/etc/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID

[Install]
WantedBy=multi-user.target

Enable the service and reload systemd:

systemctl enable php-7.1-fpm.service
systemctl daemon-reload

Finally, start PHP-FPM.

systemctl start php-7.1-fpm.service

To enable the Zend OPcache, open /opt/php-7.1/lib/php.ini...

nano /opt/php-7.1/lib/php.ini

... and add the following line at the end:

[...]
zend_extension=opcache.so

3.2 Enable Memcache (optional)

In this chapter, I will compile and enable the PHP Memcached extension.

The first step is to install the libmemcached-dev package from Debian.

apt-get install libmemcached-dev

Then create a diretory, download the PHP memcache extension from Github, unpack the archive and enter the directory that contains the unpacked files.

mkdir /usr/local/src/php7.1-build/php-memcache
cd /usr/local/src/php7.1-build/php-memcache
wget https://github.com/php-memcached-dev/php-memcached/archive/php7.zip
unzip php7.zip
cd php-memcached-php7

Prepare he sources by running the phpize command from PHP 7.1.

/opt/php-7.1/bin/phpize

Configure and build the PHP memcache extension.

./configure --with-php-config=/opt/php-7.1/bin/php-config
make
make install

To enable the Memcache extension, open /opt/php-7.1/lib/php.ini...

nano /opt/php-7.1/lib/php.ini

... and add the following line at the end:

[...]
extension=memcached.so

3.3 Install xDebug extension (optional)

The xDebug module is a debugging extension for PHP. The installation is optional.

Install xDebug with these commands.

cd /opt/php-7.1/etc
pecl -C ./pear.conf update-channels
pecl -C ./pear.conf install xdebug

Then edit the php.ini file with an editor:

nano /opt/php-7.1/lib/php.ini

and add the following line at the end of the file:

zend_extension=/opt/php-7.1/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so

Finally restart the php-fpm daemon:

systemctl start php-7.1-fpm.service

Test the PHP version:

cd /opt/php-7.1/bin
./php --version

The output should be similar to this screenshot.

PHP 7.1 installed on Debian 9

Please note: The screenshot is from PHP 7.1.14, the tutorial gets updated continuously for new PHP versions but we don't take new screenshots each time, so the PHP version that you will see on your server might be newer. The current version of this tutorial is for php-7.1.14.

3.4 Enable PHP 7.1 in ISPConfig

In ISPConfig 3.1, you can configure the new PHP version under System > Additional PHP Versions. On the Name tab, you just fill in a name for the PHP version (e.g. PHP 7.1) - this PHP version will be listed under this name in the website settings in ISPConfig:

PHP 7.1

Go to the FastCGI Settings tab and fill out the fields as follows:

Path to the PHP FastCGI binary: /opt/php-7.1/bin/php-cgi
Path to the php.ini directory: /opt/php-7.1/lib

PHP 7.1 FCGI

Then g to the PHP-FPM Settings tab and fill out the fields as follows:

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

PHP 7.1 FPM

4 Compile PHP 7.2 as PHP-FPM and Fastcgi

Download and extract PHP from php.net and unpack the tar.bz2 file:

mkdir -p /opt/php-7.2
mkdir /usr/local/src/php7.2-build
cd /usr/local/src/php7.2-build
wget http://de2.php.net/get/php-7.2.2.tar.bz2/from/this/mirror -O php-7.2.2.tar.bz2
tar jxf php-7.2.2.tar.bz2

cd php-7.2.2/

Configure and build PHP 7.2 as follows (you can adjust the ./configure command to your needs, take a look at

./configure --help

to see all available options; if you use a different ./configure command, it is possible that additional libraries are required, or the build process will fail):

./configure --prefix=/opt/php-7.2 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --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 --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

The last switch (--enable-fpm) makes sure this PHP version will work with PHP-FPM.

make
make install

Copy php.ini and php-fpm.conf to the correct locations:

cp /usr/local/src/php7.2-build/php-7.2.2/php.ini-production /opt/php-7.2/lib/php.ini

cp /opt/php-7.2/etc/php-fpm.conf.default /opt/php-7.2/etc/php-fpm.conf
cp /opt/php-7.2/etc/php-fpm.d/www.conf.default /opt/php-7.2/etc/php-fpm.d/www.conf

Open /opt/php-7.2/etc/php-fpm.conf and adjust the following setting (remove the ; in front of the pid line):

nano /opt/php-7.2/etc/php-fpm.conf

[...]
pid = run/php-fpm.pid
[...]

Then open /opt/php-7.2/etc/php-fpm.d/www.conf and adjust the listen line, you must use an unused port (e.g. 8998; port 9000 might be in use by Debian's default PHP-FPM already):

nano /opt/php-7.2/etc/php-fpm.d/www.conf

[...]
listen = 127.0.0.1:8998
[...]

4.1 Create the systemd unit file

Next, we'll create the system unit file which is used to start and stop the PHP-FPM daemon.

nano /lib/systemd/system/php-7.2-fpm.service

with the following content:

[Unit]
Description=The PHP 7.2 FastCGI Process Manager
After=network.target

[Service]
Type=simple
PIDFile=/opt/php-7.2/var/run/php-fpm.pid
ExecStart=/opt/php-7.2/sbin/php-fpm --nodaemonize --fpm-config /opt/php-7.2/etc/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID

[Install]
WantedBy=multi-user.target

Enable the service and reload systemd:

systemctl enable php-7.2-fpm.service
systemctl daemon-reload

Finally, start PHP-FPM.

systemctl start php-7.2-fpm.service

To enable the Zend OPcache, open /opt/php-7.2/lib/php.ini...

nano /opt/php-7.2/lib/php.ini

... and add the following line at the end:

[...]
zend_extension=opcache.so

4.2 Enable Memcache (optional)

In this chapter, I will compile and enable the PHP Memcached extension.

The first step is to install the libmemcached-dev package from Debian.

apt-get install libmemcached-dev

Then create a diretory, download the PHP memcache extension from Github, unpack the archive and enter the directory that contains the unpacked files.

mkdir /usr/local/src/php7.2-build/php-memcache
cd /usr/local/src/php7.2-build/php-memcache
wget https://github.com/php-memcached-dev/php-memcached/archive/php7.zip
unzip php7.zip
cd php-memcached-php7

Prepare he sources by running the phpize command from PHP 7.2.

/opt/php-7.2/bin/phpize

Configure and build the PHP memcache extension.

./configure --with-php-config=/opt/php-7.2/bin/php-config
make
make install

To enable the Memcache extension, open /opt/php-7.2/lib/php.ini...

nano /opt/php-7.2/lib/php.ini

... and add the following line at the end:

[...]
extension=memcached.so

4.3 Install xDebug extension (optional)

The xDebug module is a debugging extension for PHP. The installation is optional.

Install xDebug with these commands.

cd /opt/php-7.2/etc
pecl -C ./pear.conf update-channels
pecl -C ./pear.conf install xdebug

Then edit the php.ini file with an editor:

nano /opt/php-7.2/lib/php.ini

and add the following line at the end of the file:

zend_extension=/opt/php-7.2/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so

Finally restart the php-fpm daemon:

systemctl start php-7.2-fpm.service

Test the PHP version:

cd /opt/php-7.2/bin
./php --version

The output should be similar to this screenshot.

PHP 7.2 installed on Debian 9

Please note: The screenshot is from PHP 7.2.2, the tutorial gets updated continuously for new PHP versions but we don't take new screenshots each time, so the PHP version that you will see on your server might be newer. The current version of this tutorial is for php-7.2.2.

4.4 Enable PHP 7.2 in ISPConfig

In ISPConfig 3.1, you can configure the new PHP version under System > Additional PHP Versions. On the Name tab, you just fill in a name for the PHP version (e.g. PHP 7.2) - this PHP version will be listed under this name in the website settings in ISPConfig:

PHP 7.2

Go to the FastCGI Settings tab and fill out the fields as follows:

Path to the PHP FastCGI binary: /opt/php-7.2/bin/php-cgi
Path to the php.ini directory: /opt/php-7.2/lib

PHP 7.1 FCGI

Then g to the PHP-FPM Settings tab and fill out the fields as follows:

Path to the PHP-FPM init script: php-7.2-fpm
Path to the php.ini directory: /opt/php-7.2/lib
Path to the PHP-FPM pool directory: /opt/php-7.2/etc/php-fpm.d

PHP 7.2 FPM

5 Compile PHP 5.6 as PHP-FPM and Fastcgi

Download PHP and unpack the tar.bz2 archive:

mkdir -p /opt/php-5.6
mkdir /usr/local/src/php5.6-build
cd /usr/local/src/php5.6-build
wget http://de2.php.net/get/php-5.6.33.tar.bz2/from/this/mirror -O php-5.6.33.tar.bz2
tar jxf php-5.6.33.tar.bz2

The OpenSSL version in Debian 9 is too new for PHP 5.6, so we'll have to compile an older version in /opt/openssl to use it with PHP 5.6.

cd /tmp
wget "https://www.openssl.org/source/old/1.0.1/openssl-1.0.1t.tar.gz"
tar xzf openssl-1.0.1t.tar.gz
cd openssl-1.0.1t
./config shared --prefix=/opt/openssl
make -j $(nproc) && make install
ln -s /opt/openssl/lib /opt/openssl/lib/x86_64-linux-gnu
wget -O /opt/openssl/ssl/cert.pem "http://curl.haxx.se/ca/cacert.pem"

Create a symlink so PHP will find the freetype, libcrypto and libssl libraries.

mkdir /usr/include/freetype2/freetype
ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h
ln -s /opt/openssl/lib/libcrypto.so.1.0.0 /usr/lib/x86_64-linux-gnu/
ln -s /opt/openssl/lib/libssl.so.1.0.0 /usr/lib/x86_64-linux-gnu/
ln -fs /opt/openssl /usr/local/ssl

Enter the folder which contains the unpacked PHP source files.

cd /usr/local/src/php5.6-build/php-5.6.33/

Configure and build PHP 5.6 as follows (you can adjust the ./configure command to your needs, take a look at

./configure --help

to see all available options; if you use a different ./configure command, it is possible that additional libraries are required, or the build process will fail):

./configure --prefix=/opt/php-5.6 --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-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=/opt/openssl --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm

The last switch (--enable-fpm) makes sure this PHP version will work with PHP-FPM.

make
make install

Copy php.ini and php-fpm.conf to the correct locations:

cp /usr/local/src/php5.6-build/php-5.6.33/php.ini-production /opt/php-5.6/lib/php.ini

cp /opt/php-5.6/etc/php-fpm.conf.default /opt/php-5.6/etc/php-fpm.conf

Open /opt/php-5.6/etc/php-fpm.conf and adjust the following setting:

nano /opt/php-5.6/etc/php-fpm.conf

[...]
pid = run/php-fpm.pid
[...]
user = www-data
group = www-data
[...]
listen = 127.0.0.1:8997
[...]
include=/opt/php-5.6/etc/php-fpm.d/*.conf

5.1 Create the systemd unit file

Next, we'll create the system unit file which is used to start and stop the PHP-FPM daemon.

nano /lib/systemd/system/php-5.6-fpm.service

with the following content:

[Unit]
Description=The PHP 5.6 FastCGI Process Manager
After=network.target

[Service]
Type=simple
PIDFile=/opt/php-5.6/var/run/php-fpm.pid
ExecStart=/opt/php-5.6/sbin/php-fpm --nodaemonize --fpm-config /opt/php-5.6/etc/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID

[Install]
WantedBy=multi-user.target

Enable the service and reload systemd:

systemctl enable php-5.6-fpm.service
systemctl daemon-reload

Finally, start PHP-FPM.

systemctl start php-5.6-fpm.service

To enable the Zend OPcache, open /opt/php-5.6/lib/php.ini...

nano /opt/php-5.6/lib/php.ini

... and add the following line at the end:

[...]
zend_extension=opcache.so

5.2 Enable Memcache (optional)

In this chapter, I will compile and enable the PHP Memcached extension.

The first step is to install the libmemcached-dev package from Debian.

apt-get install libmemcached-dev

Then run these commands to build the memcache extension

cd /opt/php-5.6/etc
pecl -C ./pear.conf update-channels
pecl -C ./pear.conf install memcache

To enable the Memcache extension, open /opt/php-5.6/lib/php.ini...

nano /opt/php-5.6/lib/php.ini

... and add the following line at the end:

[...]
extension=memcache.so

Finally restart the php-fpm daemon:

systemctl start php-5.6-fpm.service

Test the PHP version:

cd /opt/php-5.6/bin
./php --version

The output should be similar to this screenshot.

PHP 5.6 compiled on Debian 9

Please note: The screenshot is from PHP 5.6.33, the tutorial gets updated continuously for new PHP versions but we don't take new screenshots each time, so the PHP version that you will see on your server might be newer. The current version of this tutorial is for php-5.6.33.

5.4 Enable PHP 5.6 in ISPConfig

In ISPConfig 3.1, you can configure the new PHP version under System > Additional PHP Versions. On the Name tab, you just fill in a name for the PHP version (e.g. PHP 5.6) - this PHP version will be listed under this name in the website settings in ISPConfig:

PHP 5.6

Go to the FastCGI Settings tab and fill out the fields as follows:

Path to the PHP FastCGI binary: /opt/php-5.6/bin/php-cgi
Path to the php.ini directory: /opt/php-5.6/lib

PHP 5.6 FCGI

Then g to the PHP-FPM Settings tab and fill out the fields as follows:

Path to the PHP-FPM init script: php-5.6-fpm
Path to the php.ini directory: /opt/php-5.6/lib
Path to the PHP-FPM pool directory: /opt/php-5.6/etc/php-fpm.d

PHP 5.6 FPM

Till Brehm

About Till Brehm

Over 20 years experience as Software Developer and Linux System Administrator. Till Brehm is the founder and lead developer of the ISPConfig Hosting Control Panel software (since 2000) and he founded HowtoForge in 2005 as a place to share Linux knowledge with other Linux enthusiasts.

Share this page:

Suggested articles

57 Comment(s)

Add comment

Comments

By: Johannes at: 2018-02-09 10:52:09

Hallo Till,

welchen Vorteil soll das selber-compilieren haben gegenüber der apt Methode, die auch automatisch updated?

Beste Grüße,

Johannes

--

echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/sury.list apt install apt-transport-https curl https://packages.sury.org/php/apt.gpg | apt-key add - apt update apt install php7.0 apt install php7.1   etc ...

By: till at: 2018-02-09 11:13:12

The above guide should show how to compile alternate PHP versions. You are free to use PHP packages from sury.org if you prefer that of course and I might cover that in another tutorial as well.

By: johnymas at: 2018-02-11 09:28:15

Hi Till,what are the differences between installation guides for debian and ubuntu?

By: till at: 2018-02-12 08:58:34

The one is for Ubuntu and the other one for Debian :) The installation instructions for Debian and Ubuntu are quite similar as the Distributions are similar, but nonetheless, they differ a bit.

By: Raphaël at: 2018-02-12 01:33:44

Hello, Till,

I have follow the guide above on a Debian Stretch 9.3 and get those errors after the "make" command for php5.6

/usr/bin/ld: warning: libssl.so.1.1, needed by /usr/lib/x86_64-linux-gnu/libpq.so, may conflict with libssl.so.1.0.0/usr/bin/ld: warning: libssl.so.1.1, needed by /usr/lib/x86_64-linux-gnu/libpq.so, may conflict with libssl.so.1.0.0/usr/bin/ld: warning: libssl.so.1.1, needed by /usr/lib/x86_64-linux-gnu/libpq.so, may conflict with libssl.so.1.0.0/usr/bin/ld: warning: libssl.so.1.1, needed by /usr/lib/x86_64-linux-gnu/libpq.so, may conflict with libssl.so.1.0.0/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libc-client.a(osdep.o): undefined reference to symbol '[email protected]@OPENSSL_1_1_0'//usr/lib/x86_64-linux-gnu/libssl.so.1.1: error adding symbols: DSO missing from command linecollect2: error: ld returned 1 exit statusMakefile:273 : la recette pour la cible « sapi/cli/php » a échouéemake: *** [sapi/cli/php] Erreur 1

and i also had this warnings for libssl.so and libcrypt.so for php7.1 & php7.2

/usr/lib/x86_64-linux-gnu/libc-client.a(osdep.o): In function `ssl_onceonlyinit.part.7':(.text+0x5d7e): warning: the use of `tmpnam' is dangerous, better use `mkstemp'/usr/bin/ld: warning: libssl.so.1.0.2, needed by /usr/lib/x86_64-linux-gnu/libcurl.so, may conflict with libssl.so.1.1/usr/bin/ld: warning: libssl.so.1.0.2, needed by /usr/lib/x86_64-linux-gnu/libcurl.so, may conflict with libssl.so.1.1/usr/bin/ld: warning: libssl.so.1.0.2, needed by /usr/lib/x86_64-linux-gnu/libcurl.so, may conflict with libssl.so.1.1/usr/bin/ld: warning: libssl.so.1.0.2, needed by /usr/lib/x86_64-linux-gnu/libcurl.so, may conflict with libssl.so.1.1/usr/bin/ld: warning: libcrypto.so.1.0.2, needed by /usr/lib/x86_64-linux-gnu/libcurl.so, may conflict with libcrypto.so.1.1/usr/bin/ld: warning: libcrypto.so.1.0.2, needed by /usr/lib/x86_64-linux-gnu/libcurl.so, may conflict with libcrypto.so.1.1/usr/bin/ld: warning: libcrypto.so.1.0.2, needed by /usr/lib/x86_64-linux-gnu/libcurl.so, may conflict with libcrypto.so.1.1/usr/bin/ld: warning: libcrypto.so.1.0.2, needed by /usr/lib/x86_64-linux-gnu/libcurl.so, may conflict with libcrypto.so.1.1/usr/bin/ld: warning: libcrypto.so.1.0.2, needed by /usr/lib/x86_64-linux-gnu/libcurl.so, may conflict with libcrypto.so.1.1/usr/bin/ld: warning: libcrypto.so.1.0.2, needed by /usr/lib/x86_64-linux-gnu/libcurl.so, may conflict with libcrypto.so.1.1/usr/bin/ld: warning: libcrypto.so.1.0.2, needed by /usr/lib/x86_64-linux-gnu/libcurl.so, may conflict with libcrypto.so.1.1/usr/bin/ld: warning: libcrypto.so.1.0.2, needed by /usr/lib/x86_64-linux-gnu/libcurl.so, may conflict with libcrypto.so.1.1Generating phar.phpGenerating phar.pharPEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.directorytreeiterator.incclicommand.incpharcommand.incinvertedregexiterator.incdirectorygraphiterator.incphar.incBuild complete.Don't forget to run 'make test'.

Do you have a idea ?

Thanks and best regards.

Raphaël

By: till at: 2018-02-12 09:04:14

These are just warnings and not errors. Try to test the compiled PHP, it should work.

By: rmathez at: 2018-02-12 15:01:01

Sorry, for PHP 7.1 & 7.2 it was only Warning and the make test have returns some erros but not realy relevant and the compiling/installation are successful.

But for PHP 5.6 i have the following error and i can't do a "make test" or a "make install". It give me the same error again.

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libc-client.a(osdep.o): undefined reference to symbol '[email protected]@OPENSSL_1_1_0'//usr/lib/x86_64-linux-gnu/libssl.so.1.1: error adding symbols: DSO missing from command linecollect2: error: ld returned 1 exit statusMakefile:273 : la recette pour la cible « sapi/cli/php » a échouée make: *** [sapi/cli/php] Error 1

 

By: till at: 2018-02-12 16:59:46

Ok. I'll check that part of the tutorial again. Maybe something changed since I've written that guide.

By: PatFoo at: 2018-02-13 21:22:49

had the same error as rmathez on php 5 install:

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libc-client.a(osdep.o): undefined reference to symbol '[email protected]@OPENSSL_1_1_0'//usr/lib/x86_64-linux-gnu/libssl.so.1.1: error adding symbols: DSO missing from command linecollect2: error: ld returned 1 exit statusMakefile:273: recipe for target 'sapi/cli/php' failedmake: *** [sapi/cli/php] Error 1

thank you again for ispconfig

By: bruma at: 2018-02-14 12:54:39

Hi

got same error when compiling php 5.6

 -lxml2 -lxml2 -lxslt -lxml2 -lcrypt  -o sapi/cli/php/usr/lib/x86_64-linux-gnu/libc-client.a(osdep.o): In function `ssl_onceonlyinit.part.7':(.text+0x5d7e): warning: the use of `tmpnam' is dangerous, better use `mkstemp'/usr/bin/ld: warning: libssl.so.1.1, needed by /usr/lib/x86_64-linux-gnu/libpq.so, may conflict with libssl.so.1.0.0/usr/bin/ld: warning: libssl.so.1.1, needed by /usr/lib/x86_64-linux-gnu/libpq.so, may conflict with libssl.so.1.0.0/usr/bin/ld: warning: libssl.so.1.1, needed by /usr/lib/x86_64-linux-gnu/libpq.so, may conflict with libssl.so.1.0.0/usr/bin/ld: warning: libssl.so.1.1, needed by /usr/lib/x86_64-linux-gnu/libpq.so, may conflict with libssl.so.1.0.0/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libc-client.a(osdep.o): undefined reference to symbol '[email protected]@OPENSSL_1_1_0'//usr/lib/x86_64-linux-gnu/libssl.so.1.1: error adding symbols: DSO missing from command linecollect2: error: ld returned 1 exit statusMakefile:273: recipe for target 'sapi/cli/php' failedmake: *** [sapi/cli/php] Error 1

By: till at: 2018-02-14 13:28:47

Like I posted above, I'll check that part again to see what has changed. No need to repost the same issue.

By: Petik at: 2018-02-18 20:14:54

Hi bruma,

check compile without --with-imap and --with-imap-ssl, if it is possible. Without imap it works.

Petik

By: bruma at: 2018-02-19 15:48:23

Without --with-imap and --with-imap-ssl it compiles, but don't now how will that affect on apps that need ssl support?

By: till at: 2018-02-19 16:21:34

I've removed the IMAP flags for now in the tutorial. It's indeed the IMAP part that causes the issue. IMAP is not used by that many apps, so it should be fine to remove it. If one would want to have IMAP support, then an older version of UW-IMAP lib needs to be compiled and linked into PHP and most likely an older version of the Kerberos lib as well.

By: DylanPedro at: 2018-02-17 15:10:01

any ideas why this issues is there with php 5.6 as have has the same issues?

By: Haxley at: 2018-02-19 10:01:30

I also have the mistake

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libc-client.a(osdep.o): undefined reference to symbol '[email protected]@OPENSSL_1_1_0' //usr/lib/x86_64-linux-gnu/libssl.so.1.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Makefile:273: recipe for target 'sapi/cli/php' failed make: *** [sapi/cli/php] Error 1place Help

By: Haxley at: 2018-02-19 17:05:09

ok its work

ist this ok? php 7.1 listen =127.0.0.1:8999

and

PHP 5.6 listen =127.0.0.1:8999?

identical Port?

By: till at: 2018-02-19 17:41:16

No, it has to be a unique free port. Change that to e.g. 8997 when you install all 3 PHP versions. I've updated that in the tutorials as well.

By: bruma at: 2018-02-20 14:24:01

I think this line is wong, this is dir does not exist?

include=/opt/php-5.6.30/etc/php-fpm.d/*.conf

By: till at: 2018-02-20 14:33:57

Change it to include=/opt/php-5.6/etc/php-fpm.d/*.conf

By: Olli2k at: 2018-03-19 10:01:53

 2 questions from my side:

1. 5.6 is not working.

Mär 19 10:33:54 host systemd[1]: Started The PHP 5.6 FastCGI Process Manager.Mär 19 10:33:54 host php-fpm[8125]: [19-Mar-2018 10:33:54] ERROR: Unable to globalize '/opt/php-5.6/etc/php-fpm.d/*.conf' (ret=2) from /opt/php-5.6/etc/php-fpm.conf at line 16.Mär 19 10:33:54 host php-fpm[8125]: [19-Mar-2018 10:33:54] ERROR: failed to load configuration file '/opt/php-5.6/etc/php-fpm.conf'Mär 19 10:33:54 host php-fpm[8125]: [19-Mar-2018 10:33:54] ERROR: FPM initialization failedMär 19 10:33:54 host systemd[1]: php-5.6-fpm.service: Main process exited, code=exited, status=78/n/aMär 19 10:33:54 host systemd[1]: php-5.6-fpm.service: Unit entered failed state.Mär 19 10:33:54 host systemd[1]: php-5.6-fpm.service: Failed with result 'exit-code'.

There is no directory called /php-fpm.d in /opt/php-5.6/etc. So what to do?

 

2. If I want to change to apt tutorial via sury.org, is it enogh to stop daemon and delete /lib/systemd/system/php-x.x-fpm.service files? Or what else do I need to do for uninstall?

By: stef157 at: 2018-07-20 09:47:19

Still not working.

I've to comment the line and then it's working…

By: Evil at: 2018-02-20 20:33:00

PHP 5.6 ./configure .... --with-mysql otherwise (old) MYSQL support is missing! And this support is one of the main reasons to install/compile old PHP do Debian9.

By: Haxley at: 2018-02-21 08:58:03

Fast CGI 7.0(default), 7.1, 7.2, 5.6 it work

PHP- FPM 5.6 not work.

if a switch tto fpm and select 5.6. send Apache a 7.0 !Error:

[proxy:error] [pid 6813] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/lib/php7.0-fpm/web2.sock (*) failed

if change to PHP FPM 7.2!send phpinfo () : PHP Version 7.0.27-0deb9u1

 

By: Petik at: 2018-02-21 20:44:35

I had the same problem. Check the /opt/php-5.6/etc/php-fpm.d directory if it exists. And view log files.

By: bruma at: 2018-03-01 15:15:21

Hi,

I compile and setup version 5.6.33 (and also 5.4.45). When I select version 5.6 (or 5.4) for site in ispconfig, ispconfig generates apache mysite.com.vhost file with content

FastCgiExternalServer /var/www/clients/client1/web1/cgi-bin/php5-fcgi-10.0.0.4-443-mysite.com -idle-timeout 300 -socket /var/lib/php7.0-fpm/web1.sock -pass-header Authorization  -pass-header Content-Type

SetHandler "proxy:unix:/var/lib/php7.0-fpm/web1.sock|fcgi://localhost"

so it references /var/lib/php7.0-fpm/web1.sock which is not ok because in apache log I get error

[proxy:error] [pid 24496] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/lib/php7.0-fpm/web1.sock (*) failed

Is ther a way to remove or repalce php7.0-fpm lines?

By: till at: 2018-03-01 16:06:55

The socket path is absolutely fine. php7.0-fpm is not related to the PHP version at all, its the exact same path for any PHP version you use as that's the default directory of your OS for PHP sockets, regardless which version or custom PHP you use. Your problem is something different, definitely not the socket path. probably the compiled PHP is not working or you made a mistake while editing one of the PHP 5.6config files.

By: bruma at: 2018-03-02 10:57:41

I recompile, now it's workig.

Thanks

By: helios842000 at: 2018-03-01 19:28:20

I can't compile php 5.6

Configuring extensions

checking size of long... (cached) 8

checking size of int... (cached) 4

checking for int32_t... yes

checking for uint32_t... yes

checking for sys/types.h... (cached) yes

checking for inttypes.h... (cached) yes

checking for stdint.h... (cached) yes

checking for string.h... (cached) yes

checking for stdlib.h... (cached) yes

checking for strtoll... yes

checking for atoll... yes

checking for strftime... (cached) yes

checking which regex library to use... php

checking whether to enable LIBXML support... yes

checking libxml2 install dir... /usr

checking for xml2-config path...

configure: error: xml2-config not found. Please check your libxml2 installation.

[email protected]:/usr/local/src/php5.6-build/php-5.6.33# make

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

 

By: helios842000 at: 2018-03-07 17:49:16

even after the March 2nd update, I still have the error message when compiling php5.6. and this command is missing:

mkdir /usr/include/freetype2

By: babydunk at: 2018-03-15 22:34:27

Thanks a million Till ;)

everything went as smooth as butter apart from one typo  in 7.1 section

 

cp /usr/local/src/php7.1-build/php-7.1/php.ini-production /opt/php-7.1/lib/php.ini

 

Should be

 

cp /usr/local/src/php7.1-build/php-7.1.14/php.ini-production /opt/php-7.1/lib/php.ini

 

Thanks again Till

By: John at: 2018-03-19 16:14:05

Hello Till,

Thanks for the guide. I followed this guide, and it all went well. Except that, in my installed ISPConfig (3.1.8p1) the "Let's Encrypt" option (and the SSL checkbox) don't seem to work. At least not with "version 5.6" of PHP. I can turn these options on, but after saving, they get turned off again by ISPConfig (after a while). So no certificate is generated for my site. Do I need some additional manual configuration...? Thanks for answering.

By: till at: 2018-03-19 16:18:50

Let's encrypt and PHP is not related to each other. If you have issues with LE, please take a look at the FAQ in the forum and if that does not help you to solve the issue, then make a post in the forum. https://www.howtoforge.com/community/threads/lets-encrypt-error-faq.74179/

By: Tom at: 2018-04-11 23:56:28

Hi Till, thank you for your work. Is it ok to follow this tutorial with Debian 8 and ISPC 3.1.11 ?

By: till at: 2018-04-12 06:55:38

I guess it might work. You should use chapter 2 (installation of prerequisites) from the last Debian 8 guide https://www.howtoforge.com/tutorial/how-to-install-php-7.1-on-debian-8-jessie/ and then start with chapter 3 from this tutorial.

By: Steven at: 2018-04-18 17:27:08

Hello,

i followed your tutorial, and everything works with compiling.. But if i have a website with php 5.6.(35) i am getting an error on the unixsocket under ngnix:[crit] 7047#7047: *161 connect() to unix:/var/lib/php7.0-fpm/web1.sock failed (2: No such file or directory) while connecting to upstream

If i change the fastcgi_pass from the unixsocket to: 127.0.0.1:8956 where the PHP-FPM runs, it works. so how i have to change the confs, that its not getting overriden by ispconfig?

 

greets

Steven

By: till at: 2018-04-19 06:27:40

There must be a different problem then as there is no need to edit any config files and the fastcgi_pass should not point to the port you configured in php-fpm.conf of the compiled PHPas that would run all scripts under a wrong user. You can use the ISPConfig debug mode to find out why your setup fails and post in the forum if you need additional help.

By: Bernhard at: 2018-04-29 10:10:58

Wget can easily save the downloaded files with the most apropriate name:

wget --content-disposition http://some.url.com/file.tar.gz

By: nmazza at: 2018-04-30 15:02:58

Hello Till,

I have move my CentOS servers to Debian 9 server over ISPConfig 3.1.11

in Php 5.6 version, configure command, says ERROR and STOP.

checking for pkg-config... /usr/bin/pkg-configconfigure: error: Cannot find OpenSSL's [email protected]:/usr/local/src/php5.6-build/php-5.6.33#

Any idea?

Thanks

Nestor Mazza

By: ashorlivs at: 2018-05-12 15:25:32

I have successfully added PHP 7.2.2 FPM to my original "Perfect Server - Ubuntu 16.04 (Xenial Xerus)" system.

Thank you for this tutorial.

By: Iztok at: 2018-05-16 04:53:24

Jessie + php5.6.** worked great. Stretch + php7.** has a lot of bugs. I tried to install php5.6.33 on new instalation of Debian9 Stretch and failed. Installation stoped here:

Configuring extensionschecking size of long... (cached) 8checking size of int... (cached) 4checking for int32_t... yeschecking for uint32_t... yeschecking for sys/types.h... (cached) yeschecking for inttypes.h... (cached) yeschecking for stdint.h... (cached) yeschecking for string.h... (cached) yeschecking for stdlib.h... (cached) yeschecking for strtoll... yeschecking for atoll... yeschecking for strftime... (cached) yeschecking which regex library to use... phpchecking whether to enable LIBXML support... yeschecking libxml2 install dir... /usrchecking for xml2-config path...configure: error: xml2-config not found. Please check your libxml2 installation.

I insalled as you described in

The Perfect Server - Debian 9 (Stretch) with Apache, BIND, Dovecot, PureFTPD and ISPConfig 3.1

By: till at: 2018-05-16 14:20:56

Seems as if you did not install the prerequisites from step 2 of the tutorial.

By: Luis Urbina G. at: 2018-05-19 23:54:40

 Hi Till, Thanks for this tutorial, works fine for me!

I found an error when tried to copy php 7.1 ini

You wrote

cp /usr/local/src/php7.1-build/php-7.1/php.ini-production /opt/php-7.1/lib/php.ini

and is

cp /usr/local/src/php7.1-build/php-7.1.14/php.ini-production /opt/php-7.1/lib/php.ini

thank you man!

By: iamart at: 2018-06-01 11:46:09

Maybe it would be nice to add in compilation php 5.6 switch --with-gd

By: martin at: 2018-06-01 20:49:36

Installed PHP 5.6 and can't connect to mysql-server via mysqli, got this error "Error displaying the error page: Application Instantiation Error: Could not connect to MySQL" from Joomla. Connect via mysql works. php -m shows mysqli as installed. Any hints? Server: ispconfig 3.1.11, Debian 9.3

Thanks and best regards.

By: Roberth at: 2018-06-17 00:08:24

after doing the steps for php 7.2, ispconfig stopped working, giving 502 bad gateway error, any fix?

By: youg at: 2018-06-20 09:27:14

Hello, thanks for the good job done with IPSCONFIG :)

On a fresh Debian 9 / nginx perfect server, I can't start PHP5.6 :

ERROR: [/opt/php-5.6/etc/pear.conf:2] value is NULL for a ZEND_INI_PARSER_ENTRY

PHP:  syntax error, unexpected '{' in Unknown on line 1

I have no idea why ! What can I try to fix it ?

By: icare at: 2018-07-11 13:58:40

Many Thanks for the Tutorial

Config Debian 9 - IcpSonfig 3.1.12 - I had php like the tutorial - I had additionnal php version in ISPconfig -

All is good except : There is no 'PHP Version' when i want to add a new website.

Can you help me

Thanks a lot

By: virtualware at: 2018-07-16 08:42:31

Hello how to activate this extension PHP Extension intl

By: Esther at: 2018-08-13 12:54:56

You need to compile with that feature enabled: --enable-intl

By: Mike at: 2018-08-14 17:35:16

In case you have a 32Bit debian. Do the following:

64Bit: (original commands)ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.acd /usr/includeln -s x86_64-linux-gnu/curlPHP 7.1./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-fpmPHP 7.2./configure --prefix=/opt/php-7.2 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --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 --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-fpm32Bit: (use instead)apt-get install pkg-configln -s /usr/lib/libc-client.a /usr/lib/i386-linux-gnu/libc-client.acd /usr/includeln -s i386-linux-gnu/curlPHP 7.1./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/i386-linux-gnu --enable-ftp --with-imap --with-imap-ssl --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpmPHP 7.2./configure --prefix=/opt/php-7.2 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --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 --with-openssl --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=lib/i386-linux-gnu --enable-ftp --with-imap --with-imap-ssl --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm

-Mike

By: Mike at: 2018-08-15 09:05:02

Please excuse, somehow the formatting got mixed up, I try again:

In case you have a 32Bit Debian, do the following:

Here you have the original 64Bit commands:

ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a

cd /usr/include

ln -s x86_64-linux-gnu/curl

Replace with:

apt-get install pkg-config

ln -s /usr/lib/libc-client.a /usr/lib/i386-linux-gnu/libc-client.a

cd /usr/include

ln -s i386-linux-gnu/curl

and use the following .configure commands

PHP 7.1

./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/i386-linux-gnu --enable-ftp --with-imap --with-imap-ssl --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm

PHP 7.2

./configure --prefix=/opt/php-7.2 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --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 --with-openssl --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=lib/i386-linux-gnu --enable-ftp --with-imap --with-imap-ssl --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm

 

note: the --with-libdir=lib/i386-linux-gnu line changes from 64Bit to 32Bit

 

-Mike

By: calbasi at: 2018-08-21 10:01:55

Hi, I get 2 errors with these lines:

mkdir /usr/include/freetype2/freetype

ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h

Here you have my output (using Catalan locale, but basicaly, these dir and files already exist):

[email protected]:/tmp/openssl-1.0.1t# mkdir /usr/include/freetype2/freetypemkdir: no s’ha pogut crear el directori «/usr/include/freetype2/freetype»: El fitxer ja existeix

[email protected]:/tmp/openssl-1.0.1t# ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.hln: no s’ha pogut crear l’enllaç simbòlic '/usr/include/freetype2/freetype/freetype.h': El fitxer ja existeix

I supose there is a minor issue, but I report it because maybe could be useful to somebody.

By: LIJE at: 2018-08-24 13:49:40

I saw your tuto in here: https://www.howtoforge.com/tutorial/how-to-install-php-5.6-and-7.1-on-debian-9-stretch/ I had PHP v7.0 set up and I added the v5.2 with your help. The problem I have is the following: Link to database cannot be established: SQLSTATE[HY000] [2002] No such file or directory I get this error when I swithced to php 5.2 and I don't know why. Any clue?

By: Leonardo at: 2018-08-28 17:54:16

Hi boys and girls

Recenly install ispconfig with this guide https://www.howtoforge.com/tutorial/perfect-server-debian-9-stretch-apache-bind-dovecot-ispconfig-3-1/ and all ok. Today need install multiple php versions, but i need install(especificly) php-5.3.29... someone nknows how do this without die in the try.

By: Aleksandar at: 2018-09-16 21:31:12

I am getting very weird problem, I have installed php 7.0 as default php on my server and everything works fine, but one website require older script to work, so i followed guide and installed php 5.6. when i switch to that version than website's wont work. I have wordpress on one of installations and on php 7.0 it works, when i switch to php 5.6 FASTCGI i am getting error "can't connect to database" and when i switch to php 5.6 FPM server doesn't work at all, even phpinfo won't display anything. But other websites on php 7.0 works.

By: Pifpof at: 2018-09-19 06:03:00

Mysql issue SQLSTATE[HY000] [2002] should be fixed not using localhost but 127.0.0.1.

Stretch consider localhost to be ipv6 (localhost (::1):) not ipv4(127.0.0.1) so PDO try socket mode instead.