Tuesday, July 17, 2012

How to fix Joomla error ‘Strict Standards’ when using Apache Xampp 1.7 and 1.8?

Many people fear to upgrade the Apache like Xampp or AppServ, because some of their codes might need to be changed or display errors when upgrading, esp for Joomla. For Xampp version 1.7.3 and bellow there will not have any error when using with Joomla.

Currently joomla has upgrade himself to 2.5+, but there will be lots of error if you are using Xampp version 1.7.4 to 1.8.+, 'Strict Standards' error message will appears all in your page. And this is happened because of these Xampp version ship with default php that cause the PHP interpreter to choke on poor programming (let's say Joomla is) practices and deprecated language features.

To fix this you have to get into your Xampp installation folder:
1. Open php.ini (ex: D:\xampp\php)
2. Find the whole word "error_reporting = E_ALL | E_STRICT"
then replace with this command "error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED"
3. Find the whole word "display_errors = On"
then replace with this command "display_errors = Off"
4. Restart your Apache server
5. Reload your web page
6. Done

Normally, you won’t notice this setting, in the Pre-installation Check when you installing Joomla under XAMPP, then it will warn you that the Display Errors setting is set to On when the recommended setting is Off. This is why you need to make it off, but actually it is not recommended for all.

If you want to debug other php code, you should not set it off, you can do individual joomla website by just edit the .htaccess by input the line bellow :
# 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

** Fixing error is better than ignore error.
-----------------------------------------------------
Source : www.Vutha.net