6

Although I have instructed php to only log an error once - i see the error over and over again in my log file. Any ideas why this directive would get ignored? I've restarted apache, etc.

2
  • Can you post an example? Commented Dec 27, 2009 at 0:17
  • Are you certain you're editing the right php.ini file? Look in phpinfo() to make sure. Commented Dec 27, 2009 at 0:18

2 Answers 2

9

This directive will only stop the error from being logged again within the same script run. When the same script is run multiple times, you will still see that error every time.

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

4 Comments

Okay, that makes sense thanks. Do you know if there is anyway to make it not re-record the error every time the script is run? I suppose I could put together a cron-job to clean it up ocassionally...
@sciguy14 Sorry for digging up such an old thread .. but have you found any solution to this issue? Did you switch over to a cron-job?
@GeneSys - I think I added what you need in new reply below
@userfuser Great. Thanks for answering old questions too :)
5

Besides the ignore_repeated_errors, there is also the ignore_repeated_source ini settings. I think that one would work for you and should stop showing the same error repeatedly, when same file is called over and over.

As PHP manual here says for it:

ignore_repeated_source - Ignore source of message when ignoring repeated messages. When this setting is On you will not log errors with repeated messages from different files or sourcelines

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.