PHP Fatal error: [ionCube Loader] The Loader must appear as the first entry in the php.ini

匿名 (未验证) 提交于 2019-12-03 03:04:01

问题:

When i am trying to start Apache, the following error appears in the Apache error log:

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

回答1:

From the error message itself its clear what is the error. Please do some research before posting on stackoverflow.

Zend extensions can be loaded directly from /etc/php.ini file or included from /etc/php.d/ directory.

In the following example, this ioncube line must appear before any Zend configuration sections. These sections usually begin with [Zend] so they should be easy to see:

zend_extension=/usr/lib/ioncube/php_ioncube_loader_lin_X.X.so

If extensions are loaded from /etc/php.d, they are loaded in alphabetical order. Usually the ioncube file is named /etc/php.d/ioncube.ini and zend is /etc/php.d/zend.ini. In this scenario, it should not present a problem.

Finally, make sure that ioncube is loaded only once. The following command should only return one result:

grep 'zend_extension.ioncube' /etc/php.ini /etc/php.d/

If you make any configuration changes, always be sure to restart Apache:

/etc/init.d/httpd restart

https://mediatemple.net/community/products/dv/204404974/resolve-apache-error:-%22php-fatal-error:-%5Bioncube-loader%5D%22



回答2:

This error occurs because of an incorrect extension order in PHP configuration. Read this website may help you. You must load ioncube with higher priority.



回答3:

Came to this thread when looking for this error, as @Hari Swaminathan said.

If extensions are loaded from /etc/php.d, they are loaded in alphabetical order

I got the error on a docker setup. So naming ini file like 00-ioncube.ini solved the problem



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!