Page 1 of 3 123 LastLast
Results 1 to 10 of 27
  1. #1
    Join Date
    Apr 2009
    Posts
    166
    Plugin Contributions
    1

    Default [Done 160] V154 & V155 cookies off zenid changing w every page change. add item fails

    In V154 and 155. I have been testing with cookies refused. I have discovered that the Session id zenid changes every time you click on a link. I have tested this in fire fox and crome and both have the same issue. This I think then causes a whoops time out message to be displayed when you try to add an item to the cart.

    I store the session info in the database and the session record is being created and destroyed for each new click.

    You can see this if you turn off cookies and then go to the site then hover over a link you will see that the session id has changed for the next click.

    I had to click once to get a zenid but from then on all the links have a different zenid.

    I assume for a session to work the new links should have the same zenid (session id).
    Mark Brittain
    http:\\innerlightcrystals.co.uk\sales\

  2. #2
    Join Date
    Jan 2004
    Posts
    65,303
    Blog Entries
    7
    Plugin Contributions
    228

    Default Re: V154 & V155 when cookies off zenid changing with every change of page. add item f

    Not a bug.

    If your store is set to require cookies but you turn cookies off in your browser, then it's not going to work.
    Simple solution: don't do that.

    Question: why are you doing that?
    .

    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
    Apr 2009
    Posts
    166
    Plugin Contributions
    1

    Default Re: V154 & V155 when cookies off zenid changing with every change of page. add item f

    Store is not set to require cookies. Force cookie use is false. Should it be true?

    I was testing it because a number of customers complained that they could not add items to the basket. I was guessing that they had turned cookies off.

    Quote Originally Posted by DrByte View Post
    Not a bug.

    If your store is set to require cookies but you turn cookies off in your browser, then it's not going to work.
    Simple solution: don't do that.

    Question: why are you doing that?
    Mark Brittain
    http:\\innerlightcrystals.co.uk\sales\

  4. #4
    Join Date
    Apr 2009
    Posts
    166
    Plugin Contributions
    1

    Default Re: V154 & V155 when cookies off zenid changing with every change of page. add item f

    I can make it work by changing init_sessions.php about line 51.
    from
    PHP Code:
    if (isset($_POST[zen_session_name()])) {
      
    zen_session_id($_POST[zen_session_name()]);
    } elseif ( (
    $request_type == 'SSL') && isset($_GET[zen_session_name()]) ) {
      
    zen_session_id($_GET[zen_session_name()]);

    to
    PHP Code:
    if (isset($_POST[zen_session_name()])) {
      
    zen_session_id($_POST[zen_session_name()]);
    } elseif ( (
    $request_type == 'SSL') && isset($_GET[zen_session_name()]) ) {
      
    zen_session_id($_GET[zen_session_name()]);
      
    /* else if added Mjfb*/
    } elseif (isset($_GET[zen_session_name()])) {
        
    zen_session_id($_GET[zen_session_name()]);

    Does this break the certification for zen cart?
    Also it does not appear to show the cookies required page any more. Just goes to whoops your session has timed out (time out page).
    Mark Brittain
    http:\\innerlightcrystals.co.uk\sales\

  5. #5
    Join Date
    Jul 2012
    Posts
    14,702
    Plugin Contributions
    17

    Default Re: V154 & V155 when cookies off zenid changing with every change of page. add item f

    What template is/was used in your testing? Does this occur in the default template for these two stores (when you don't have the extra code added to the init_session.php file?)

    Seeing as you are a long time forum member, what is the history of upgrade including process(es) used?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  6. #6
    Join Date
    Apr 2009
    Posts
    166
    Plugin Contributions
    1

    Default Re: V154 & V155 when cookies off zenid changing with every change of page. add item f

    I performed a fresh install of 155 on my test machine with the test data and it has the same problem on that.
    I was using the responsive classic template on that. I have tried classic green and get the same issue goes to index.php?main_page=time_out&zenid=co24rosqf910i1i5eg8u9r9i37 when trying to add to cart. the links all have &zenid=g3a5efvifobos3q6g2ojcokq75 so will have same issue.

    For the live site I started life as 1.3.0 and has been upgraded through all the releases to 1.5.4 it now uses a modified responsive sheffield blue template.
    Mark Brittain
    http:\\innerlightcrystals.co.uk\sales\

  7. #7
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,879
    Blog Entries
    2
    Plugin Contributions
    2

    Default Re: V154 & V155 when cookies off zenid changing with every change of page. add item f

    Hi Mark

    Do you have settings in Apache to do any kind of redirects.
    Also would you mind telling us who your host is.

  8. #8
    Join Date
    Apr 2009
    Posts
    166
    Plugin Contributions
    1

    Default Re: V154 & V155 when cookies off zenid changing with every change of page. add item f

    the zen cart is in a sub directory of the main site.
    The htaccess settings on the top level directory are
    Code:
    #reset default page 
    DirectoryIndex index.php
    
    
    Options +FollowSymlinks
    
    # allow URl rewriting
    
    RewriteEngine on
    
    
    #change htm to php
    
    RewriteRule ^(.*)\.htm$ $1.php
    
    # stop pages being taken
    
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?schoolofinnerlight\.co\.uk/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?innerlightcrystals\.co\.uk/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?innerlighttherapies\.co\.uk/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?innerlightworkers\.co\.uk/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?.*\.lotuslight\.co\.uk/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?theangelicartoftransformation\.co\.uk/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?angelicmultidimensionalhealing\.co\.uk/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?lotuslight\.co\.uk/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?alexa\.com/.*$ [NC]
    Rewritecond %{HTTP_REFERER} !^http://(www\.)?images\.google.*$ [NC]
    Rewritecond %{HTTP_REFERER} !^http://(www\.)?translate\..*$ [NC]
    Rewritecond %{HTTP_REFERER} !^http://(www\.)?joyousisle\.com/.*$ [NC]
    RewriteRule .*\.(jpg|gif|bmp|png)$        -                   [F,NC]
    
    RewriteCond %{HTTP_HOST} !^innerlightcrystals\.co\.uk$ [NC]
    RewriteRule .? http://innerlightcrystals.co.uk%{REQUEST_URI} [R=301,L]
    My host is Ukhost4u. My site is http://innerlightcrystals.co.uk/sales/

    My test server is Ubuntu run as a virtual machine (oracle vbox). I have removed all the rewrites and I still have the same issue on 155a running classic green or responsive classic. If you need more details of the virtual machine please let me know.

    If any of the info in the code section should not be public please remove it for me.

    Thanks
    Mark Brittain
    http:\\innerlightcrystals.co.uk\sales\

  9. #9
    Join Date
    Apr 2009
    Posts
    166
    Plugin Contributions
    1

    Default Re: V154 & V155 when cookies off zenid changing with every change of page. add item f

    Any movement on this? If not a fault do I need to have specific setting?
    Mark Brittain
    http:\\innerlightcrystals.co.uk\sales\

  10. #10
    Join Date
    Jan 2004
    Posts
    65,303
    Blog Entries
    7
    Plugin Contributions
    228

    Default Re: V154 & V155 when cookies off zenid changing with every change of page. add item f

    If you turn off ENABLE_SSL does the problem go away?
    (The code-change you posted suggests that your server isn't properly representing SSL.)


    Additionally, is your html_output.php function file altered in any way?
    .

    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.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v155 Getting ajax error in v155 with v154 Westminster template
    By godt in forum General Questions
    Replies: 3
    Last Post: 11 Jul 2016, 12:41 AM
  2. v155 Getting ajax error in v155 with v154 Westminster template
    By MCS_Computers in forum General Questions
    Replies: 10
    Last Post: 21 Mar 2016, 03:58 PM
  3. v151 Zen ID changing on every item page
    By jolla in forum General Questions
    Replies: 0
    Last Post: 5 May 2014, 11:59 PM
  4. ZenId Showing On Every Page
    By SweetNSassyRobin in forum General Questions
    Replies: 6
    Last Post: 5 Jan 2008, 10:06 PM
  5. Replies: 13
    Last Post: 11 Mar 2007, 10:38 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