3

Sometime back, I had created a Joomla website on a third-party server. Now when I try to access the website, I'm seeing errors such as the following:

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

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

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

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

Strict Standards: Non-static method JLoader::load() should not be called statically in /home/chinfote/public_html/libraries/loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in /home/chinfote/public_html/libraries/loader.php on line 138

Strict Standards: Non-static method JRequest::clean() should not be called statically in /home/chinfote/public_html/libraries/joomla/import.php on line 33

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in /home/chinfote/public_html/libraries/joomla/environment/request.php on line 463

After searching on the net, I found that I should be making some changes in the php.ini file. But on the File Manager of the cpanel, I could not find this file. Could anyone please help me in finding this file and solving these errors. Or is there any other way to solve the above problem??

Many thanks in advance.

~Jahnavi

  • 1
    There are some hosting companies who don't provide access to php.ini. Furthermore, I think you want to turn off error reporting which should be done in the first place on a production environment, contact your hosting company for this matter. By the way I think you can turn off error reporting in Joomla administration panel. – HamZa Apr 20 '13 at 17:09
  • 1
    You can turn off the error reporting in the global configuration in the joomla backend or ask you host to disable strict error reporting – Lodder Apr 20 '13 at 17:12
  • I'm not even able to access the Joomla backend. The same errors on this as well. When contacted the hosting company, they said that they cannot solve coding issues. :( Will try again though. Thanks. Please let me know if there's anything else I could do. – Jahnavi K. Abhyuday Apr 20 '13 at 17:18
  • @HamZaDzCyberDeV On asking the hosting company, they said Since the php version as been upgraded to 5.4.11 I have to visit the joomla forum and re configure your web site. Any idea how I can do this?? – Jahnavi K. Abhyuday Apr 20 '13 at 18:06
  • 1
    It's not a coding issue. Just edit configuration.php to lower the error reporting. If you upgrade to a current version of joomla you won't have this problem. – Elin Apr 20 '13 at 22:47
  • Please Refer to this thread,Solution is here http://stackoverflow.com/questions/7771128/error-while-install-joomla – Dinesh Belkare Mar 04 '15 at 07:27

14 Answers14

10

Joomla 1.5 work in PHP 5.4.

You can paste this code index.php for frontend and backend. It works for me!

// Set flag that this is a parent file

define( '_JEXEC', 1 );

error_reporting( E_ERROR | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING );
Bora
  • 10,529
  • 5
  • 43
  • 73
PUSTAKAKORAN.COM
  • 455
  • 1
  • 5
  • 18
7

Suppressing the warnings is not the same thing as fixing them.

Joomla might might have a lot of functionality built-in but it's security history is far from exemplory. Have you got the latest version of Joomla installed? If not, then do so now. If you are still getting warnings then report it as a bug.

symcbean
  • 47,736
  • 6
  • 59
  • 94
3

I have encountered same issue, my configuration was Joomla 1.5 on shared hosting server.

However the hosting provider upgraded PHP Version to 5.4 from 5.2 . It seems that Joomla 1.5 is not compatible with PHP Version 5.4, so instead of supressing your errors (which of course is not a nice idea) try adjusting the PHP Version on your shared hosting/ or dedicated hosting...

Cheers. If there is a warning do not hide it - resolve it...!!! :)

utkarshk
  • 147
  • 7
1

unbelievable. you people are obviously not coders if all you are trying to do is to HIDE the message. Messages are there for a reason. find the function in your component and put the word static in front of it. function import( change to static function import(

Problem solved. not hidden

joe
  • 11
  • 1
  • 1
    And that is what the answer with the most votes is saying. So what is your point of repeating that? – GhostCat Dec 31 '16 at 09:55
0

You will find it in (for linux) /etc/php.ini

Try this: Replace display_errors = On --> display_errors = Off

error_reporting = E_ALL | E_STRICT --> error_reporting = E_ALL & ~E_NOTICE

Imane Fateh
  • 2,418
  • 3
  • 19
  • 23
  • Or is there just any other way I could solve the above problem?? – Jahnavi K. Abhyuday Apr 20 '13 at 17:12
  • Have you put your website in a shared server? or do you have a dedicated server which you can get connected to using ssh – Imane Fateh Apr 20 '13 at 17:15
  • Log in as admin, In the top menu, click Global Configuration then PHP Information tab. Scroll down the list of php settings until you find the Loaded Configuration File setting. The Loaded Configuration File will show the path to the php.ini file your Joomla website is using. Try to access to this file, if you don't have the right to do it, try to turn off error reporting in the global configuration – Imane Fateh Apr 20 '13 at 17:16
  • The website is on a shared server. Apparently, I cant even login as admin as the admin page too throws the above errors :( I am only able to login to the cpanel – Jahnavi K. Abhyuday Apr 20 '13 at 17:25
  • Try to host your site in wamp (in localhost) and tell me what happens – Imane Fateh Apr 20 '13 at 18:01
0

If there are no php.ini file in your joomla root directory make a new phi.ini file in using Cpanel ( create a new file ) and do you stuff with it

underscore
  • 6,495
  • 6
  • 39
  • 78
  • How can I find the joomla root directory using the cpanel? Sorry for the silly questions, its the first time I've created a website. – Jahnavi K. Abhyuday Apr 20 '13 at 17:37
  • Can u see some files in the public_html folder ? – underscore Apr 20 '13 at 17:42
  • Yes, I did the following: Navigated to public_html -> libraries -> joomla and created a file named php.ini in this folder and added the following lines there: display_errors = Off and error_reporting = E_ALL & ~E_NOTICE . But on refreshing my web page, the errors are still seen there :( – Jahnavi K. Abhyuday Apr 20 '13 at 17:44
  • 1
    If you have access to php.ini set the display_errors directive to Off If you don't have access to php.ini error_reporting(0); in your code – underscore Apr 20 '13 at 18:11
0

Switch your php version to php 5.3

also change the error_reporting in your joomla configuration file (configuration.php)

var $error_reporting = '6143';
Ahm3d Said
  • 802
  • 9
  • 20
0

You can solve the problem only if you return to php 5.2 or you will change the new version to work with J 1.5

Bogdan
  • 1
0

Two things to address and surpass the errors 1. set error reporting to none in configuration 2. Your joomla version may be old ,

Anoop P S
  • 754
  • 1
  • 12
  • 31
0

You can paste this code index.php for administrator and frontend.

// Set flag that this is a parent file

    define( '_JEXEC', 1 );

error_reporting( E_ERROR | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING );
Lucas Catani
  • 37
  • 1
  • 11
-1

Some hosters don't allow the PHP.ini to be read from the root of the folder. But if they do, you may need to add another one for your /administrator folder. This may at least let you get into the backend. If not, you may be able to set these PHP parameters through your htaccess file. Might need a little more google searching but there should be plenty of info on it...

BodgeIT
  • 401
  • 4
  • 14
-1
Strict Standards: Non-static method JLoader::import() should not be called
statically in /home/chinfote/public_html/libraries/joomla/import.php on line 29

You will find it in server.. /etc/php.ini

Try this: Replace display_errors = On To display_errors = Off

Elisha
  • 4,811
  • 4
  • 30
  • 46
-1

Just do as follows in php.ini file:

;error_reporting = E_ALL | E_STRICT
durron597
  • 31,968
  • 17
  • 99
  • 158
-2

You can add these lines to your .htacces file ; if your only problem is shown errors.

php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
php_value docref_root 0
php_value docref_ext 0
Preview
  • 35,317
  • 10
  • 92
  • 112