php forum
php mysql forum
php mysql smarty
 
Topic Options
#249867 - 06/10/03 09:42 AM [6.1.1] View count too high
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
Suddenly the view counter on my site seems way off. A user mentioned that it adds two for every time a thread is visited, but when I checked yesterday it worked fine for me. Today, it does the same thing for me, and at least several others as well. It has also been mentioned some time ago, but it worked fine for me then so I never checked up on it.<br /><br />Looking at the code there is nothing which could create this phenomenon, there is only one place where the counter is updated in both showthreaded and showflat. At first I though that there might be a bug in my MySQL version (4.0.12) but checking other installations at the same server with the same code it works just fine.<br /><br />I'm at a loss as to what could be causing this and now I'm wondering if anyone else has noticed this.
_________________________
/Gardener | Complete list of my mods

Top
#249868 - 06/10/03 12:17 PM Re: [6.1.1] View count too high [Re: c0bra]
slayer60 Offline
Junior Member

Registered: 06/14/03
Posts: 1185
Loc: New Boston, NH
I haven't seen anything like this. Maybe you have a corrupt table. Just throwing it out there.

Top
#249869 - 06/10/03 01:37 PM Re: [6.1.1] View count too high [Re: BrokenToy]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
Nope, I've made an integrity check on the table so it's not that either. And if it was, it shouldn't be a problem with an old copy of the database either.
_________________________
/Gardener | Complete list of my mods

Top
#249870 - 06/10/03 02:15 PM Re: [6.1.1] View count too high [Re: c0bra]
slayer60 Offline
Junior Member

Registered: 06/14/03
Posts: 1185
Loc: New Boston, NH
So, after restoring a DB backup the problem still occours. Hmmm.

Top
#249871 - 06/10/03 03:51 PM Re: [6.1.1] View count too high [Re: BrokenToy]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
No, I haven't restored from a backup. I've done an integretiy check with mysiamchk which reports no problems at all. It's just that the exact same problem occurs on an old copy of the database which I use to insert hacks to the code before I add them to the production site. The testing site, where I do all my hacking, works perfectly fine -- the showthread/showflat scripts are exactly the same on it, the databases are on the same database server and the tables should be the same except for the amount of data in them. Very strange indeed.
_________________________
/Gardener | Complete list of my mods

Top
#249872 - 06/10/03 04:10 PM Re: [6.1.1] View count too high [Re: c0bra]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
This is beyond weird... When I enter the post, the post count is incremented by one just as it should, at least according to the view counter in the extra info box. But when I go back to the postlist, the number is incremented by one again, regardless of if I use the back button in the browser or click on "Index". Also, sometimes the counter is incremented even though vc is sent to the page, which should surpress the increment.<br /><br />Going to add an adminlog to whenever the post count is incremented now...
_________________________
/Gardener | Complete list of my mods

Top
#249873 - 06/10/03 04:31 PM Re: [6.1.1] View count too high [Re: c0bra]
slayer60 Offline
Junior Member

Registered: 06/14/03
Posts: 1185
Loc: New Boston, NH
I have no idea what that could be. Do you think it might be something in a footer(or something else that is on every page)?

Top
#249874 - 06/10/03 04:35 PM Re: [6.1.1] View count too high [Re: BrokenToy]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
OK, when I added the admin_log at the increment I found that the increment is run twice, so I took a look at the access log again. It seems that every request is doubled, with a two second delay (which is why I didn't notice it when I looked at the log for the production site). The second request increments the counter without it being shown, since it is the first query that is sent back to the browser.<br /><br />It seems that I get every request twice, or at least the ones to showflat/showthreaded... If this is true it means that I'm using way too much cpu and bandwidth than necessary... Not sure if this applies to all requests though... Need to check on this a bit more.
_________________________
/Gardener | Complete list of my mods

Top
#249875 - 06/10/03 07:53 PM Re: [6.1.1] View count too high [Re: c0bra]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
I'm very confused... When I load showflat, the webserver gets a second request about 2 seconds later, which it processes. The referer on the second request is the url of the first request... <br /> <br />If I add debug=1 to the url, the second request doesn't happen. But as far as I know, this only surpresses the template files and shows information about the queries. I don't understand why that should stop the second request from happening. <br /> <br />These doubled requests seems to happen on php pages, but not on all sites on the server... <br /> <br />Update: It seems to be Mozilla 1.3 that is the guilty party. Tried it with Opera 7.11 and the server only gets one request. Also tried with mozilla on another server with a completely different setup and I got more than one request there as well. The strange thing is, I don't think all who reported the counter problem uses mozilla, so my guess MSIE does this as well. I think I need to kick some browser developer butt, but now I have to get some sleep, maybe all becomes clear in the morning. =]


Edited by Gardener (06/10/03 08:59 PM)
_________________________
/Gardener | Complete list of my mods

Top
#249876 - 06/10/03 11:13 PM Re: [6.1.1] View count too high [Re: c0bra]
slayer60 Offline
Junior Member

Registered: 06/14/03
Posts: 1185
Loc: New Boston, NH
Thanks for keeping us updated.

Top
#249877 - 06/11/03 09:26 AM Multiple requests by Mozilla [Re: BrokenToy]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
Well, I really need help on this, and the real problem keeps changing... I don't know why mozilla and konqueror both make multiple request on one of my sites, but not all, and on my server at home. Opera only makes one request on the problem site, but makes more than one on my home server... This is really weird...<br /><br />I need to get some tcp sniffer to see if the requests are actually sent.
_________________________
/Gardener | Complete list of my mods

Top
#249878 - 06/12/03 12:37 PM Heeelllp. [Re: c0bra]
slayer60 Offline
Junior Member

Registered: 06/14/03
Posts: 1185
Loc: New Boston, NH
Any luck with this yet? I am baffled.

Top
#249879 - 06/12/03 02:13 PM Re: Multiple requests by Mozilla [Re: c0bra]
Astaran Offline
Addict

Registered: 12/21/00
Posts: 1545
Loc: Germany
Just a suggestion:<br />Is "Link prefechting" enabled in your Mozilla preferences?<br />I don't know exactly if it's in 1.3. In 1.4 you'll find it under preferences-->advanced-->cache.<br /><br />Maybe that causes the second request.
_________________________
Running a community? -> Keep informed and take it to the next level

Top
#249880 - 06/13/03 10:17 PM Re: Multiple requests by Mozilla [Re: -Fusion-]
navaho Offline
Veteran

Registered: 10/05/00
Posts: 2518
Loc: navahoville! :D
Gardener, check to see if it works the same using Mozilla with pipelining(sp?) off, then on.<br /><br />They have had a lot of problems with that preference.
_________________________
Picture perfect penmanship here.

Top
#249881 - 06/14/03 07:23 PM Re: Multiple requests by Mozilla [Re: zerind]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
Haven't checked with pipelining, unless it's the same as link prefetching, but the later didn't make any difference when I tried it a couple of days ago and no luck today either. Might try it again though since I was a bit tired when I tried to fix this strange occurance. But since it happens to a lot of people I don't believe it's a mozilla thing, since most people still use msie. Also, it doesn't happen on all sites on my server with my mozilla... <br /><br />Will check with a sniffer to see what requests are actually sent, to see if the problem is with my server or with the browser.
_________________________
/Gardener | Complete list of my mods

Top
#249882 - 06/23/03 10:31 AM Re: Multiple requests by Mozilla [Re: c0bra]
slayer60 Offline
Junior Member

Registered: 06/14/03
Posts: 1185
Loc: New Boston, NH
Did you ever get this figured out?

Top
#249883 - 06/23/03 11:18 AM Re: Multiple requests by Mozilla [Re: BrokenToy]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
Haven't had time to check on it and it hasn't been critical, especially since the other big site I host fixed a loop bug they had which relieved the server of a lot of load.<br /><br />I still do get double requests though. Tried it with Konqueror as well with the same result. Lynx from the server itself as well as from my home computer only results in one request. This is just too weird.
_________________________
/Gardener | Complete list of my mods

Top
#249884 - 06/27/03 05:49 AM Re: Multiple requests by Mozilla [Re: BrokenToy]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
Well, I just installed Firebird and the Live HTTP headers plugin to check what requests are getting sent. It turns out that for some reason an extra request for php pages are being sent when all images on the page has been loaded.
_________________________
/Gardener | Complete list of my mods

Top


Moderator:  Deb 
Who's Online
0 registered (), 23 Guests and 12 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Wisdom needed
by Gizmo
Today at 10:54 AM
How to hide sub forums from summary page
by blaaskaak
Yesterday at 09:54 AM
Spell Check [beta]
by Bill B
12/01/08 09:16 PM
PhotoPost BB Code Popup
by AllenAyres
12/01/08 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
12/01/08 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
12/01/08 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
Truth, David DelMonte, nick1, Begbie, cenk
13364 Registered Users
Top Posters
AllenAyres 25452
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks