Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
  1. #11
    Join Date
    Oct 2007
    Location
    Emporia, Kansas
    Posts
    1,762
    Plugin Contributions
    0

    Default Re: Problem using root as cookie path

    OK, granted I do not use this version of Zen but am curious that the program does not do the .htaccess like 1.3.9h does. This is what my file looks like, it rests in the root of the server but the info directs to the subdirectory that the store lives in

    ## BEGIN CEON URI MAPPING REWRITE RULE

    RewriteEngine On

    # ONLY rewrite URIs beginning with /market/
    RewriteCond %{REQUEST_URI} ^/market/ [NC]

    Did yours not do that?

    As you can see the file points to the stores directory but lives in the root of the server---UNLESS I totally misunderstood, which is highly possible...LOL


    EVERYONE...have a safe and happy Turkey Day.

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

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by flyvholm View Post
    By the way, on my local copy of the website hosted with XAMPP I can use root as cookie path without issues. So it may be something server specific.
    99% likely to be server-specific, and that includes how you've configured the vhost/domain in Apache and apache as a whole, and PHP.
    .

    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. #13
    Join Date
    Jul 2014
    Location
    Denmark
    Posts
    27
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    I'm revisiting my cookie issue... to recap, the problem is that sessions are lost when I set the cookie path to root. For this reason I've had to leave the init_sessions.php override out of my CEON install (setting cookie path to root is the only thing this override does). Consequence is that Zen Cart carries around "zenid=..." in the URI... or at least that is supposed to be the case. I have the opposite happening to me: On the live website (https://www.astralisproductions.com/purchase) the zenid is not added to the URI even though the cookie path isn't root (verified by inspecting the cookie stored in Chrome). Conversely, my XAMPP localhost copy of the website does have cookie path set to root (and doesn't lose sessions), but adds zenid to every URI nevertheless.

    I'd love to know what's happening. How/where does Zen Cart check for cookie availability?

  4. #14
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by flyvholm View Post
    I'm revisiting my cookie issue... to recap, the problem is that sessions are lost when I set the cookie path to root. For this reason I've had to leave the init_sessions.php override out of my CEON install (setting cookie path to root is the only thing this override does). Consequence is that Zen Cart carries around "zenid=..." in the URI... or at least that is supposed to be the case. I have the opposite happening to me: On the live website (https://www.astralisproductions.com/purchase) the zenid is not added to the URI even though the cookie path isn't root (verified by inspecting the cookie stored in Chrome). Conversely, my XAMPP localhost copy of the website does have cookie path set to root (and doesn't lose sessions), but adds zenid to every URI nevertheless.

    I'd love to know what's happening. How/where does Zen Cart check for cookie availability?
    If I understood the above correctly, seems like you were saying that the "disappearance" of the zenid was unepected and that it staying in the uri was expected... That is quite the opposite if that was the intended description. The index.php file if I remember correctly or perhaps includes/application_top.php is the first to pick up on the condition of the zenid... Looking through at least get and post.

    Settings related to this may need to be different in both the live and development sites unless everything about the configuration and installation of the the server's software is the same...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by mc12345678 View Post
    If I understood the above correctly, seems like you were saying that the "disappearance" of the zenid was unepected and that it staying in the uri was expected...
    Unexpected in both cases: It appears on localhost where cookie path is root, but disappears on the live site where cookie path is not root. Should be the other way around.
    Quote Originally Posted by mc12345678 View Post
    The index.php file if I remember correctly or perhaps includes/application_top.php is the first to pick up on the condition of the zenid... Looking through at least get and post.
    So Zen Cart uses the PHP predefined constant 'SID' (session id) to determine if zenid should be added to the URI. 'SID' is empty when a cookie with the session ID is available (says PHP manual). In the case of my localhost copy I see the cookie with the correct session id in Chrome, and its path is root, meaning it is supposedly available on the entire domain. Yet 'SID' contains the zenid as if the cookie isn't there. I simply don't know what can prevent PHP from recognizing the cookie?

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

    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.

  7. #17
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,584
    Plugin Contributions
    30

    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: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

 

 
Page 2 of 2 FirstFirst 12

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

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