php-error.log keeps reporting the same error multiple times. Seems like with every browser request. Caching is disabled on most pages as this is a dynamic site with user-generated content.
In php.ini, both ignore_repeated_errors and ignore_repeated_source are On.
Does anybody have any ideas to fix this?
Thank you in advance
PHP log will not ignore repeated errors with ignore_repeated_errors = On – It will happen per script execution (so normally yes…per request). How are you running PHP (mod_php, fastcgi,…)? The best option would be to filter the log afterwards, but if you really want to get in there earlier you could use something like a cache that’s passed through with the error message and only logged if there’s a cache miss.
Or if you’re running a typical LAMP stack you could use a db table for logging and only insert the new line if a recent one doesn’t exist.