I run a large site with many php files and my error_log is being filled with hundreds of thousands of lines of the following: "Cannot modify header information - headers already sent in Unknown on line 0" Code (markup): I know what usually causes the issue and have checked the start of all php files with a hex editor to remove any utf8 characters. I have also checked all headers and setcookies are before any text output on all pages. What makes it strange is the error/warning is never output on the screen yet it's appearing thousands of times an hour for all users. I'm really struggling to find this, does anyone have any ideas on what else could be causing it? Does that fact that it's unknown on line 0 help at all? EDIT This warning does not occur if the following line is commented out: php_value output_handler ob_gzhandler Code (markup): but why would this cause the above warnings?
log_errors = On to offBut I think you should just change the error_reporting instead of change log_errors to off
But I want to try and locate the source of the problem instead of simply stopping the errors being displayed.
change your error_reporting to E_ALL and restart webserver, you should be able to see which file access and contain that error
It still shows exactly the same, I sometimes get a referrer but this doesn't help find what's causing the problem.
Try this.... Write ob_start(); at the very first line of your php page and write ob_flush(); on the same page where your php code ends