Reputation: 1481
I've got a standard LAMP setup on my machine. This morning, it started executing scripts multiple times.
For instance, in the code:
log_message('error', "here be a message ".rand()); exit;
My log file is recording TWO log messages with a different random number, despite there being an exit in the script. I've not had this before and a little bit stumped. Can anyone give me any clues as to why this might be happening?
Upvotes: 4
Views: 1029
Reputation: 33148
If you're rewriting URLs a common issue can be the browser requesting /favicon.ico
, which causes a second request. The simplest way to check this is to temporarily add the REQUEST_URI to your log line:
log_message('error', "{$_SERVER['REQUEST_URI']} - here be a message ".rand());
exit;
Upvotes: 8