3

Caveat: I am new to PHP.

I have a very old php website that is producing a 300 MB php-errors.log file each day. I am trying to clean up some of the errors. I found out that 70% of the messages are coming from one php file. I temporarily want to turn off the notify messages for that particular module.

I read on php.net error reporting that I can retrieve and set the error_reporting level. Does setting the error reporting level change the reporting only for the php file it was set? Or will it change the settings for the entire site?

1 Answer 1

2

You can change the error reporting for the currently running application from that point on.

If you turn it off for myscript.php and that file include()s or require()s more files, those files will have error reporting changed too unless you override it again.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.