Forums / Basic Configuration / Prevent Spider Sessions

Prevent Spider Sessions

Locked

Started by dealbyethan_com on 11 Sep 2006, 6:20 PM · Views: 8,989

Results 1 to 19 of 19
This thread is locked. New replies are disabled.
11 Sep 2006, 6:20 PM
#1
dealbyethan_com avatar

dealbyethan_com

Totally Zenned

Join Date:
Dec 2005
Location:
Perth, Western Australia, Australia
Posts:
782
Plugin Contributions:
0

Prevent Spider Sessions

Hi,

I just come across that I have been leaving my "Prevent Spider Sessions" turned off until today. A lot of my pages have been indexed. I read the threads about the disadvantages. Now that I have turned it on, is there anything else I must do? Please let me know. Thanks.

Best regards,
Ethan

**The Team Behind DealByEthan.com | **Curating unique finds for a discerning community. Committed to a seamless and inspiring shopping experience. *Connect with us: *https://linktr.ee/dealbyethan

11 Sep 2006, 6:29 PM
#2
louis avatar

louis

Zen Follower

Join Date:
Jul 2006
Location:
Johannesburg
Posts:
408
Plugin Contributions:
0

Re: Prevent Spider Sessions

If your pages have already been indexed you will have to change the session id from ZENID to something else (perhaps SESID?) to prevent users from sharing sessions, and all the related problems.

You can find this in :
includes/init_includes/init_sessions.php and
includes/modules/payment/paypal/ipn_application_top.php

11 Sep 2006, 6:39 PM
#3
dealbyethan_com avatar

dealbyethan_com

Totally Zenned

Join Date:
Dec 2005
Location:
Perth, Western Australia, Australia
Posts:
782
Plugin Contributions:
0

Re: Prevent Spider Sessions

Hi Louis,

Thanks for your speedy response. Do you mean to replace ZENDID with SESID in the specified files? Sorry I am not very familiar with the session problems. May I also ask why is it important to prevent users from sharing sessions? What will happen if I don't do any changes? Thanks again.

Regards,
Ethan

**The Team Behind DealByEthan.com | **Curating unique finds for a discerning community. Committed to a seamless and inspiring shopping experience. *Connect with us: *https://linktr.ee/dealbyethan

11 Sep 2006, 6:50 PM
#4
louis avatar

louis

Zen Follower

Join Date:
Jul 2006
Location:
Johannesburg
Posts:
408
Plugin Contributions:
0

Re: Prevent Spider Sessions

Yes, you have to replace
Line #21 : zen_session_name('zenid'); with
Line #21 : zen_session_name('sesid');

That will force a new session id to be created when a user access your site.

Zen-Cart uses sessions to keep track of user activity, including user shopping carts. If you have two users accessing your site at the same time using the same session id ZENCART will see them as a single user. (Even though the IP-Address is different for each actual user).

IP's can not be used to track users as dial-up users normally get an IP assigned from a small share pool and can have a different IP everytime they click. (Depends on ISP setup)

IE. session id = user
All active realworld users share session id and add products to cart = chaos :no:

14 Sep 2006, 3:27 PM
#5
dealbyethan_com avatar

dealbyethan_com

Totally Zenned

Join Date:
Dec 2005
Location:
Perth, Western Australia, Australia
Posts:
782
Plugin Contributions:
0

Re: Prevent Spider Sessions

Hi Louis,

You mentioned that to fix my spider session problems, I have to replace:
Line #21 : zen_session_name('zenid'); with
Line #21 : zen_session_name('sesid');
in:
includes/init_includes/init_sessions.php and
includes/modules/payment/paypal/ipn_application_top.php

However, I couldn't locate the first file. Are you sure it is available for v1.2.7? Please advise. Thank you.

Best regards,
Ethan

**The Team Behind DealByEthan.com | **Curating unique finds for a discerning community. Committed to a seamless and inspiring shopping experience. *Connect with us: *https://linktr.ee/dealbyethan

16 Sep 2006, 12:09 PM
#6
louis avatar

louis

Zen Follower

Join Date:
Jul 2006
Location:
Johannesburg
Posts:
408
Plugin Contributions:
0

Re: Prevent Spider Sessions

Sorry I missed your post!:sleepy:

I am not that up to date with 1.2.7. I can only assume that since sessions are already used in this version the files would be there. You can also try using the "Developers Toolkit" under "Tools" in your shop admin. Go to the bottom and enter ZENID in the search block then select 'All files - Catalog/Admin' and click on the search button. This should list all files that contain the word ZENID. Should be one or two only.

Hope this helps.

16 Sep 2006, 12:40 PM
#7
dealbyethan_com avatar

dealbyethan_com

Totally Zenned

Join Date:
Dec 2005
Location:
Perth, Western Australia, Australia
Posts:
782
Plugin Contributions:
0

Re: Prevent Spider Sessions

Hi Louis,

Thanks for your reply. I did what you suggested and located the two files:
/includes/application_top.php
/includes/modules/payment/paypal/ipn_application_top.php

Please confirm if these are the right files. Thanks again :)

Best regards,
Ethan

**The Team Behind DealByEthan.com | **Curating unique finds for a discerning community. Committed to a seamless and inspiring shopping experience. *Connect with us: *https://linktr.ee/dealbyethan

16 Sep 2006, 1:29 PM
#8
louis avatar

louis

Zen Follower

Join Date:
Jul 2006
Location:
Johannesburg
Posts:
408
Plugin Contributions:
0

Re: Prevent Spider Sessions

OK, in your case you will have to change the ZENID in these two files to something else. All search engine indexed pages with ZENID as the identifier will then no longer create session problems for you.

16 Sep 2006, 1:44 PM
#9
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Prevent Spider Sessions

Hi Ethan,

I happen to notice that you are using a SEF contrib. And I vaguely rembember to have seen some hardcoded zenid's in that mod. I might be wrong and/or it might be fixed in the current version (if not, it should be fixed asap), but if the zenid still appears after the formentioned changes, you know where it probably comes from...

edit:
Hmmm, it looks like you already made the change and it seems to work fine :-) (So I am probably wrong about the hardcoded zenid's )

16 Sep 2006, 1:53 PM
#10
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Prevent Spider Sessions

Or maybe this is related: if I click on one of the currencies at your site the curreny switches, but if I click on another link after that, the currency magicly switches back to USD again.

16 Sep 2006, 2:17 PM
#11
dealbyethan_com avatar

dealbyethan_com

Totally Zenned

Join Date:
Dec 2005
Location:
Perth, Western Australia, Australia
Posts:
782
Plugin Contributions:
0

Re: Prevent Spider Sessions

Hi Louis,
If I shouldn't change 'zenid' to 'sesid', what should I change it to?

Hi paulm,
I am using the SEO contribution for v.1.2. I took Louis's advice to change 'zenid' to 'sesid' in:
/includes/application_top.php
/includes/modules/payment/paypal/ipn_application_top.php

Now that you mentioned the currency... I didn't know the currency problem is due to this spider session. When I click on a currency link e.g. EUR, the curreny switches from USD to EUR. But if I click on a second currency link e.g. AUD after that, the currency remains as EUR . It doesn't switch back to USD. Even after fixing the spider session issues, the currency problem persists. What should I do to fix this?

Thanks for your help, Louis and paulm :)

Best regards,
Ethan

**The Team Behind DealByEthan.com | **Curating unique finds for a discerning community. Committed to a seamless and inspiring shopping experience. *Connect with us: *https://linktr.ee/dealbyethan

16 Sep 2006, 4:44 PM
#12
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Prevent Spider Sessions

I didn't know the currency problem is due to this spider session.Sorry for the confusion, but I did not mean to say that it was related, but it could be. I just clicked some links to see if I noticed any problems with the session id, and then I noticed the currency switch problem. And it I might be related to session problems, but I do not know for sure.

(And I would like to confirm that Louis is right about the fix, and that it does not matter what you rename it to, although I would not use any special characters. So "sesid" should be just fine.)

16 Sep 2006, 5:44 PM
#13
louis avatar

louis

Zen Follower

Join Date:
Jul 2006
Location:
Johannesburg
Posts:
408
Plugin Contributions:
0

Re: Prevent Spider Sessions

So "sesid" should be just fine.)

sesid is perfectly fine. Just so I understand, did you notice the currency problem before or did it start only after the changes?

16 Sep 2006, 5:53 PM
#14
dealbyethan_com avatar

dealbyethan_com

Totally Zenned

Join Date:
Dec 2005
Location:
Perth, Western Australia, Australia
Posts:
782
Plugin Contributions:
0

Re: Prevent Spider Sessions

Hi Louis,

Thanks for your reply. I had the currency problem before the changes. Not sure if it remains identical after the changes though. Basically, the currency still doesn't work when someone wants to change it a second time. Do you have any suggestions?

Regards,
Ethan

**The Team Behind DealByEthan.com | **Curating unique finds for a discerning community. Committed to a seamless and inspiring shopping experience. *Connect with us: *https://linktr.ee/dealbyethan

16 Sep 2006, 7:13 PM
#15
louis avatar

louis

Zen Follower

Join Date:
Jul 2006
Location:
Johannesburg
Posts:
408
Plugin Contributions:
0

Re: Prevent Spider Sessions

Could you create a new thread for this issue. Forum rules require only on-topic posts. I can try to assist you in the new thread.:thumbsup:

5 Jan 2007, 10:07 PM
#16
hawks67 avatar

hawks67

New Zenner

Join Date:
Jan 2007
Posts:
22
Plugin Contributions:
0

Re: Prevent Spider Sessions

Going a little further, is there a way to completely make a site invisible to spiders and inaccessible to users without authentication? I'm thinking of a situation where any attempt at accessing any page on the site without such authentication would redirect the user (or spider) to a default "you are not authorized" page, where they could log in as a registered user.

I've seen such authentication work with asp pages, but I'm far from a php programmer.

Any possibility I could incorporate such functionality on my ZC site? I'm running 1.3.5.

Thanks in advance,
Gary :wacko:

6 Jan 2007, 4:22 AM
#17
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Prevent Spider Sessions

You can set that up in the Configuration ... Customer Details ...

Make is so you must login to browse ... and that you must be approved to shop ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

6 Jan 2007, 4:58 AM
#18
hawks67 avatar

hawks67

New Zenner

Join Date:
Jan 2007
Posts:
22
Plugin Contributions:
0

Re: Prevent Spider Sessions

That's super! Thanks so much. I'm embarassed I didn't see that in the Config area.

Gary

6 Jan 2007, 5:07 AM
#19
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Prevent Spider Sessions

There is a lot in the Configuration to Zen Cart for all of the features and bells and whistles ... do not feel too bad about missing many of these ... :smile:

We encourage you to take the time each day to really read through each section and perhaps have a test site with the demo data loaded where you can test many of these features ... there is a lot to learn as so much is already built into Zen Cart ... :cool:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!