Oct 27

PHP 5.4 : Strict standards : Non-static methods called statically

I got the following error while loading up a domain running on php 5.4

Strict Standards: Non-static method JLoader::import() should not be called statically in /home/user/public_html/libraries/joomla/import.php on line 29
Strict Standards: Non-static method JLoader::register() should not be called statically in /home/user/public_html/libraries/joomla/loader.php on line 71
Strict Standards: Non-static method JLoader::import() should not be called statically in /home/user/public_html/libraries/joomla/import.php on line 32

and I did the below steps to clear them

In php.ini,
changed error_reporting = E_ALL | E_STRICT to error_reporting = E_ALL & ~E_NOTICE

changed display_errors = On to display_errors = Off

If the above still doesn’t help you, do the following too.

In the domains index.php file set it like inside the php division.


This should fix it 🙂


Skip to comment form

  1. ronak

    Great job

    1. penguinbliss

      Thanks 🙂

  2. Tshering Dhendup

    Sometimes the above may not work. Please use the following to remove the PHP incompatabilities.

    Add the following in your .htaccess file.

    AddHandler application/x-httpd-php52 .php

    1. penguinbliss

      I don’t understand why this is related to the above error in my post, the AddHandler in your comment is to handle and parse the php script/pages inside your domain and for they being properly served when we request through apache webserver or any other webserver.

      Sometimes when there are multiple php versions available in a server, and some domains are using the non-default php version in server, they have use such AddHandler , AddType directives in their local htaccess file inorder to get their domains php pages correctly parsed with their own php version using in server, otherwise there is no issue since AddHandler, AddType etc are already defined in the apache conf for default php version.

  3. wp Lover who got his Joomla site in sh*t


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>