Results 1 to 10 of 10
  1. #1
    Join Date
    May 2009
    Location
    Hartwell, Ga
    Posts
    12
    Plugin Contributions
    0

    Default Strange login problem - won't create cookie

    Logging in to our site also auto logs in to the cart. No problem on our beta site, login creates zen cookie like it should, cart available for purchases. Not so with the production site. Logging in doesn't create zen cookie until l log in from the cart itself. have racked my brain and code to find the difference between production and beta domains but no luck. Just hoping someone else has run in to this and has a suggestion..

    Thanks,
    George

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Strange login problem - won't create cookie

    If you've got two sites and one works fine but the other doesn't, and the problem is session-related, I'd start by comparing the PHP configuration settings between the servers.
    Then I'd look at the domains and what domain is being set in the cookies that do work.
    Then I'd be testing in multiple browsers.
    I'd also be checking whether the SSL URL is the same as the non-SSL. If not, then cookies can be problematic.
    ANd is your SSL set correctly for the domain it's registered to. ie: are you mixing www. and non www. prefixes?
    .

    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.

  3. #3
    Join Date
    May 2009
    Location
    Hartwell, Ga
    Posts
    12
    Plugin Contributions
    0

    Default Re: Strange login problem - won't create cookie

    Ok, forgot to mention one thing, this only happens in firefox on PC and Mac. Works fine in other browsers, IE, Chrome, Safari...weird....

  4. #4
    Join Date
    May 2009
    Location
    Hartwell, Ga
    Posts
    12
    Plugin Contributions
    0

    Default Re: Strange login problem - won't create cookie

    As I re-read your comments I think the SSL prefixes might be worth looking into. As I mentioned, this only happens in Firefox. Something I'm missing in the browser setup maybe? but beta works which brings me back to SSL. Beta is non-SSL while production SSL enabled. Must be a domain prefix issue, but why work on other browsers? This kind of problem makes me go bald....

    thanks,

    George

  5. #5
    Join Date
    May 2009
    Location
    Hartwell, Ga
    Posts
    12
    Plugin Contributions
    0

    Default Re: Strange login problem - won't create cookie

    Okay, definitely a domain prefix problem in the zenid cookie. Domain is listed as .www.piccexcellence.com. It should be .piccexcellence.com. My problem is I don't know where that domain value is being set for the zenid cookie. both path.php and pathcart.php show correct cookie paths. I've gone through the cart configuration files but find no setting for domain, frankly the Zen code is several levels above my understanding of PHP so I try to do as little as possible with it. Anyway, that seems to be a possible cause, just don't know where it's being set....

    G.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Strange login problem - won't create cookie

    1. What is the domain name to which your SSL certificate was issued?
    2. What is your HTTP_SERVER and HTTPS_SERVER set to in your /includes/configure.php file?

    If your SSL cert is issued to www.your_domain.com then you should be using the www. in your HTTP_SERVER and HTTPS_SERVER settings, else you'll have a mismatch.
    .

    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 2009
    Location
    Hartwell, Ga
    Posts
    12
    Plugin Contributions
    0

    Default Re: Strange login problem - won't create cookie

    The SSL certificate lists both as common names: www.piccexcellence.com and piccexcellence.com. The includes/configure.php file uses www.piccexcellence.com for both HTTP_SERVER and HTTPS_SERVER. I experimented by changing these values to piccexcellence.com. This seems to have corrected the problem.

    Thank You,
    George Moureau
    PICC Excellence, Inc.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Strange login problem - won't create cookie

    Thanks for confirming that being consistent with the correct URL solved the problem.
    .

    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.

  9. #9
    Join Date
    May 2009
    Location
    Hartwell, Ga
    Posts
    12
    Plugin Contributions
    0

    Default Re: Strange login problem - won't create cookie

    Just confirming that changing the values in configure.php did correct the problem and wanted to say Thank You very much. Great Resource, much appreciated. Also do you have any recommendations for online training tools that would help me understand the php code used by zen cart. I realize it's object oriented however I just have basic php programming skills and would like a further understanding of the code.

    Thanks Again,
    George

  10. #10
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Strange login problem - won't create cookie

    Quote Originally Posted by George_Moureau View Post
    Just confirming that changing the values in configure.php did correct the problem and wanted to say Thank You very much. Great Resource, much appreciated. Also do you have any recommendations for online training tools that would help me understand the php code used by zen cart. I realize it's object oriented however I just have basic php programming skills and would like a further understanding of the code.

    Thanks Again,
    George
    George, I'd suggest starting with an existing plugin that you'd like to add to your store. Download it and look at the code that's changed and the function that it's providing. Depending on the plugin, it might give you a sense of what's going on.

    Although it's a bit dated, the "Zen Cart Program Flow" documentation (http://www.zen-cart.com/downloads.php?do=file&id=249) will give you an overview of what's loading what and why.

    Another approach is to start with /index.php and follow its include/require paths to get a feel for what's happening. Pick a "simple" page (like privacy) and just follow the php code from start to finish.

    There's also www.php.net that has a lot of good PHP information.

 

 

Similar Threads

  1. v150 Cookie/Login problem after Hostgator moved sites to new server
    By aestheticdesign in forum General Questions
    Replies: 0
    Last Post: 19 Nov 2013, 05:07 AM
  2. strange, very strange: cookie don't work
    By 100asa in forum General Questions
    Replies: 4
    Last Post: 13 Jul 2008, 01:55 PM
  3. Strange login problem IE7 only
    By Ryk in forum General Questions
    Replies: 3
    Last Post: 27 Oct 2007, 03:40 PM
  4. strange cookie error message
    By maclean in forum Basic Configuration
    Replies: 1
    Last Post: 10 Jul 2007, 06:09 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR