Results 1 to 10 of 17

Hybrid View

  1. #1
    Join Date
    Jul 2014
    Location
    Denmark
    Posts
    27
    Plugin Contributions
    0

    Default Problem using root as cookie path after installing CEON URI

    After installing CEON URI the session is wiped when a customer tries to log in - meaning, login is impossible. I traced this down to init_sessions.php in includes/init_inludes/overrides. The only thing that file does is to force the cookie path to be set to root "/" (Zen Cart resides in "/purchase/" in my case). Apparently that doesn't work, but I have not been able to identify why. What are common reasons that setting cookie path to root fails?

  2. #2
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by flyvholm View Post
    After installing CEON URI the session is wiped when a customer tries to log in - meaning, login is impossible. I traced this down to init_sessions.php in includes/init_inludes/overrides. The only thing that file does is to force the cookie path to be set to root "/" (Zen Cart resides in "/purchase/" in my case). Apparently that doesn't work, but I have not been able to identify why. What are common reasons that setting cookie path to root fails?
    Not sure that this is related to this module.. That said can you start by double checking your install and make sure you have EVERYTHING installed correctly???
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  3. #3
    Join Date
    Jul 2014
    Location
    Denmark
    Posts
    27
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    I've done the installation twice, both checked out fine. Static URIs are working too. They also appear to work if I delete the init_sessions.php override. I see your point that it probably isn't related to the module - setting cookie path to root could well fail in any case. Do you have ideas what's happening here nevertheless? It might still save somebody else from pulling hair out after installing CEON...

  4. #4
    Join Date
    Jul 2014
    Location
    Denmark
    Posts
    27
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    FYI: Moderator split this to its own discussion thread since it appears to be a session issue not directly related to CEON.

  5. #5
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by flyvholm View Post
    ... After installing CEON URI the session is wiped when a customer tries to log in ...
    Little late to the party, but do you have multiple stores in the same domain (or just this one)? Are you using a dedicated SSL certificate (or the hosts shared SSL certificate)? Does the same behavior occur with "Force Cookie Use = true"?
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  6. #6
    Join Date
    Jul 2014
    Location
    Denmark
    Posts
    27
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    Any response appreciated! Just one store on the domain, dedicated SSL certificate. Forcing cookie use brings up a (Zen Cart) page saying that the browser has disabled cookies, meaning the issue persists. It is not Zen Cart destroying the session, it is done by PHP's header() function when redirecting after login. So for some reason PHP is able to store cookies when cookie path is set to "/purchase", but not when it is set to "/". The SSL certificate is for the root.

  7. #7
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Ceon URI Mapping v4.x

    Have you tried also setting "Use root path for cookie path" to true (to match what you are seeing the CEON module do)?
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  8. #8
    Join Date
    Jul 2014
    Location
    Denmark
    Posts
    27
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    Yes, setting the cookie path to root in Zen Cart admin does the exact same thing as the CEON override and gives the same result.

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

    Default Re: Problem using root as cookie path after installing CEON URI

    I notice from your other discussion threads that you've got some unique stuff going on with your server configs and customizations you've made to the code.

    So ... just to verify something ... if you remove CEON URI and your URL rewriting rules and the code you've customized to do different things with sessions, then the cookie-path stuff all works correctly again, right?
    .

    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
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,838
    Plugin Contributions
    31

    Default Re: Problem using root as cookie path after installing CEON URI

    I would also concur that the problem is related to server permissions not allowing the cookie to be set in the root.

    I have found this issue (login goes straight to "cart is empty") on a local server only, and not on every version of xampp, so have put a clause in there to deal with it. As my shop is in a subdirectory and locally I use virtual hosts/dynamic dns/password on the folder access/ip filtering...this was the easier fix to ensure it works everywhere!

    init.sessions.php
    PHP Code:
    $path = (defined('CUSTOM_COOKIE_PATH')) ? CUSTOM_COOKIE_PATH $path;
    // BEGIN CEON URI MAPPING 1 of 1
    // Static URIs are relative to the site's root, so cookie should be set for the root
    if ( !file_exists('includes/local/configure.php') && defined('CEON_URI_MAPPING_ENABLED') && CEON_URI_MAPPING_ENABLED == ) { //steve added the clause
    $path '/';//steve was breaking login session on local server
    }
    // END CEON URI MAPPING 1 of 1
    $domainPrefix = (!defined('SESSION_ADD_PERIOD_PREFIX') || SESSION_ADD_PERIOD_PREFIX == 'True') ? '.' ''
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

 

 

Similar Threads

  1. v154 not Respecting Context of a Link to a Category/Product page using CEON URI MAPPING
    By lruskauff in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 11 Jun 2015, 07:17 AM
  2. 151 Paypal express 404 error using CEON URI Mapping
    By Jewm in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 29 Jul 2014, 01:36 PM
  3. Media Manager clips broken -- using CEON URI Mapping
    By gradyscott in forum All Other Contributions/Addons
    Replies: 15
    Last Post: 17 Jun 2011, 12:56 PM
  4. Paypal orders not being logged in my 1.3.8 after installing ceon uri mapping
    By catach in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 29 Apr 2010, 07:07 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