Forums / Bug Reports / [Done 1.3.9] Counter History, Sessions and Spiders

[Done 1.3.9] Counter History, Sessions and Spiders

Locked

Started by cjpinder on 12 Apr 2007, 3:06 PM · Views: 6,145

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
12 Apr 2007, 3:06 PM
#1
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

[Done 1.3.9] Counter History, Sessions and Spiders

Hi,

I seem to be getting some weird behaviour with the Counter History in Zen Cart v1.3.7. Can anyone verify the following for me:

  1. The first column in the Counter History on the admin screen counts 'sessions'.
  2. Setting 'Prevent Spider Sessions' to True stops spiders from getting a session.
  3. Given the above two conditions, spiders should not be recorded in the Counter History.

Trouble is, it looks as if spiders are triggering the increase of the Session Counter in the Counter History.

Is it just me?

Kind regards,
Christian.

12 Apr 2007, 4:13 PM
#2
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Re: [Done 1.3.9] Counter History, Sessions and Spiders

I've had look in includes/counter.php and it is a bit of a mess. It looks as if a spider without a session will actually increase the session counter on every page access.

The quickest fix I can think of for the moment is just to enclose all the code in counter.php with if (session_id() != '') {} . Urrgh.

Hope that helps.
Christian.

18 Mar 2008, 7:26 PM
#4
mamasylvia avatar

mamasylvia

Zen Follower

Join Date:
Feb 2008
Posts:
379
Plugin Contributions:
0

Re: [Done 1.3.9] Counter History, Sessions and Spiders

I'll add a "please, please, pretty please." I really need to know how many visitors are actually coming to my site and how many (and, ideally, which) pages they are looking at before leaving or buying. I love Zen's many capabilities but this one is sadly lacking.

Sylvia
PM at your own risk, I don't check in regularly!
MamaSylvia.com My ZenCart tutorial

18 Mar 2008, 8:54 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: [Done 1.3.9] Counter History, Sessions and Spiders

Lotsa improvements coming :)

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

13 Sep 2008, 3:24 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: [Done 1.3.9] Counter History, Sessions and Spiders

In the meantime, the following adjustment may provide the relief you're seeking:

/includes/application_top.php
around line 111 (depending on your version) is this block of code:```
/**

  • load the counter code
    /
    // counter and counter history
    require(DIR_WS_INCLUDES . 'counter.php');
    Change it to this instead:
    /
  • load the counter code
    **/
    [B]if ($spider_flag == false) {[/B]
    // counter and counter history
    require(DIR_WS_INCLUDES . 'counter.php');
    [B]}[/B]

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

13 Sep 2008, 1:07 PM
#7
sawhorse avatar

sawhorse

Zen Follower

Join Date:
Oct 2007
Location:
Kentucky - USA
Posts:
425
Plugin Contributions:
0

Re: [Done 1.3.9] Counter History, Sessions and Spiders

Thank you.

ZC 1.3.8a; Addons: Admin Profiles, Ty Package Tracker; Swap Images via MouseOver or Click, Smart Backgrounds; Printable Price List; CSS buttons; Contact Us - Add Subject; Template: Self Constructed; Site: http://sawhorsejewelry.com

21 Nov 2008, 8:02 AM
#8
procella avatar

procella

New Zenner

Join Date:
Aug 2008
Posts:
97
Plugin Contributions:
0

Re: [Done 1.3.9] Counter History, Sessions and Spiders

CJPinder:

I've had look in includes/counter.php and it is a bit of a mess. It looks as if a spider without a session will actually increase the session counter on every page access.

The quickest fix I can think of for the moment is just to enclose all the code in counter.php with if (session_id() != '') {} . Urrgh.

Hope that helps.
Christian.

What does this code do?

http://www.zen-cart.com/forum/showthread.php?t=113647