If you are here because:
(1) when you try to run Joomla 1.5.x, 1.6.x, or 1.7.x under XAMPP 1.7.4 or 1.7.7 you get lots of errors like Strict Standards: Accessing static property JCache … or
(2) you are running a popular PHP application and gettings errors when installing or running it out-of-the-box
then see this page instead.
NOT RECOMMENDED: One of the reasons for installing XAMPP is to be able to detect errors in your site and code. Disabling error reporting makes this a lot harder.
These instructions are for XAMPP version 1.7.3, but it should work for other versions as well.
If you are getting errors, the CORRECT thing to do is to FIX those errors, not hide them by turning off ‘display_errors’. Those errors are still there whether the setting is on or off.
Think of it this way, smoke detectors detect smoke from fires. If you have a fire in the house and the smoke detector goes off, pulling out the battery to silence the smoke detector does not fix the problem with the fire.
One of the default settings when XAMPP is installed is to display PHP errors when they occur. This is useful for debugging, but downright dangerous for a production environment.
Usually, you won’t notice this setting – unless you happen to be installing Joomla! under XAMPP, then it will warn you that the Display Errors setting is set to On when the recommended setting is Off. (Click for larger image)
This isn’t a problem. However, if you want to turn off the warning then do the following:
(1) Go to the php directory under XAMPP. Normally, this would be C:\XAMPP\php, but you may have installed it to a different drive or directory (mine is installed on my D: drive). Locate the file named php.ini . Open this file using a plain text editor – like notepad. Using a word processor (like Word) will very likely seriously corrupt the file. (I use an application called Notepad++). Note: The icon associated with php.ini will depend on what application is associated with .ini files.
(2a) Find the line
display_errors = On. In the XAMPP 1.7.3 install, this is line 531.
(2b) Change the On to Off.
(2c) Save the file.
(3) Restart the Apache server. The easiest way is to open the XAMPP control panel and click on the Stop button. Then click on Start to restart it. (You could also reboot the computer, but that is not necessary.)
NOT RECOMMENDED: The reason for installing XAMPP is to allow you to test and develop on your local machine. Getting feedback on any errors is important.