Support / KnowledgeBase

 
Search the KnowledgeBase Search

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

  • Applies to: All (dv)

  • Difficulty: Medium

  • Time needed: 10 minutes

  • Tools needed: ssh,root,vi

 

This article has been mirrored from the Parallels Knowledge Base as a courtesy to our (dv) Dedicated-Virtual Server customers. As they are the authoritative source of the information covered in this topic we encourage you to check their original article since this content is subject to change.

(mt) Media Temple makes a best effort to ensure the accuracy of all content contained herein. Please use our feedback form below if you would like to report any inaccuracies. Please note that our feedback form is not an official support channel.

The publishing of this information does not imply support of this article. This article is provided solely as a courtesy to our customers. Please consult our (dv) Scope of Support for further information.

This KB article was last updated on 2008-02-20 05:08:01 and applies to All (dv) Dedicated-Virtual Servers.


SYMPTOMS

When you are 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
  


CAUSE

This error occurs because your php extensions are loading in the wrong order in your PHP configuration.


RESOLUTION

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

In this example this 'ioncube' line must appear before any Zend configuration sections, which 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

Revisions:

2009-04-21: Article Creation

User Comments

No visitor comments posted. Post a comment

Fields marked with an asterisk(*) are required. Comment on this article

Fill out the form below if you would like to comment on this article.
 
 
 

(code is not case-sensitive)
 
Submit
 
 

Continue