Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1
    Join Date
    May 2011
    Posts
    11
    Plugin Contributions
    0

    Default Someone stole my cookies!

    I'm a Zen Cart 'newbie' that is working on evaluation of Zen Cart for our website (fruitlady.net).

    I installed v1.3.9h on my home PC (Win XP) running Zen Cart under Wampserver 2.1.

    Zen Cart installed OK. I can use admin functions to set of product/categories, and attributes. I set up a couple categories that match our website categories, and a couple products to 'experiment' with how it all works.

    But ... when I log out from admin and go into Zen Cart, I can go to my categorys and see the products I added. However, when I press the 'Add to Cart' function, I get an error message telling me that my browser doesn't support cookies... although my browser does support cookies. I verified this several different ways (javascript 'sniffer' routines that display contents of navigator.cookieEnabled=TRUE), and can successfully add products to carts on Zen Cart demo sites.

    I suspect that the error I'm getting results from failure to create/read cookies in my environment (local PC setup), but I'm at a loss to track down where the glitch is...

    (Oh yeah, I installed the demo Zen Cart data, and my storefront is running within the demo. I haven't made any modifications so far).

    Can anyone point me to something to look at or try to get past this glitch?

    Thanx!

    TbA

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,705
    Plugin Contributions
    12

    Default Re: Someone stole my cookies!

    Not really a Zen Cart question, but have you checked the hosts file in the drivers/etc folder of your machine? Without the right setting there, you won't get a cookie.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  3. #3
    Join Date
    May 2011
    Posts
    11
    Plugin Contributions
    0

    Default Re: Someone stole my cookies!

    Sorry 'bout a non Zen question... but it has only shown up when I tried using my Zen Cart (my cookies are otherwise quite tasty!)

    My prior experience has been in client side apps; i'm learning as I go along about server side requirements (and terminology).

    I found a file 'hosts in my windows/system32/drivers/etc that contains:
    # Copyright (c) 1993-1999 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    # 102.54.94.97 rhino.acme.com # source server
    # 38.25.63.10 x.acme.com # x client host

    127.0.0.1 localhost
    127.0.0.1 localhost
    I have no clue what it should contain... to allow cookie creation. But it does seem to know about my localhost on my local address.

    Perhaps I should bight the bullet and install Zen Cart on our web server; it would probably work then; albeit with a few more hassles for updates and FTP that I don't have on my local. (But I would be doing this sooner or later anyways; I just wanted it to be a bit later after I got a good feel for how Zen Cart would work for us). Until I got to my 'Add to Cart' glitch, it seems to be working fine and I'm going through the learning curve in seting up our storefront.

    I'll do a bit of investigations on what should be in 'hosts' file and see if anything looks familiar!

    Thanx!

    TbA

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Someone stole my cookies!

    You don't need to do anything to your hosts file for Zen Cart to allow cookie creation. What you quoted is perfectly normal for the majority of peoples' uses. You'd only add to that if you were adding additional domain names at specific IP addresses that didn't already have proper public DNS entries (and if you don't know what that means it probably isn't relevant to your concerns.)

    However, if you're going to run it on your local machine, use "localhost" as the URL, and not the 127.0.0.1 IP address. ie: set HTTP_SERVER to 'localhost' and not to '127.0.0.1'
    .

    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.

  5. #5
    Join Date
    May 2011
    Posts
    11
    Plugin Contributions
    0

    Default Re: Someone stole my cookies!

    Both of my configure.php files contain:

    // Define the webserver and path parameters
    // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
    // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
    define('HTTP_SERVER', 'http://localhost');
    define('HTTPS_SERVER', 'https://localhost');
    (the admin version also has similar entries for CATALOG_SERVER variables)
    ...

    aarrgh! :)

    TbA

  6. #6
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Someone stole my cookies!

    Admin->Configuration->Sessions --- what have you changed here, and why? The defaults are generally appropriate for all sites, and should very rarely be changed.
    .

    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.

  7. #7
    Join Date
    May 2011
    Posts
    11
    Plugin Contributions
    0

    Default Re: Someone stole my cookies!

    This is the current Configuration Sessions contents:

    Sessions

    Title Value
    Session Directory C:/wamp/www/zencart/cache
    Cookie Domain True
    Force Cookie Use False
    Check SSL Session ID False
    Check User Agent False
    Check IP Address False
    Prevent Spider Sessions True
    Recreate Session True
    IP to Host Conversion Status true
    Use root path for cookie path False
    Add period prefix to cookie domain True
    -------------------------

    To the best of my recollection, I haven't made any changes here.
    Are these the default values?

    TbA

  8. #8
    Join Date
    May 2011
    Posts
    11
    Plugin Contributions
    0

    Default Re: Someone stole my cookies!

    I think I found something that address my missing cookies:

    http://www.webmasterworld.com/forum21/11530.htm

    I attempted to allow the localhost to set cookies in Internet Explorer but it would not let me do so because it requires a domain extension...
    Any ideas of how to get around this?
    In XP go to this directory...
    C:\WINDOWS\system32\drivers\etc

    Open the extensionless file named "hosts" with notepad.

    Now you should see an example of...
    # 102.54.94.97 rhino.acme.com # source server



    So for example if you were running Apache locally and wanted to test a site locally but could not access it without a domain name then you could edit this file (with notepad) and then add the following line...

    192.168.0.2 myexample.net



    Clarification:
    Router Users: Default Gateway is YOUR computer's local IP.
    Non-Router Users: You can access your system via Apache via your IP address.

    If you add that line (and I intentionally left out the amperstamp) then when you access that domain name (that you can change to) you can now access your local apache htdocs folder via that domain name.

    Now of course you will want to use a domain name that works for you but also not block a website you are used to using.
    It seems that cookies require a domain extension, but localhost won't accept one.
    (Oh yeah, I use IE8 as my default browser. I sounds like this is an IE 'limitation, other browsers (and earlier IE) would set cookies without requiring a domain name...)

    I'll update my 'hosts' file as suggested above, and see if that works. If so, I'll probably want to change my config.php file, changing occurances of localhost to 'myexample.net' (or the equivalent that I would use) ??

    I'll post an update with my results!

    TbA
    Last edited by tayers; 24 May 2011 at 07:23 PM. Reason: typo correction.

  9. #9
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Someone stole my cookies!

    Or just use a much better browser instead. Dump IE and use FireFox.
    .

    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.

  10. #10
    Join Date
    May 2011
    Posts
    11
    Plugin Contributions
    0

    Default Re: Someone stole my cookies!

    Quote Originally Posted by DrByte View Post
    Or just use a much better browser instead. Dump IE and use FireFox.
    Updates:

    I added my local machine and testdomain.net to 'hosts' and re-booted. ping and tracert to testdomain.net worked as expected, but in trying to access any of my folders, I got HTTP 403 Forbidden error.

    "This error (HTTP 403 Forbidden) means that Internet Explorer was able to connect to the website, but it does not have permission to view the webpage." ... I guess i'll need to look into WAMPServer settingsto get 'authorized' to use this new 'domain'.

    I also tried the shopping cart under Firefox (5.0), using the existing localhost access. It worked the same as IE; allowing access to the cart and admin, but giving me 'cookies are required' when I try to add to cart...

    Ah well, at least I'm eliminating some of the possibilities!

    It's looking more practical to just install Zen Cart on our web host, and re-do my setup (dropping the demo data) and evaluation.

    It's a good thing I'm doing this eval as a favor, and not on payroll!

    TbA

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Do products in someone's shopping cart preclude someone else from ordering them?
    By rayo in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 29 Nov 2014, 04:48 PM
  2. v139h Cookies
    By Lackew in forum General Questions
    Replies: 3
    Last Post: 18 Oct 2012, 05:32 PM
  3. Cookies
    By neit in forum General Questions
    Replies: 4
    Last Post: 22 May 2011, 10:12 PM
  4. cookies
    By jford in forum General Questions
    Replies: 7
    Last Post: 10 Jul 2006, 07:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg