Issue installing Ioncube with PHP 5.6.11 with Apache 2.4.16 on centOS 6.7

apache-2.4centos6ioncubephp5zend

This is how I am compiling PHP 5.6.11 with apache2 2.4.16 on cenOS 6.7:

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/lib --with-mysql --with-curl --with-openssl --disable-fileinfo --enable-bcmath --enable-calendar --enable-ftp --enable-libxml --enable-mbstring --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-wddx --with-kerberos --with-mcrypt --enable-sockets --with-zlib --with-pdo-mysql --with-mysqli --with-gettext --enable-cgi --enable-mbstring --with-gd --enable-pdo --with-pdo-mysql --with-pdo-pgsql --with-mysqli=/usr/bin/mysql_config --with-mysql-sock=/var/lib/mysql/mysql.sock '--with-snmp' '--enable-soap'

But when I include ioncube loader in php.ini with:

zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_5.6.so

It starts giving me this error on php version check:

php -v Failed loading /usr/lib64/php/modules/ioncube_loader_lin_5.6.so:

/usr/lib64/php/modules/ioncube_loader_lin_5.6.so: undefined symbol:
executor_globals PHP 5.6.11 (cli) (built: Dec 28 2015 17:35:58)
Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright
(c) 1998-2015 Zend Technologies

I am also sure about the extension directory, because I get this:

php -i | grep extension_dir Failed loading /usr/lib64/php/modules/ioncube_loader_lin_5.6.so:

/usr/lib64/php/modules/ioncube_loader_lin_5.6.so: undefined symbol:
executor_globals extension_dir => /usr/lib64/php/modules/ =>
/usr/lib64/php/modules/ sqlite3.extension_dir => no value => no value

So, I have put ioncube_loader_lin_5.6.so in modules directory.

Meanwhile I am getting blank screen on ioncube encoded page. I have tried to figure out the error "undefined symbol: executor_globals" which generally comes when there is a version difference between php and ioncube. But I am using the correct loader 5.6 for php 5.6.11.

Please help me get out of this nasty thing.

Best Answer

As requested, and for more visibility:

The Thread Safety in both the ionCube Loader and the PHP binary have to match - e.g. if php -i | grep "Thread Safety" -i shows up as enabled, you must use the thread-safe ionCube Loader.

Related Topic