homepage Welcome to WebmasterWorld Guest from 54.196.197.153
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Duplicate log entries
gsmith




msg:3906540
 6:41 pm on May 4, 2009 (gmt 0)

Every time someone (or something) GETs one of my web pages, I log the call from PHP. It's a simple SQL INSERT statement that saves a few values in $_SERVER[''] to MySQL.

Often there will appear two log entries for the same GET, within one second of each other. This does not happen consistently. Sometimes there are no duplicate records, very infrequently three records. I've verified that these are for the exactly identical values of $_SERVER['HTTP_REFERER'], and that these calls appear only once in the source code flow of logic.

What might be the cause?

 

rocknbil




msg:3906713
 10:13 pm on May 4, 2009 (gmt 0)

Have any of these happened while you are testing, and can you duplicate it?
within one second of each other.

I watch people double-click all the time, for many users it's just how they navigate, never knowing a single click is required. This could account for part of it.

The second is just a "suspicion" of mine. I'm on satellite, and satellite is inherently a proxy server. My requests are sent to the proxy and routed through. Sometimes I suspect something gets hosed up in the routing and the proxy doesn't "know" if a request got through so it sends it again. I have no facts to verify this, but over the course of time I've experienced some oddities on some resources - for example, quite often on this site I get a double post and am not sure if this is an issue with the server here or my connection.

gsmith




msg:3906738
 10:50 pm on May 4, 2009 (gmt 0)

I just tested the double-click hypothesis from my own PC, and saw that there are double log entries regardless, although not consistently.

My web site is on a GoDaddy (just did a search to verify that it's OK to mention them) shared server. Could this set-up relate to your second scenario?

In any case, thanks.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved