2

I upgraded PHP version from 5.6.8 to 5.6.9 by Custombuild of Directadmin. The problem is after that I got fatal error on php:

PHP Fatal error:  [ionCube Loader] The Loader must appear as the first entry in the php.ini file in Unknown on line 0

I found there is a file /usr/local/lib/php.conf.d/10-directadmin.ini that has this line:

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

After I remove this line, there is no error but the Ioncube is not working.

What can be the problem? Thank you.

1 Answers1

0

Edit: For completeness, there was indeed an issue between XCache and the ionCube Loader. ionCube has since released a new Loader version with a workaround to this issue (v 5.0.7).


As the first errors indicates, the ionCube Loader has to be the first zend_extension loaded by PHP. Removing the line

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

disables the ionCube Loader, so you won't have access to its features (such as running ionCube encoded files).

To fix the error, copy this deleted line to the top of your main php.ini file; if you don't have any zend_extension entries in your php.ini file, you can also try to load your config file /usr/local/lib/php.conf.d/10-directadmin.ini first, e.g. by renaming the file to 00-directadmin.ini. Just make sure that the zend_extension line for the ionCube Loader comes before any other zend_extension entry.

SebiH
  • 669
  • 1
  • 8
  • 18
  • It still not working. Maybe the problem found on `httpd.conf` file? `[lbmethod_heartbeat:notice] [pid 13388] AH02282: No slotmem from mod_heartmonitor [:notice] [pid 13388] mod_ruid2/0.9.8 enabled PHP Fatal error: [ionCube Loader] The Loader must appear as the first entry in the php.ini file in Unknown on line 0` – יוסי פיבקו May 16 '15 at 23:38
  • You should use comments on StackOverflow, but concerning the issue: `http.conf` shouldn't be the problem. Have you tried moving the ionCube Loader `zend_extension` entry to the top of your `php.ini` file? It's possible that you missed a zend_extension that is loaded before the ionCube Loader, which will throw the error. – SebiH May 16 '15 at 23:40
  • Curious. Check if something in your configuration tries to load the ionCube Loader twice. If that doesn't help, it's best to open up a ticket at http://ioncu.be/S to make sure that you're not encountering any new bugs. – SebiH May 16 '15 at 23:46
  • I found that if I remove xcache config from `php.ini` is resolve. But I need xcache. The xcache config is: `extension=/usr/local/lib/php/extensions/no-debug-non-zts-20131226/xcache.so xcache.disable_on_crash = On xcache.cacher=On xcache.stat=On xcache.readonly_protection=Off xcache.mmap_path="/dev/zero" xcache.count=1 xcache.size=1024M xcache.slots=8K xcache.ttl=3600 xcache.gc_interval=300 ; xcache.optimizer=On xcache.var_count=1 xcache.var_size=12M xcache.var_slots=8K xcache.var_ttl=0 xcache.var_maxttl=3600 xcache.var_gc_interval=300` – יוסי פיבקו May 16 '15 at 23:51
  • That does indeed sound like a problem with ionCube itself. If you haven't already, open a ticket on the ionCube Helpdesk, there could be a solution already. Just note that office times start on monday, so it might be a while. – SebiH May 16 '15 at 23:56
  • I guess you don't know how stackovefflow works, but you __SHOULD__ update your question and not post an "answer", that's not even that. – Pedro Lobito May 16 '15 at 23:57
  • I understood that. It will not happen again. @SebiH It not problem in `xcache`? – יוסי פיבקו May 16 '15 at 23:59
  • @יוסיפיבקו Possibly. Consider using PHP's [built-in opcache](http://php.net/manual/en/book.opcache.php) as an alternative. I'll have to check with the development team of the Loader, which will have to wait until monday. – SebiH May 17 '15 at 00:22