PHP executing multiple times

I have a standard LAMP setting on my machine. This morning he began to execute scripts several times.

For example, in the code:

log_message('error', "here be a message ".rand()); exit; 

TWO strong> messages with a different random number are recorded in my log file , despite the fact that there is an output in the script. I didn’t have this before, and I'm a bit stumped. Can someone give me any clues as to why this could be happening?

+4
source share
1 answer

If you are rewriting the URLs, a common problem could be the browser requesting /favicon.ico , which causes the second request. The easiest way to check this is to temporarily add REQUEST_URI to the log line:

 log_message('error', "{$_SERVER['REQUEST_URI']} - here be a message ".rand()); exit; 
+7
source

All Articles