When updating / recompiling PHP with Custombuild on a DirectAdmin server I sometimes see that Apache seems to start, but immediately crashes due to errors regarding ionCube. You don’t see the error when restarting Apache for exaple, but checking the logs or listing the installed PHP modules results in the following error:
[root@server]# php -m
PHP Fatal error: [ionCube Loader] The Loader must appear as the first entry in the php.ini file in Unknown on line 0
I mostly see this behaviour on servers running CentOS and the first thing that I did was locating all php.ini files and remove all ioncube references from these configs. Unfortunately that didn’t work out and the error persists. Upon some internet searching I found out that the issue is caused by the internal “php.ini” that DirectAdmin itself uses. That file is called “directadmin.ini” and is located in:
I’ve removed the ioncube loader reference from the config and Apache could start and continue to work again.
This is a rather small post compared to the ones I normally publish, since this is a easy fix I wanted it to keep it as simple as possible hoping it will help others.