- Installing PHP 5.6 (PHP-FPM and Fast-CGI)
- Setting up the build environment
- Install the build prerequisites
- Build and install PHP
- Enable the Zend OPcache extension
- Enable the APCu extension
- Enable the Memcache extension (pecl-memcache)
- Enable the Memcached extension (pecl-memcache)
- Enable the ionCube Loader
- Enable the xDebug extension
- Enable PHP 5.6 in ISPConfig 3
- Installing PHP 7.0 (PHP-FPM and Fast-CGI)
- Setting up the build environment
- Install the build prerequisites
- Build and install PHP
- Enable the Zend OPcache extension
- Enable the APCu extension
- Enable the Memcache extension (pecl-memcache)
- Enable the Memcached extension (pecl-memcached)
- Enable the ionCube Loader
- Enable the xDebug extension
- Enable PHP 7.0 in ISPConfig 3
- Installing PHP 7.1 (PHP-FPM and Fast-CGI)
- Setting up the build environment
- Install the build prerequisites
- Build and install PHP
- Enable the Zend OPcache extension
- Enable the APCu extension
- Enable the Memcache extension (pecl-memcache)
- Enable the Memcached extension (pecl-memcached)
- Enable the ionCube Loader
- Enable the xDebug extension
- Enable PHP 7.1 in ISPConfig 3
- Installing PHP 7.2 (PHP-FPM and Fast-CGI)
- Setting up the build environment
- Install the build prerequisites
- Build and install PHP
- Enable the Mcrypt extension (pecl-mcrypt)
- Enable the Zend OPcache extension
- Enable the APCu extension
- Enable the Memcache extension (pecl-memcache)
- Enable the Memcached extension (pecl-memcached)
- Enable the ionCube Loader
- Enable the xDebug extension
- Enable PHP 7.2 in ISPConfig 3
mkdir /opt/php-5.6
mkdir /usr/local/src/php56-build
cd /usr/local/src/php56-build
wget http://www.php.net/get/php-5.6.36.tar.bz2/from/a/mirror -O php-5.6.36.tar.bz2
tar jxf php-5.6.36.tar.bz2
cd php-5.6.36yum groupinstall 'Development Tools'
yum install libxml2-devel libXpm-devel gmp-devel libicu-devel t1lib-devel aspell-devel openssl-devel bzip2-devel libcurl-devel libjpeg-devel libvpx-devel libpng-devel freetype-devel readline-devel libtidy-devel libxslt-devel libmcrypt-devel pcre-devel curl-devel mysql-devel ncurses-devel gettext-devel net-snmp-devel libevent-devel libtool-ltdl-devel libc-client-devel postgresql-develConfigure and build PHP 5.6 as follows: (use ./configure --help for available options)
./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-gd \
--with-pgsql \
--disable-rpath \
--enable-inline-optimization \
--with-bz2 \
--with-zlib \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-pcntl \
--enable-mbregex \
--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=apache \
--with-fpm-group=apache \
--with-libdir=lib64 \
--enable-ftp \
--with-imap \
--with-imap-ssl \
--with-kerberos \
--with-gettext \
--enable-fpmThe last switch (--enable-fpm) makes sure this PHP version will work with PHP-FPM. If you want to use this PHP-FPM version with Apache, please use --with-fpm-user=apache and --with-fpm-group=apache; if you want to use this PHP-FPM version with nginx, please use --with-fpm-user=nginx and --with-fpm-group=nginx.
make && make installCopy php.ini and php-fpm.conf to the correct locations:
cp /usr/local/src/php56-build/php-5.6.30/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.confOpen /opt/php-5.6/etc/php-fpm.conf and adjust the following lines. The listen line, you must use an unused port (e.g. 8956; port 9000 might be in use by the default PHP-FPM already):
vim /opt/php-5.6/etc/php-fpm.conf[...]
pid = run/php-fpm.pid
[...]
user = apache
group = apache
[...]
listen = 127.0.0.1:8956
[...]
include=/opt/php-5.6/etc/fpm.d/*.conf
[...]Create the pool directory for PHP-FPM:
mkdir /opt/php-5.6/etc/fpm.dNext create an init script for PHP-FPM:
vim /etc/init.d/php56-fpm#! /bin/sh
### BEGIN INIT INFO
# Provides: php56-fpm
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts php56-fpm
# Description: starts the PHP FastCGI Process Manager daemon
### END INIT INFO
php_fpm_BIN=/opt/php-5.6/sbin/php-fpm
php_fpm_CONF=/opt/php-5.6/etc/php-fpm.conf
php_fpm_PID=/opt/php-5.6/var/run/php-fpm.pid
php_opts="--fpm-config $php_fpm_CONF"
wait_for_pid () {
try=0
while test $try -lt 35 ; do
case "$1" in
'created')
if [ -f "$2" ] ; then
try=''
break
fi
;;
'removed')
if [ ! -f "$2" ] ; then
try=''
break
fi
;;
esac
echo -n .
try=`expr $try + 1`
sleep 1
done
}
case "$1" in
start)
echo -n "Starting php-fpm "
$php_fpm_BIN $php_opts
if [ "$?" != 0 ] ; then
echo " failed"
exit 1
fi
wait_for_pid created $php_fpm_PID
if [ -n "$try" ] ; then
echo " failed"
exit 1
else
echo " done"
fi
;;
stop)
echo -n "Gracefully shutting down php-fpm "
if [ ! -r $php_fpm_PID ] ; then
echo "warning, no pid file found - php-fpm is not running ?"
exit 1
fi
kill -QUIT `cat $php_fpm_PID`
wait_for_pid removed $php_fpm_PID
if [ -n "$try" ] ; then
echo " failed. Use force-exit"
exit 1
else
echo " done"
echo " done"
fi
;;
force-quit)
echo -n "Terminating php-fpm "
if [ ! -r $php_fpm_PID ] ; then
echo "warning, no pid file found - php-fpm is not running ?"
exit 1
fi
kill -TERM `cat $php_fpm_PID`
wait_for_pid removed $php_fpm_PID
if [ -n "$try" ] ; then
echo " failed"
exit 1
else
echo " done"
fi
;;
restart)
$0 stop
$0 start
;;
reload)
echo -n "Reload service php-fpm "
if [ ! -r $php_fpm_PID ] ; then
echo "warning, no pid file found - php-fpm is not running ?"
exit 1
fi
kill -USR2 `cat $php_fpm_PID`
echo " done"
;;
*)
echo "Usage: $0 {start|stop|force-quit|restart|reload}"
exit 1
;;
esacMake the init script executable and create the system startup links:
chmod 755 /etc/init.d/php56-fpm
chkconfig --levels 235 php56-fpm onFinally start PHP-FPM:
service php56-fpm startTo enable the Zend OPcache, open /opt/php-5.6/lib/php.ini.
vim /opt/php-5.6/lib/php.iniAdd the following line at the end:
[...]
zend_extension=opcache.soRestart the PHP-FPM daemon and restart Apache 2:
service php56-fpm restart
service httpd restartThe most recent version of APCu supporting PHP 5.x is APCu 4.x.
cd /opt/php-5.6/etc
pecl -C ./pear.conf update-channels
pecl -C ./pear.conf install channel://pecl.php.net/apcu-4.0.11Accept all default values.
To enable APCu, open /opt/php-5.6/lib/php.ini.
vim /opt/php-5.6/lib/php.iniAdd the following line at the beginning of the file (before the [PHP] line):
extension=apcu.so
apc.enabled=1
apc.shm_size=128M
apc.ttl=0
apc.gc_ttl=600
apc.enable_cli=1
apc.mmap_file_mask=/tmp/apc.XXXXXX
;apc.mmap_file_mask=/dev/zero
;apc.shm_segments = 5Restart the PHP-FPM daemon and restart Apache 2:
service php56-fpm restart
service httpd restartInstall PEAR if not installed.
yum install php-pearcd /opt/php-5.6/etc
pecl -C ./pear.conf update-channels
pecl -C ./pear.conf install memcacheTo enable Memcache, open /opt/php-5.6/lib/php.ini.
vim /opt/php-5.6/lib/php.iniAdd the following line at the end:
[...]
extension=memcache.soRestart the PHP-FPM daemon and restart Apache 2:
service php56-fpm restart
service httpd restartcd /usr/local/src/php56-build/
yum install libmemcached-develDownload Memcached 2.2.0. This is the latest version that works with PHP 5.x.
wget https://pecl.php.net/get/memcache-2.2.0.tgz
tar zxf memcached-2.2.0.tgz
cd memcached-2.2.0Prepare the sources by running phpize from PHP 5.6.
/opt/php-5.6/bin/phpizeBuild and install the PHP memcached extension.
./configure --enable-memcached --with-php-config=/opt/php-5.6/bin/php-config
make && make installTo enable Memcached, open /opt/php-5.6/lib/php.ini.
vim /opt/php-5.6/lib/php.iniAdd the following line at the end:
[...]
extension=memcached.soRestart the PHP-FPM daemon and restart Apache 2:
service php56-fpm restart
service httpd restartThe ionCube Loader can be installed as follows:
cd /tmpNext, download and unpack the correct ionCube Loader package for your architecture (x86_64 or x86).
** For x86_64: **
wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xfvz ioncube_loaders_lin_x86-64.tar.gz** For x86: **
wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
tar xfvz ioncube_loaders_lin_x86.tar.gzFind the PHP extension directory.
/opt/php-5.6/bin/php -i | grep extension_dirCopy the extension to the PHP extension directory.
cp ioncube/ioncube_loader_lin_5.6.so /opt/php-5.6/lib/php/extensions/no-debug-non-zts-20131226/ioncube.soTo enable the ionCube Loader, open /opt/php-5.6/lib/php.ini.
vim /opt/php-5.6/lib/php.iniAdd the following line at the beginning of the file (before the [PHP] line):
zend_extension = /opt/php-5.6/lib/php/extensions/no-debug-non-zts-20131226/ioncube.so
[PHP]
[...]Restart the PHP-FPM daemon and restart Apache 2:
service php56-fpm restart
service httpd restartThe xDebug module is a debugging extension for PHP. The installation is optional.
Prepare the build folder and download the source files.
mkdir /usr/local/src/php56-build/php-xdebug
cd /usr/local/src/php56-build/php-xdebug
wget http://xdebug.org/files/xdebug-2.5.5.tgz
tar -xvzf xdebug-2.5.5.tgz
cd xdebug-2.5.5Prepare the sources by running phpize from PHP 5.6.
/opt/php-5.6/bin/phpizeConfigure and build the xDebug extension.
./configure --with-php-config=/opt/php-5.6/bin/php-config && makeFind the PHP extension directory.
/opt/php-5.6/bin/php -i | grep extension_dirCopy the extension to the PHP extension directory.
cp modules/xdebug.so /opt/php-5.6/lib/php/extensions/no-debug-non-zts-20131226/To enable Memcached, open /opt/php-5.6/lib/php.ini.
vim /opt/php-5.6/lib/php.iniAdd the following line at the end (being sure to use a full path):
[...]
zend_extension = /opt/php-5.6/lib/php/extensions/no-debug-non-zts-20131226/xdebug.soRestart the PHP-FPM daemon and restart Apache 2:
service php56-fpm restart
service httpd restartIn ISPConfig 3, 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:
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
Then go to the PHP-FPM Settings tab and fill out the fields as follows:
Path to the PHP-FPM init script: /etc/init.d/php56-fpm
Path to the php.ini directory: /opt/php-5.6/lib
Path to the PHP-FPM pool directory: /opt/php-5.6/etc/fpm.d/
mkdir /opt/php-7.0
mkdir /usr/local/src/php70-build
cd /usr/local/src/php70-build
wget http://www.php.net/get/php-7.0.30.tar.bz2/from/this/mirror -O php-7.0.30.tar.bz2
tar jxf php-7.0.30.tar.bz2
cd php-7.0.30yum groupinstall 'Development Tools'
yum install libxml2-devel libXpm-devel gmp-devel libicu-devel t1lib-devel aspell-devel openssl-devel bzip2-devel libcurl-devel libjpeg-devel libvpx-devel libpng-devel freetype-devel readline-devel libtidy-devel libxslt-devel libmcrypt-devel pcre-devel curl-devel mysql-devel ncurses-devel gettext-devel net-snmp-devel libevent-devel libtool-ltdl-devel libc-client-devel postgresql-develConfigure and build PHP 7.0 as follows: (use ./configure --help for available options)
./configure \
--prefix=/opt/php-7.0 \
--with-libdir=lib64 \
--disable-rpath \
--with-libxml-dir=/usr \
--with-openssl \
--with-kerberos \
--with-pcre-regex \
--with-zlib \
--enable-bcmath \
--with-bz2 \
--enable-calendar \
--with-curl \
--enable-exif \
--enable-ftp \
--with-gd \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib-dir \
--with-freetype-dir \
--enable-gd-native-ttf \
--with-gettext \
--with-mhash \
--with-imap \
--with-imap-ssl \
--enable-mbstring \
--with-mcrypt \
--with-mysqli=/usr/bin/mysql_config \
--enable-opcache \
--enable-pcntl \
--with-pdo-mysql \
--with-pdo-pgsql \
--with-pgsql \
--enable-soap \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--with-xmlrpc \
--with-xsl \
--enable-zip \
--enable-inline-optimization \
--enable-mbregex \
--with-fpm-user=apache \
--with-fpm-group=apache \
--enable-fpm \
--enable-cgiThe last switch (--enable-fpm) makes sure this PHP version will work with PHP-FPM. If you want to use this PHP-FPM version with Apache, please use --with-fpm-user=apache and --with-fpm-group=apache; if you want to use this PHP-FPM version with nginx, please use --with-fpm-user=nginx and --with-fpm-group=nginx.
make && make installCopy php.ini, php-fpm.conf, www.conf to the correct locations:
cp /usr/local/src/php70-build/php-7.0.30/php.ini-production /opt/php-7.0/lib/php.ini
cp /opt/php-7.0/etc/php-fpm.conf.default /opt/php-7.0/etc/php-fpm.conf
cp /opt/php-7.0/etc/php-fpm.d/www.conf.default /opt/php-7.0/etc/php-fpm.d/www.confOpen /opt/php-7.0/etc/php-fpm.conf and adjust the following setting:
vim /opt/php-7.0/etc/php-fpm.conf[...]
pid = run/php-fpm.pid
[...]Then open /opt/php-7.0/etc/php-fpm.d/www.conf and adjust the listen line, you must use an unused port (e.g. 8970; port 9000 might be in use by the default PHP-FPM already):
vim /opt/php-7.0/etc/php-fpm.d/www.conf[...]
listen = 127.0.0.1:8970
[...]Next create an init script for PHP-FPM:
vim /etc/init.d/php70-fpm#! /bin/sh
### BEGIN INIT INFO
# Provides: php70-fpm
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts php70-fpm
# Description: starts the PHP FastCGI Process Manager daemon
### END INIT INFO
php_fpm_BIN=/opt/php-7.0/sbin/php-fpm
php_fpm_CONF=/opt/php-7.0/etc/php-fpm.conf
php_fpm_PID=/opt/php-7.0/var/run/php-fpm.pid
php_opts="--fpm-config $php_fpm_CONF"
wait_for_pid () {
try=0
while test $try -lt 35 ; do
case "$1" in
'created')
if [ -f "$2" ] ; then
try=''
break
fi
;;
'removed')
if [ ! -f "$2" ] ; then
try=''
break
fi
;;
esac
echo -n .
try=`expr $try + 1`
sleep 1
done
}
case "$1" in
start)
echo -n "Starting php-fpm "
$php_fpm_BIN $php_opts
if [ "$?" != 0 ] ; then
echo " failed"
exit 1
fi
wait_for_pid created $php_fpm_PID
if [ -n "$try" ] ; then
echo " failed"
exit 1
else
echo " done"
fi
;;
stop)
echo -n "Gracefully shutting down php-fpm "
if [ ! -r $php_fpm_PID ] ; then
echo "warning, no pid file found - php-fpm is not running ?"
exit 1
fi
kill -QUIT `cat $php_fpm_PID`
wait_for_pid removed $php_fpm_PID
if [ -n "$try" ] ; then
echo " failed. Use force-exit"
exit 1
else
echo " done"
echo " done"
fi
;;
force-quit)
echo -n "Terminating php-fpm "
if [ ! -r $php_fpm_PID ] ; then
echo "warning, no pid file found - php-fpm is not running ?"
exit 1
fi
kill -TERM `cat $php_fpm_PID`
wait_for_pid removed $php_fpm_PID
if [ -n "$try" ] ; then
echo " failed"
exit 1
else
echo " done"
fi
;;
restart)
$0 stop
$0 start
;;
reload)
echo -n "Reload service php-fpm "
if [ ! -r $php_fpm_PID ] ; then
echo "warning, no pid file found - php-fpm is not running ?"
exit 1
fi
kill -USR2 `cat $php_fpm_PID`
echo " done"
;;
*)
echo "Usage: $0 {start|stop|force-quit|restart|reload}"
exit 1
;;
esacMake the init script executable and create the system startup links:
chmod 755 /etc/init.d/php70-fpm
chkconfig --levels 235 php70-fpm onFinally start PHP-FPM:
service php70-fpm startTo enable the Zend OPcache, open /opt/php-7.0/lib/php.ini.
vim /opt/php-7.0/lib/php.iniAdd the following line at the end:
[...]
zend_extension=opcache.soRestart the PHP-FPM daemon and restart Apache 2:
service php70-fpm restart
service httpd restartPHP 7.x support was added starting with APCu version 5.x
cd /usr/local/src/php70-build/
git clone https://github.com/krakjoe/apcu
cd apcuPrepare the sources by running phpize from PHP 7.0.
/opt/php-7.0/bin/phpizeConfigure and build the APCu extension.
./configure --enable-apcu --with-php-config=/opt/php-7.0/bin/php-config
makeFind the PHP extension directory.
/opt/php-7.0/bin/php -i | grep extension_dirCopy the extension to the PHP extension directory.
cp modules/apcu.so /opt/php-7.0/lib/php/extensions/no-debug-non-zts-20151012/To enable APCu, open /opt/php-7.0/lib/php.ini.
vim /opt/php-7.0/lib/php.iniAdd the following line at the end:
[...]
extension=apcu.so
apc.enabled=1
apc.shm_size=128M
apc.ttl=0
apc.gc_ttl=600
apc.enable_cli=1
apc.mmap_file_mask=/tmp/apc.XXXXXX
;apc.mmap_file_mask=/dev/zero
;apc.shm_segments = 5Restart the PHP-FPM daemon and restart Apache 2:
service php70-fpm restart
service httpd restartmkdir /usr/local/src/php70-build/php-memcache
cd /usr/local/src/php70-build/php-memcache
yum install libmemcache-develInstall the Memcache PHP 7 port on GitHub. (Based on this SO answer)
wget https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip
unzip NON_BLOCKING_IO_php7.zip
cd pecl-memcache-NON_BLOCKING_IO_php7Prepare the sources by running phpize from PHP 7.0.
/opt/php-7.0/bin/phpizeConfigure and build the PHP memcache extension.
./configure --enable-memcache --with-php-config=/opt/php-7.0/bin/php-config
makeFind the PHP extension directory.
/opt/php-7.0/bin/php -i | grep extension_dirCopy the extension to the PHP extension directory.
cp modules/memcache.so /opt/php-7.0/lib/php/extensions/no-debug-non-zts-20151012/To enable Memcache, open /opt/php-7.0/lib/php.ini.
vim /opt/php-7.0/lib/php.iniAdd the following line at the end:
[...]
extension=memcache.soRestart the PHP-FPM daemon and restart Apache 2:
service php70-fpm restart
service httpd restartyum install make gcc glibc-devel libmemcached-devel zlib-devel git
cd /usr/local/src/php70-build/libmemcached-dev is required to build Memcached. The default repository version is not high enough and will not work.
wget http://mirror.symnds.com/distributions/gf/el/6/plus/x86_64/libmemcached-1.0.18-2.gf.el6.x86_64.rpm
wget http://mirror.symnds.com/distributions/gf/el/6/plus/x86_64/libmemcached-devel-1.0.18-2.gf.el6.x86_64.rpm
wget http://mirror.symnds.com/distributions/gf/el/6/plus/x86_64/libmemcached-libs-1.0.18-2.gf.el6.x86_64.rpm
yum install libmemcached-devel-1.0.18-2.gf.el6.x86_64.rpm libmemcached-1.0.18-2.gf.el6.x86_64.rpm libmemcached-libs-1.0.18-2.gf.el6.x86_64.rpmClone the Github repository
git clone https://github.com/php-memcached-dev/php-memcached.git
cd php-memcached/
git checkout -b php7 origin/php7Prepare the sources by running phpize from PHP 7.0.
/opt/php-7.0/bin/phpizeConfigure, build, and install the PHP memcache extension.
./configure --disable-memcached-sasl --with-php-config=/opt/php-7.0/bin/php-config
make && make installTo enable Memcached, open /opt/php-7.0/lib/php.ini.
vim /opt/php-7.0/lib/php.iniAdd the following line at the end:
[...]
extension=memcached.soRestart the PHP-FPM daemon and restart Apache 2:
service php70-fpm restart
service httpd restartThe ionCube Loader can be installed as follows:
cd /usr/local/src/php70-build/Next, download and unpack the correct ionCube Loader package for your architecture (x86_64 or x86).
** For x86_64: **
wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xfvz ioncube_loaders_lin_x86-64.tar.gz** For x86: **
wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
tar xfvz ioncube_loaders_lin_x86.tar.gzFind the PHP extension directory.
/opt/php-7.0/bin/php -i | grep extension_dirCopy the extension to the PHP extension directory.
cp ioncube/ioncube_loader_lin_7.0.so /opt/php-7.0/lib/php/extensions/no-debug-non-zts-20151012/ioncube.soTo enable the ionCube Loader, open /opt/php-7.0/lib/php.ini.
vim /opt/php-7.0/lib/php.iniAdd the following line at the beginning of the file (before the [PHP] line):
zend_extension = ioncube.so
[PHP]
[...]Restart the PHP-FPM daemon and restart Apache 2:
service php70-fpm restart
service httpd restartThe xDebug module is a debugging extension for PHP. The installation is optional.
Prepare the build folder and download the source files.
mkdir /usr/local/src/php70-build/php-xdebug
cd /usr/local/src/php70-build/php-xdebug
wget http://xdebug.org/files/xdebug-2.6.0.tgz
tar -xvzf xdebug-2.6.0.tgz
cd xdebug-2.6.0Prepare the sources by running phpize from PHP 7.0.
/opt/php-7.0/bin/phpizeConfigure and build the xDebug extension.
./configure --with-php-config=/opt/php-7.0/bin/php-config && makeFind the PHP extension directory.
/opt/php-7.0/bin/php -i | grep extension_dirCopy the extension to the PHP extension directory.
cp modules/xdebug.so /opt/php-7.0/lib/php/extensions/no-debug-non-zts-20151012To enable xDebug, open /opt/php-7.0/lib/php.ini.
vim /opt/php-7.0/lib/php.iniAdd the following line at the end (being sure to use a full path):
[...]
zend_extension = /opt/php-7.0/lib/php/extensions/no-debug-non-zts-20151012/xdebug.soRestart the PHP-FPM daemon and restart Apache 2:
service php70-fpm restart
service httpd restartIn ISPConfig 3, 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.0) - this PHP version will be listed under this name in the website settings in ISPConfig:
Go to the FastCGI Settings tab and fill out the fields as follows:
Path to the PHP FastCGI binary: /opt/php-7.0/bin/php-cgi
Path to the php.ini directory: /opt/php-7.0/lib
Then go to the PHP-FPM Settings tab and fill out the fields as follows:
Path to the PHP-FPM init script: /etc/init.d/php70-fpm
Path to the php.ini directory: /opt/php-7.0/lib
Path to the PHP-FPM pool directory: /opt/php-7.0/etc/php-fpm.d
mkdir /opt/php-7.1
mkdir /usr/local/src/php71-build
cd /usr/local/src/php71-build
wget http://www.php.net/get/php-7.1.17.tar.bz2/from/this/mirror -O php-7.1.17.tar.bz2
tar jxf php-7.1.17.tar.bz2
cd php-7.1.17yum groupinstall 'Development Tools'
yum install libxml2-devel libXpm-devel gmp-devel libicu-devel t1lib-devel aspell-devel openssl-devel bzip2-devel libcurl-devel libjpeg-devel libvpx-devel libpng-devel freetype-devel readline-devel libtidy-devel libxslt-devel libmcrypt-devel pcre-devel curl-devel mysql-devel ncurses-devel gettext-devel net-snmp-devel libevent-devel libtool-ltdl-devel libc-client-devel postgresql-develConfigure and build PHP 7.1 as follows: (use ./configure --help for available options)
./configure \
--prefix=/opt/php-7.1 \
--with-libdir=lib64 \
--disable-rpath \
--with-libxml-dir=/usr \
--with-openssl \
--with-kerberos \
--with-pcre-regex \
--with-zlib \
--enable-bcmath \
--with-bz2 \
--enable-calendar \
--with-curl \
--enable-exif \
--enable-ftp \
--with-gd \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib-dir \
--with-freetype-dir \
--enable-gd-native-ttf \
--with-gettext \
--with-mhash \
--with-imap \
--with-imap-ssl \
--enable-mbstring \
--with-mcrypt \
--with-mysqli \
--enable-opcache \
--enable-pcntl \
--with-pdo-mysql \
--with-pdo-pgsql \
--with-pgsql \
--enable-soap \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--with-xmlrpc \
--with-xsl \
--enable-zip \
--enable-inline-optimization \
--enable-mbregex \
--with-fpm-user=apache \
--with-fpm-group=apache \
--enable-fpm \
--enable-cgiThe last switch (--enable-fpm) makes sure this PHP version will work with PHP-FPM. If you want to use this PHP-FPM version with Apache, please use --with-fpm-user=apache and --with-fpm-group=apache; if you want to use this PHP-FPM version with nginx, please use --with-fpm-user=nginx and --with-fpm-group=nginx.
make && make installCopy php.ini, php-fpm.conf, and www.conf to the correct locations:
cp /usr/local/src/php71-build/php-7.1.17/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.confOpen /opt/php-7.1/etc/php-fpm.conf and adjust the following setting:
vim /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. 8971; port 9000 might be in use by the default PHP-FPM already):
vim /opt/php-7.1/etc/php-fpm.d/www.conf[...]
listen = 127.0.0.1:8971
[...]Next create an init script for PHP-FPM:
vim /etc/init.d/php71-fpm#! /bin/sh
### BEGIN INIT INFO
# Provides: php71-fpm
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts php71-fpm
# Description: starts the PHP FastCGI Process Manager daemon
### END INIT INFO
php_fpm_BIN=/opt/php-7.1/sbin/php-fpm
php_fpm_CONF=/opt/php-7.1/etc/php-fpm.conf
php_fpm_PID=/opt/php-7.1/var/run/php-fpm.pid
php_opts="--fpm-config $php_fpm_CONF"
wait_for_pid () {
try=0
while test $try -lt 35 ; do
case "$1" in
'created')
if [ -f "$2" ] ; then
try=''
break
fi
;;
'removed')
if [ ! -f "$2" ] ; then
try=''
break
fi
;;
esac
echo -n .
try=`expr $try + 1`
sleep 1
done
}
case "$1" in
start)
echo -n "Starting php-fpm "
$php_fpm_BIN $php_opts
if [ "$?" != 0 ] ; then
echo " failed"
exit 1
fi
wait_for_pid created $php_fpm_PID
if [ -n "$try" ] ; then
echo " failed"
exit 1
else
echo " done"
fi
;;
stop)
echo -n "Gracefully shutting down php-fpm "
if [ ! -r $php_fpm_PID ] ; then
echo "warning, no pid file found - php-fpm is not running ?"
exit 1
fi
kill -QUIT `cat $php_fpm_PID`
wait_for_pid removed $php_fpm_PID
if [ -n "$try" ] ; then
echo " failed. Use force-exit"
exit 1
else
echo " done"
echo " done"
fi
;;
force-quit)
echo -n "Terminating php-fpm "
if [ ! -r $php_fpm_PID ] ; then
echo "warning, no pid file found - php-fpm is not running ?"
exit 1
fi
kill -TERM `cat $php_fpm_PID`
wait_for_pid removed $php_fpm_PID
if [ -n "$try" ] ; then
echo " failed"
exit 1
else
echo " done"
fi
;;
restart)
$0 stop
$0 start
;;
reload)
echo -n "Reload service php-fpm "
if [ ! -r $php_fpm_PID ] ; then
echo "warning, no pid file found - php-fpm is not running ?"
exit 1
fi
kill -USR2 `cat $php_fpm_PID`
echo " done"
;;
*)
echo "Usage: $0 {start|stop|force-quit|restart|reload}"
exit 1
;;
esacMake the init script executable and create the system startup links:
chmod 755 /etc/init.d/php71-fpm
chkconfig --levels 235 php71-fpm onFinally start PHP-FPM:
service php71-fpm startTo enable the Zend OPcache, open /opt/php-7.1/lib/php.ini.
vim /opt/php-7.1/lib/php.iniAdd the following line at the end:
[...]
zend_extension=opcache.soRestart the PHP-FPM daemon and restart Apache 2:
service php71-fpm restart
service httpd restartPHP 7.x support was added starting with APCu version 5.x
cd /usr/local/src/php71-build/
git clone https://github.com/krakjoe/apcu
cd apcuPrepare the sources by running phpize from PHP 7.1.
/opt/php-7.1/bin/phpizeConfigure and build the APCu extension.
./configure --enable-apcu --with-php-config=/opt/php-7.1/bin/php-config
makeFind the PHP extension directory.
/opt/php-7.1/bin/php -i | grep extension_dirCopy the extension to the PHP extension directory.
cp modules/apcu.so /opt/php-7.1/lib/php/extensions/no-debug-non-zts-20160303/To enable APCu, open /opt/php-7.1/lib/php.ini.
vim /opt/php-7.1/lib/php.iniAdd the following line at the end:
[...]
extension=apcu.so
apc.enabled=1
apc.shm_size=128M
apc.ttl=0
apc.gc_ttl=600
apc.enable_cli=1
apc.mmap_file_mask=/tmp/apc.XXXXXX
;apc.mmap_file_mask=/dev/zero
;apc.shm_segments = 5Restart the PHP-FPM daemon and restart Apache 2:
service php71-fpm restart
service httpd restartmkdir /usr/local/src/php71-build/php-memcache
cd /usr/local/src/php71-build/php-memcache
yum install libmemcache-develInstall the Memcache PHP 7 port on GitHub.
wget https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip
unzip NON_BLOCKING_IO_php7.zip
cd pecl-memcache-NON_BLOCKING_IO_php7Prepare the sources by running phpize from PHP 7.1.
/opt/php-7.1/bin/phpizeConfigure and build the PHP memcache extension.
./configure --enable-memcache --with-php-config=/opt/php-7.1/bin/php-config
makeFind the PHP extension directory.
/opt/php-7.1/bin/php -i | grep extension_dirCopy the extension to the PHP extension directory.
cp modules/memcache.so /opt/php-7.1/lib/php/extensions/no-debug-non-zts-20160303/To enable Memcache, open /opt/php-7.1/lib/php.ini.
vim /opt/php-7.1/lib/php.iniAdd the following line at the end:
[...]
extension=memcache.soRestart the PHP-FPM daemon and restart Apache 2:
service php71-fpm restart
service httpd restartyum install make gcc glibc-devel libmemcached-devel zlib-devel git
cd /usr/local/src/php71-build/libmemcached-dev is required to build Memcached. The default repository version is not high enough and will not work.
wget http://mirror.symnds.com/distributions/gf/el/6/plus/x86_64/libmemcached-1.0.18-2.gf.el6.x86_64.rpm
wget http://mirror.symnds.com/distributions/gf/el/6/plus/x86_64/libmemcached-devel-1.0.18-2.gf.el6.x86_64.rpm
wget http://mirror.symnds.com/distributions/gf/el/6/plus/x86_64/libmemcached-libs-1.0.18-2.gf.el6.x86_64.rpm
yum install libmemcached-devel-1.0.18-2.gf.el6.x86_64.rpm libmemcached-1.0.18-2.gf.el6.x86_64.rpm libmemcached-libs-1.0.18-2.gf.el6.x86_64.rpmClone the Github repository
git clone https://github.com/php-memcached-dev/php-memcached.git
cd php-memcached/
git checkout -b php7 origin/php7Prepare the sources by running phpize from PHP 7.1.
/opt/php-7.1/bin/phpizeConfigure, build, and install the PHP memcached extension.
./configure --disable-memcached-sasl --with-php-config=/opt/php-7.1/bin/php-config
make && make installTo enable Memcached, open /opt/php-7.1/lib/php.ini.
vim /opt/php-7.1/lib/php.iniAdd the following line at the end:
[...]
extension=memcached.soRestart the PHP-FPM daemon and restart Apache 2:
service php71-fpm restart
service httpd restartThe ionCube Loader can be installed as follows:
cd /usr/local/src/php71-buildNext, download and unpack the correct ionCube Loader package for your architecture (x86_64 or x86).
** For x86_64: **
wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xfvz ioncube_loaders_lin_x86-64.tar.gz** For x86: **
wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
tar xfvz ioncube_loaders_lin_x86.tar.gzFind the PHP extension directory.
/opt/php-7.1/bin/php -i | grep extension_dirCopy the extension to the PHP extension directory.
cp ioncube/ioncube_loader_lin_7.1.so /opt/php-7.1/lib/php/extensions/no-debug-non-zts-20160303/ioncube.soTo enable the ionCube Loader, open /opt/php-7.1/lib/php.ini.
vim /opt/php-7.1/lib/php.iniAdd the following line at the beginning of the file (before the [PHP] line):
zend_extension = ioncube.so
[PHP]
[...]Restart the PHP-FPM daemon and restart Apache 2:
service php71-fpm restart
service httpd restartThe xDebug module is a debugging extension for PHP. The installation is optional.
Prepare the build folder and download the source files.
mkdir /usr/local/src/php71-build/php-xdebug
cd /usr/local/src/php71-build/php-xdebug
wget http://xdebug.org/files/xdebug-2.6.0.tgz
tar -xvzf xdebug-2.6.0.tgz
cd xdebug-2.6.0Prepare the sources by running phpize from PHP 7.1.
/opt/php-7.1/bin/phpizeConfigure and build the xDebug extension.
./configure --with-php-config=/opt/php-7.1/bin/php-config && makeFind the PHP extension directory.
/opt/php-7.1/bin/php -i | grep extension_dirCopy the extension to the PHP extension directory.
cp modules/xdebug.so /opt/php-7.1/lib/php/extensions/no-debug-non-zts-20160303/To enable xDebug, open /opt/php-7.1/lib/php.ini.
vim /opt/php-7.1/lib/php.iniAdd the following line at the end (being sure to use a full path):
[...]
zend_extension = /opt/php-7.1/lib/php/extensions/no-debug-non-zts-20160303/xdebug.soRestart the PHP-FPM daemon and restart Apache 2:
service php71-fpm restart
service httpd restartIn ISPConfig 3, 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:
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
Then go to the PHP-FPM Settings tab and fill out the fields as follows:
Path to the PHP-FPM init script: /etc/init.d/php71-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
mkdir /opt/php-7.2
mkdir /usr/local/src/php72-build
cd /usr/local/src/php72-build
wget http://www.php.net/get/php-7.2.5.tar.bz2/from/this/mirror -O php-7.2.5.tar.bz2
tar jxf php-7.2.5.tar.bz2
cd php-7.2.5yum groupinstall 'Development Tools'
yum install libxml2-devel libXpm-devel gmp-devel libicu-devel t1lib-devel aspell-devel openssl-devel bzip2-devel libcurl-devel libjpeg-devel libvpx-devel libpng-devel freetype-devel readline-devel libtidy-devel libxslt-devel libmcrypt-devel pcre-devel curl-devel mysql-devel ncurses-devel gettext-devel net-snmp-devel libevent-devel libtool-ltdl-devel libc-client-devel postgresql-develIn order to compile PHP with zip support, libzip-devel is required. The repository version is not high enough and libzip-last-devel causes compile errors.
wget https://cmake.org/files/v3.11/cmake-3.11.1.tar.gz
tar zxvf cmake-3.11.1.tar.gz
cd cmake-3.11.1
./bootstrap
make && make install
cd ..
wget https://libzip.org/download/libzip-1.5.1.tar.gz
tar zxvf libzip-1.5.1.tar.gz
cd libzip-1.5.1
mkdir build
cd build
/usr/local/bin/cmake ..
make && make test && make installThe libsodium-devel package is necessary for compiling PHP 7.2 with the Sodium extension, however the repository version (currently 0.4.5) is not high enough and version 1.0.8 or higher is required. Installing it from source is the easiest option.
cd /usr/local/src/php72-build
git clone -b stable https://github.com/jedisct1/libsodium.git
cd libsodium && ./configure && make check && make installConfigure and build PHP 7.2 as follows: (use ./configure --help for available options)
cd /usr/local/src/php72-build
./configure \
--prefix=/opt/php-7.2 \
--with-libdir=lib64 \
--disable-rpath \
--enable-fpm \
--with-fpm-user=apache \
--with-fpm-group=apache \
--enable-cgi \
--with-libxml-dir=/usr \
--with-openssl \
--with-pcre-regex \
--with-zlib \
--enable-bcmath \
--with-bz2 \
--enable-calendar \
--with-curl \
--enable-exif \
--enable-ftp \
--with-gd \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib-dir \
--with-freetype-dir \
--with-gettext \
--with-mhash \
--with-imap \
--with-kerberos \
--with-imap-ssl \
--enable-mbstring \
--enable-mbregex \
--with-mysqli \
--enable-opcache \
--enable-pcntl \
--with-pdo-mysql \
--enable-soap \
--enable-sockets \
--with-sodium \
--enable-sysvsem \
--enable-sysvshm \
--with-xmlrpc \
--with-xsl \
--enable-zip \
--with-libzip \
--enable-inline-optimizationThe last switch (--enable-fpm) makes sure this PHP version will work with PHP-FPM. If you want to use this PHP-FPM version with Apache, please use --with-fpm-user=apache and --with-fpm-group=apache; if you want to use this PHP-FPM version with nginx, please use --with-fpm-user=nginx and --with-fpm-group=nginx.
make && make installCopy php.ini, php-fpm.conf, and www.conf to the correct locations:
cp /usr/local/src/php71-build/php-7.2.5/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.confOpen /opt/php-7.2/etc/php-fpm.conf and adjust the following setting:
vim /opt/php-7.2/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. 8972; port 9000 might be in use by the default PHP-FPM already):
vim /opt/php-7.2/etc/php-fpm.d/www.conf[...]
listen = 127.0.0.1:8972
[...]Next create an init script for PHP-FPM:
vim /etc/init.d/php72-fpm#! /bin/sh
### BEGIN INIT INFO
# Provides: php72-fpm
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts php72-fpm
# Description: starts the PHP FastCGI Process Manager daemon
### END INIT INFO
php_fpm_BIN=/opt/php-7.1/sbin/php-fpm
php_fpm_CONF=/opt/php-7.1/etc/php-fpm.conf
php_fpm_PID=/opt/php-7.1/var/run/php-fpm.pid
php_opts="--fpm-config $php_fpm_CONF"
wait_for_pid () {
try=0
while test $try -lt 35 ; do
case "$1" in
'created')
if [ -f "$2" ] ; then
try=''
break
fi
;;
'removed')
if [ ! -f "$2" ] ; then
try=''
break
fi
;;
esac
echo -n .
try=`expr $try + 1`
sleep 1
done
}
case "$1" in
start)
echo -n "Starting php-fpm "
$php_fpm_BIN $php_opts
if [ "$?" != 0 ] ; then
echo " failed"
exit 1
fi
wait_for_pid created $php_fpm_PID
if [ -n "$try" ] ; then
echo " failed"
exit 1
else
echo " done"
fi
;;
stop)
echo -n "Gracefully shutting down php-fpm "
if [ ! -r $php_fpm_PID ] ; then
echo "warning, no pid file found - php-fpm is not running ?"
exit 1
fi
kill -QUIT `cat $php_fpm_PID`
wait_for_pid removed $php_fpm_PID
if [ -n "$try" ] ; then
echo " failed. Use force-exit"
exit 1
else
echo " done"
echo " done"
fi
;;
force-quit)
echo -n "Terminating php-fpm "
if [ ! -r $php_fpm_PID ] ; then
echo "warning, no pid file found - php-fpm is not running ?"
exit 1
fi
kill -TERM `cat $php_fpm_PID`
wait_for_pid removed $php_fpm_PID
if [ -n "$try" ] ; then
echo " failed"
exit 1
else
echo " done"
fi
;;
restart)
$0 stop
$0 start
;;
reload)
echo -n "Reload service php-fpm "
if [ ! -r $php_fpm_PID ] ; then
echo "warning, no pid file found - php-fpm is not running ?"
exit 1
fi
kill -USR2 `cat $php_fpm_PID`
echo " done"
;;
*)
echo "Usage: $0 {start|stop|force-quit|restart|reload}"
exit 1
;;
esacMake the init script executable and create the system startup links:
chmod 755 /etc/init.d/php72-fpm
chkconfig --levels 235 php72-fpm onFinally start PHP-FPM:
service php72-fpm startMcrypt is a PHP extension that provides bindings for the defunct libmcrypt cryptography library that hasn't been updated since 2007. It has been officially deprecated since PHP 7.1 and it's recommended replacement libsodium has been available for some time. Beginning with PHP 7.2, libsodium is included in the PHP core. All current code should be written to use Sodium, not Mcrypt. However, it can still be installed if you really need the legacy support.
cd wget https://pecl.php.net/get/mcrypt-1.0.1.tgzTo enable the Zend OPcache, open /opt/php-7.2/lib/php.ini.
vim /opt/php-7.2/lib/php.iniAdd the following line at the end:
[...]
zend_extension=opcache.soRestart the PHP-FPM daemon and restart Apache 2:
service php72-fpm restart
service httpd restartPHP 7.x support was added starting with APCu version 5.x
cd /usr/local/src/php72-build/
git clone https://github.com/krakjoe/apcu
cd apcuPrepare the sources by running phpize from PHP 7.2.
/opt/php-7.2/bin/phpizeConfigure and build the APCu extension.
./configure --enable-apcu --with-php-config=/opt/php-7.2/bin/php-config
makeFind the PHP extension directory.
/opt/php-7.2/bin/php -i | grep extension_dirCopy the extension to the PHP extension directory.
cp modules/apcu.so /opt/php-7.2/lib/php/extensions/no-debug-non-zts-20170718To enable APCu, open /opt/php-7.2/lib/php.ini.
vim /opt/php-7.2/lib/php.iniAdd the following line at the end:
[...]
extension=apcu.so
apc.enabled=1
apc.shm_size=128M
apc.ttl=0
apc.gc_ttl=600
apc.enable_cli=1
apc.mmap_file_mask=/tmp/apc.XXXXXX
;apc.mmap_file_mask=/dev/zero
;apc.shm_segments = 5Restart the PHP-FPM daemon and restart Apache 2:
service php72-fpm restart
service httpd restartmkdir /usr/local/src/php72-build/php-memcache
cd /usr/local/src/php72-build/php-memcache
yum install libmemcache-develInstall the Memcache PHP 7 port on GitHub.
wget https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip
unzip NON_BLOCKING_IO_php7.zip
cd pecl-memcache-NON_BLOCKING_IO_php7Prepare the sources by running phpize from PHP 7.2.
/opt/php-7.2/bin/phpizeConfigure and build the PHP memcache extension.
./configure --enable-memcache --with-php-config=/opt/php-7.2/bin/php-config
makeFind the PHP extension directory.
/opt/php-7.2/bin/php -i | grep extension_dirCopy the extension to the PHP extension directory.
cp modules/memcache.so /opt/php-7.2/lib/php/extensions/no-debug-non-zts-20170718To enable Memcache, open /opt/php-7.2/lib/php.ini.
vim /opt/php-7.2/lib/php.iniAdd the following line at the end:
[...]
extension=memcache.soRestart the PHP-FPM daemon and restart Apache 2:
service php72-fpm restart
service httpd restartyum install make gcc glibc-devel libmemcached-devel zlib-devel git
cd /usr/local/src/php72-build/libmemcached-dev is required to build Memcached. The default repository version is not high enough and will not work.
wget http://mirror.symnds.com/distributions/gf/el/6/plus/x86_64/libmemcached-1.0.18-2.gf.el6.x86_64.rpm
wget http://mirror.symnds.com/distributions/gf/el/6/plus/x86_64/libmemcached-devel-1.0.18-2.gf.el6.x86_64.rpm
wget http://mirror.symnds.com/distributions/gf/el/6/plus/x86_64/libmemcached-libs-1.0.18-2.gf.el6.x86_64.rpm
yum install libmemcached-devel-1.0.18-2.gf.el6.x86_64.rpm libmemcached-1.0.18-2.gf.el6.x86_64.rpm libmemcached-libs-1.0.18-2.gf.el6.x86_64.rpmClone the Github repository
git clone https://github.com/php-memcached-dev/php-memcached.git
cd php-memcached/
git checkout -b php7 origin/php7Prepare the sources by running phpize from PHP 7.2.
/opt/php-7.2/bin/phpizeConfigure, build, and install the PHP memcached extension.
./configure --disable-memcached-sasl --with-php-config=/opt/php-7.2/bin/php-config
make && make installTo enable Memcached, open /opt/php-7.2/lib/php.ini.
vim /opt/php-7.2/lib/php.iniAdd the following line at the end:
[...]
extension=memcached.soRestart the PHP-FPM daemon and restart Apache 2:
service php72-fpm restart
service httpd restartThe ionCube Loader can be installed as follows:
cd /usr/local/src/php72-buildNext, download and unpack the correct ionCube Loader package for your architecture (x86_64 or x86).
** For x86_64: **
wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xfvz ioncube_loaders_lin_x86-64.tar.gz** For x86: **
wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
tar xfvz ioncube_loaders_lin_x86.tar.gzFind the PHP extension directory.
/opt/php-7.2/bin/php -i | grep extension_dirCopy the extension to the PHP extension directory.
cp ioncube/ioncube_loader_lin_7.2.so /opt/php-7.2/lib/php/extensions/no-debug-non-zts-20170718/ioncube.soTo enable the ionCube Loader, open /opt/php-7.2/lib/php.ini.
vim /opt/php-7.2/lib/php.iniAdd the following line at the beginning of the file (before the [PHP] line):
zend_extension = ioncube.so
[PHP]
[...]Restart the PHP-FPM daemon and restart Apache 2:
service php72-fpm restart
service httpd restartThe xDebug module is a debugging extension for PHP. The installation is optional.
Prepare the build folder and download the source files.
mkdir /usr/local/src/php72-build/php-xdebug
cd /usr/local/src/php72-build/php-xdebug
wget http://xdebug.org/files/xdebug-2.6.0.tgz
tar -xvzf xdebug-2.6.0.tgz
cd xdebug-2.6.0Prepare the sources by running phpize from PHP 7.2.
/opt/php-7.2/bin/phpizeConfigure and build the xDebug extension.
./configure --with-php-config=/opt/php-7.2/bin/php-config && makeFind the PHP extension directory.
/opt/php-7.2/bin/php -i | grep extension_dirCopy the extension to the PHP extension directory.
cp modules/xdebug.so /opt/php-7.2/lib/php/extensions/no-debug-non-zts-20170718To enable xDebug, open /opt/php-7.2/lib/php.ini.
vim /opt/php-7.2/lib/php.iniAdd the following line at the end (being sure to use a full path):
[...]
zend_extension = xdebug.soRestart the PHP-FPM daemon and restart Apache 2:
service php72-fpm restart
service httpd restartIn ISPConfig 3, 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:
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
Then go to the PHP-FPM Settings tab and fill out the fields as follows:
Path to the PHP-FPM init script: /etc/init.d/php72-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


