2013-08-19

In server logs I see very often there is error

PHP Warning: session_start() [function.session-start]: Cannot send
session cache limiter - headers already sent (output started at
/public_html/templates/meta.php:294) in
/public_html/include/query.php on line 7

Seems obvious I got output started sooner...but

Errors gets generated only sometimes and I can't reproduce it this maybe because `session_start()' is inside of if statement.

This is the beginning of query.php

Everywhere query.php gets included before meta.php

meta.php is mostly html and js with few php blocks and line 294 is in middle of some js function.

But what intrigues me most is that I get this error as well for request that do not involve these two files at all.

For example

From access log

66.249.72.33 - - [19/Aug/2013:22:44:30 +0100] "GET /robots.txt HTTP/1.1" 404 7592 "-" "Mozilla/5.0 (compatible; Googlebot/2.1;
+http://www.google.com/bot.html)"

66.249.72.33 - - [19/Aug/2013:22:44:30 +0100] "GET /content_files/SPIKES%20protocol.pdf HTTP/1.1" 200 215267 "-"
"Mozilla/5.0 (compatible; Googlebot/2.1;
+http://www.google.com/bot.html)"

and error log

[Mon Aug 19 22:44:30 2013] [error] [client 66.249.72.33:44269] AH01215: PHP Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /public_html/templates/meta.php:294) in /public_html/include/query.php on line 7

[Mon Aug 19 22:44:30 2013] [error] [client 66.249.72.33:44269] AH01215: PHP Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /public_html/templates/meta.php:294) in /public_html/include/query.php on line 7

As You can see at 22:44:30 google bot made 2 requests
1st for robots.txt and he got 404 as there is no robots.txt
2nd for some pdf file

In both cases there is not php code involved but I got PHP warnings for these requests.

These are no other access logs from google bot before or after these.

Show more