Joomla website throwing errors - php

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

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 );

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.

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...!!! :)

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

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

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

Switch your php version to php 5.3
also change the error_reporting in your joomla configuration file (configuration.php)
var $error_reporting = '6143';

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

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

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 );

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...

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

Just do as follows in php.ini file:
;error_reporting = E_ALL | E_STRICT

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

Related

How do I avoid " PHP Strict Standards" if I cannot change the version of my PHP (PHP 5)

Here are some examples to some of the errors. I heard this is a result of old code in new code, but I can't change my PHP version off the native 5.4 version ispmanager uses because I need Apache. Tried switching version but it messes up my site. Any ideas?
PHP Strict Standards: Redefining already defined constructor for class Object in /var/www/ku/data/www/Public IP/cake/libs/object.php on line 54, referer: http://Public IP/posts/add
PHP Strict Standards: Non-static method Configure::getInstance() should not be called statically in /var/www/ku/data/www/Public IP/cake/bootstrap.php on line 38, referer: http://Public IP/posts/add
PHP Deprecated: Assigning the return value of new by reference is deprecated in /var/www/ku/data/www/Public IP/cake/libs/cake_log.php on line 182, referer: http://Public IP/posts/add```
adding this in your PHP code may solve your problem.
error_reporting(0);
#this will display no errors.
error_reporting(E_ALL ^ E_STRICT);
#this will make it just not strict
Is this what you need?
If you have access to the php.ini, add/change the following to it:
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
If you don't have access to the php.ini, and you run via Apache (you can have .htaccess file in root). Add this to .htaccess:
php_value error_reporting 30711
Last option is like mentioned by nikhil.

Joomla 1.5 Strict Standards error

So, I have been asked by a family friend to take a look at their site. It has just recently turned into a big garbled mess of errors such as;
Strict Standards: Non-static method JLoader::import() should not be called statically in /home/sitename/public_html/libraries/joomla/import.php on line 29
Strict Standards: Non-static method JLoader::register() should not be called statically in /home/sitename/public_html/libraries/loader.php on line 71
Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in /home/sitename/public_html/libraries/joomla/environment/request.php on line 462
I have been looking elsewhere and I have seen mention of changing error_reporting in configuration.php, I have changed it from
var $error_reporting = '-1';
to
var $error_reporting = '6135';
This removed a lot of the errors that was appearing on the page but there is still plenty that exist. Can anyone help me with clearing up the last lot of errors?
From what I can gather, the site is Joomla 1.5 which I know needs to be updated but if I can just get the errors to 'disappear' whilst I can work on updating the site or getting a new one built that would be great!
Thanks
Add $error_reporting = 22516 if you are using PHP 5.4.x
Add $error_reporting = 22519 if you are using PHP 5.3.x
Add $error_reporting = 6133 if you are using PHP 5.2.x
And if you have php.ini access, find error_reporting and assign E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
IF doesn't work
in your index.php after define( '_JEXEC', 1 ); add error_reporting(0); if not work, replace with error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED); Also, after each change if not work, check the error_reporting value in info page.
OR if you don't want to see any error, contact your host to disable display_errors or if you have access to php.ini then do that yourself.

run CakePHP 1.2.9 in PHP Version 5.4.19

I am running CakePHP 1.2.9 on my xampp server 1.8.2 with PHP version 5.4.19.
But I am getting some errors like
Strict Standards: Redefining already defined constructor for class Object in C:\xampp\htdocs\PROJECT_NAME\cake\libs\object.php on line 62
Strict Standards: Non-static method Configure::getInstance() should not be called statically in C:\xampp\htdocs\paris-clone\cake\bootstrap.php on line 46
I tried to figure this out with this, but not succeeded.
please help me with it.
Thanks
Since PHP 5.4 E_STRICT is included in E_ALL. Maybe CakePHP 1.x doesn't know of E_STRICT setting ?
http://php.net/manual/en/function.error-reporting.php
Change logging in your application to display only errors:
'level' => E_ERROR | E_WARNING | E_PARSE,
Or set in in php.ini.
You might also want to set level debug to disable error displaying on production mode in the first place. In cakephp 2 it is achieved by setting debug var in core.php:
Configure::write('debug', 0);

old joomla has Strict standards errors - no access to php.ini

I have a few old 1.5 joomla sites that have started showing large numbers of these errors:
Strict Standards: Non-static method JLoader::import() should not be called statically in /data02/eebackup/public_html/josephstorehouseuk/libraries/joomla/import.php on line 29
Strict Standards: Non-static method JLoader::register() should not be called statically in /data02/eebackup/public_html/josephstorehouseuk/libraries/loader.php on line 71
Strict Standards: Non-static method JLoader::import() should not be called statically in /data02/eebackup/public_html/josephstorehouseuk/libraries/joomla/import.php on line 32
I don't have access to the php.ini file and I can't login at the back end. I have tried the following:
In the configuration file:
var $error_reporting = '0'; - which left nothing but the above errors
then:
var $error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); which again seemd to turn the site off except the above errors
and
var $error_reporting(6351); as above
I tied altering
# supress php 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
to the htacess file (note not .htaccess) and that didn't work either.
I have run out of ideas
Joomla 1.5 should be never used again. Switch to newer version
Version 1.5
Release date 2008-01-22
Supported until *2012-12-01*
You must upgrade - also this versions have known unpatched vulnerabilities.
If you REALLY want to use that trash then
ini_set('display_errors', '0'); // Hides all errors
error_reporting(E_ALL | E_STRICT); // Allow logging them (if you log to the files, you should also ignore E_Strict as you already told - they will not fix it).
A client who has been unable to update his Joomla 1.5 site just experienced the same error deluge. It had been running fine until the host updated PHP without warning. I did exactly what the OP said did not work (in the original post) - by adding to .htaccess
(Note: edited .htaccess, not htaccess.txt)
# supress php 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
and errors were immediately cleared.
you need to do following in configuration.php
display_errors = Off
it might possible that they are enabled anywhere in the following
php.ini
httpd.conf
.htaccess
php code
once you change in configuration.php , you only need to look php code if its enabled anywhere.
other option is to login to mysql database, you change admin password and reset the error reporting.
Last thing, you need to update your joomla 1.5 to atleast 2.5.8. 1.5 has many security breached and vulnerable, it can be hacked see here http://www.r00tsec.com/2012/07/hacked-joomla-v-16x-17x-250-252.html

Joomla after migration on localhost

I have migrated joomla website from server to my localhost,initially i was not getting the front page content of the website it was just a white screen but the admin panel was working fine and all the contents are present there, then i have changed the error reporting to maximum in the global site configuration inside the admin panel of joomla after this site is showing the following error
Strict Standards: Declaration of fancyboxClass::getHeaderLibrary() should be compatible with JAPopupHelper::getHeaderLibrary($bodyString, $identifierString, $headerString) in C:\xampp\htdocs\joomla\plugins\system\japopup\fancybox\fancybox.php on line 18
Strict Standards: Declaration of oseLanguage::set() should be compatible with JObject::set($property, $value = NULL) in C:\xampp\htdocs\joomla\administrator\components\com_ose_cpu\oseregistry\oseLanguage.php on line 130
Strict Standards: Declaration of oseMscList::drawTree() should be compatible with oseMscListDraw::drawTree() in C:\xampp\htdocs\joomla\administrator\components\com_ose_cpu\membership\oseMscListDraw.php on line 365
Strict Standards: Non-static method oseMscConfig::getConfig() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\joomla\components\com_osemsc\init.php on line 44
Strict Standards: Static function osePaymentTaxExtend::getTaxAmount() should not be abstract in C:\xampp\htdocs\joomla\administrator\components\com_ose_cpu\payment\osePaymentTax.php on line 135
How can i solve these error.
Thanks.
Strict standards are quite rife with PHP 5.4. The best thing to do would be to turn strict error reporting off by editing your php.ini file on your localhost and changing this:
error_reporting = E_ALL
to this:
error_reporting = E_ALL & ~E_STRICT
Else simply download the PHP 5.3 extension for your localhost
Hope this helps
You could turn off strict errors on your local server via php.ini or .htaccess.
E_ALL & ~E_STRICT

Categories