Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Despite the following settings below, I often see the path to the file producing the error. How do I turn off ALL errors no matter what?

error_reporting = E_ALL
display_errors = off
log_errors = off
share|improve this question
What command is giving the error, and what error is it showing? – Bort Jan 2 '13 at 22:45
@Bort - I would like it not to show file paths assuming there is a coding error, etc – PeanutsMonkey Jan 2 '13 at 23:24
up vote 7 down vote accepted

The display error statement is not what you actually want. You should change also the error_reporting value if you don't want to have the messages informing you about the error.

You should try this for all errors

error_reporting = off    


error_reporting = E_ALL & ~E_DEPRECATED

this will keep letting you know about the errors but they will be invisible to other users..

share|improve this answer
Thanks but how do I change it within the php.ini file as opposed to a php file? – PeanutsMonkey Jan 2 '13 at 23:23
Just be sure to continue logging the errors, otherwise you will wish you did when something bad happens. – Bort Jan 3 '13 at 0:19
@PeanutsMonkey can't you edit the php.ini file with an editor??i guessed the server was at your machine. – Jack Jan 3 '13 at 0:20
@Jack - Yes it is. I thought that error_reporting(0); is limited to PHP files not the php.ini file. – PeanutsMonkey Jan 3 '13 at 1:43
@Jack - I put the line of code i.e. error_reporting(0); and it literally killed the web server. Why is that? I had to remove it before I could bring it back up again. – PeanutsMonkey Jan 3 '13 at 2:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.