PHP5-FPM won't start, when ioncube-loader extension will be enabled.
What i've done:
Prerequisites:
OS:
> uname -a
Linux halali 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u4 (2015-09-19) x86_64 GNU/Linux
PHP:
> php -v
PHP 5.6.14-0+deb8u1 (cli) (built: Oct 4 2015 16:13:10)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
Steps taken to enable the extension:
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xfv ioncube_loaders_lin_x86-64.tar
Since there is php 5.6 installed in my VM, i copied the 5.6-version of ioncube loader into the extension directory /usr/lib/php5/20131226.
> php -i | grep extension_dir
extension_dir => /usr/lib/php5/20131226 => /usr/lib/php5/20131226
> ls -l /usr/lib/php5/20131226/
total 4200
-rw-r--r-- 1 root root 89240 Oct 4 16:23 curl.so
-rw-r--r-- 1 root root 114200 Oct 4 16:23 gd.so
-rw-r--r-- 1 root root 23656 Oct 25 2014 geoip.so
-rw-r--r-- 1 root root 384200 Oct 21 2014 imagick.so
-rw-r--r-- 1 root root 415168 Oct 4 16:23 intl.so
-rwxr-xr-x 1 root root 1418736 Nov 28 15:59 ioncube_loader_lin_5.6.so
-rw-r--r-- 1 root root 39696 Aug 1 2014 json.so
-rw-r--r-- 1 root root 48072 Oct 4 16:23 mcrypt.so
-rw-r--r-- 1 root root 107880 Oct 25 2014 memcached.so
-rw-r--r-- 1 root root 103720 Oct 25 2014 memcache.so
-rw-r--r-- 1 root root 155560 Oct 4 16:23 mysqli.so
-rw-r--r-- 1 root root 60504 Oct 4 16:23 mysql.so
-rw-r--r-- 1 root root 160344 Oct 4 16:23 opcache.so
-rw-r--r-- 1 root root 32072 Oct 4 16:23 pdo_mysql.so
-rw-r--r-- 1 root root 122440 Oct 4 16:23 pdo.so
-rw-r--r-- 1 root root 31576 Oct 4 16:23 readline.so
-rw-r--r-- 1 root root 865166 Aug 25 2014 xdebug.so
-rw-r--r-- 1 root root 98728 Nov 28 15:27 xhprof.so
In /etc/php5/fpm/php.ini, i added following line:
extension=ioncube_loader_lin_5.6.so
But then, php5-fpm isnt able to start:
sudo /etc/init.d/php5-fpm restart
[....] Restarting php5-fpm (via systemctl): php5-fpm.serviceJob for php5-fpm.service failed. See 'systemctl status php5-fpm.service' and 'journalctl -xn' for details.
failed!
I've also tried to addres the full path and filename of the .so-File in php-ini. It won't work either
In your php.ini you have to write:
zend_extension=/usr/lib/php5/20131226/ioncube_loader_lin_5.6.so
instead of
extension=...
The difference is, that the ioncube loader is a core extension like xdebug sitting directly into the zend engine itself.