4

Out of nothing the Ioncube loader stopped working.

phpinfo()shows that there is no Ioncube loaded, and the website displays a HTML-500 error with "redirected you too many times" after turning on display_errors.

according to phpinfo() /etc/php5/apache2/php.ini is the apache php configuration file.

The first line of /etc/php5/apache2/php.ini reads

zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.6.so

and the file ist located in the folder as previously.

php -v was outputing some errors and warnings and after a debug attempt, I could fix them by manipulating /etc/php5/cli/php.ini, replacing some lines referring to older versions of the Ioncube and now it outputs

PHP 5.6.20-0+deb8u1 (cli) (built: Apr 27 2016 11:26:05)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.0.18, Copyright (c) 2002-2015, by ionCube Ltd. with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

Still, phpinfo() shows no Ioncube loaded and the error remains.

There seems to be similar problem reported here, Failed loading /usr/local/IonCube/ioncube_loader_lin_5.3.so but with no definitive answer.

I am dealing with multiple php.ini files and this may explain why the discrepancy, but I cannot find the solution. Do you have any idea how I could debug this?

Community
  • 1
  • 1
João Martins
  • 43
  • 1
  • 7
  • The Loader did not stop working; your PHP installation stopped installing it. Checking the CLI version is all well and good, but perhaps your system is no longer using PHP 5.6 for the web server software. Perhaps the php.ini file that references the Loader has been overwritten or is no longer one of the ini files read at startup. The web server error log and a phpinfo page served by the web server may give clues. – Nick Oct 31 '16 at 00:23
  • 1
    @Nick, many thanks for your answer. The ioncube is now loading. The problem was that I was placing `error_reporting(E_ALL);ini_set('display_errors', 'on');` before `zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.6.so`. I moved the error reporting lines to the beginning of index.php and now `phpinfo()` show the ioncube loaded and the website browser displays solely *IonCube Error Code:1*. This which is not much better but seems a different problem all together. I think I am again at step 1 of my problem, but I guess I learned something. If you have any more clues I really appreciate it – João Martins Oct 31 '16 at 10:32

1 Answers1

2

You should make sure you load ionCube encoder before any other zend_extension in your php.ini file.

You should also take note of error_reporting setting in your php.ini, if you have already set your php.ini file to report all errors and especially before loading the ioncube loader i.e

error_reporting=~E_ALL|~E_STRICT

You might get errors, but once you observe the aforementioned and update your php.ini, go ahead and save the changes and restart your apache

sudo apachectl restart

I hope this fixes your problem. Cheers!!

nensamuel
  • 566
  • 8
  • 10