|Joomla - how to turn off Display Errors
There have been many occasions when on installing Joomla you may notice that Display Errors is set to 'On', this is as a result of the php setup on your server.
Now if you are using a virtual or dedicated server, you may have access to the php.ini file, but for those of us that are using shared servers, access to the php.ini file can be prevented, this is due to the php setup being used for the entire server and not just one shared location.
Now usually with display errors set to on, this does not affect a Joomla site, but there have been occasions when I have installed some extensions which when published, have resulted in php errors being displayed on the site, to the public!
Now this is something that I nor any designer/developer should want their users to see when visiting a website.
I have spent a lot of time researching how to resolve this but to no avail. There are lots of solutions for altering the php.ini file and many solutions for altering the htaccess file, in fact that is where i first looked.
As I don't have access to the php.ini file on my shared server, I have been forced to work with the htaccess file, but so far, of all the htaccess file adaptations I have made, none resolved the issue, php errors were still being displayed on some sites I was working on.
But I have now found the solution.
If you are a shared hosting user and have come across this there is a very simple solution.
- Login to your Joomla installation
- Site menu
- Global Configuration
- Server tab
- Server Settings
- Now set the Error Reporting to 'None'.
This removes any php errors from now being displayed on your Joomla sites!
A very simple solution which I just could not find anywhere.