Results 1 to 10 of 10
  1. #1
    Join Date
    Feb 2011
    Posts
    207
    Plugin Contributions
    0

    Default Security error for customer login after host server change

    I have been reading multiple threads on this issue, and also have read the tutorial recommended here:

    https://www.zen-cart.com/tutorials/i...hp?article=312

    My ZenCart is v1.3.9h, am using Bookshelf template and do not have the files in the location referenced by the tutorial.

    - /includes/templates/YOUR_TEMPLATE/templates/tpl_login_default.php
    - /includes/templates/YOUR_TEMPLATE/templates/tpl_timeout_default.php

    A FileZilla search found them here:
    /includes/templates/template_default/templates

    I downloaded a fresh 1.3.9 and overwrote those files in above location, but still getting error.

    The web host recently upgraded their servers (this link is very similar to my problem, same host - http://www.zen-cart.com/forum/showthread.php?t=183028)

    However the SSL certificate on the site is dedicated, not shared, purchased about a month before they moved their servers. Their support has been very kind, fixing other issues that have cropped up with the SSL, but can't seem to find cause of this one.

    Also when I login to ZenCart admin area from a fresh browser, it tells me there was a security error when trying to login to Admin, though when I click login, it takes me to admin area.

    I am stuck with these last 2 security issues, and will be glad to go back to host if someone could help point me in the right direction of what to check.

    I have also tried switching to the Classic template, that did not change anything, so it's switched back to Bookshelf.

    Thank you!

  2. #2
    Join Date
    Feb 2011
    Posts
    207
    Plugin Contributions
    0

    Default Re: Security error for customer login

    Bump . . . any ideas? Thank you!

  3. #3
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Security error for customer login after host server change

    Quote Originally Posted by sparrowce View Post
    but still getting error.
    What exact error?
    Quote Originally Posted by sparrowce View Post
    However the SSL certificate on the site is dedicated, not shared
    So, does this mean that if you set your ENABLE_SSL setting to 'false' that the problem goes away?
    Quote Originally Posted by sparrowce View Post
    Also when I login to ZenCart admin area from a fresh browser
    What exactly do you mean by "a fresh browser"?
    Quote Originally Posted by sparrowce View Post
    it tells me there was a security error when trying to login to Admin, though when I click login, it takes me to admin area.
    That sounds exactly like the page was cached in your browser and the old security token had been set there, and thus your attempted login was using the cached token. Then when you get the login error and click submit again, it is successful because a new fresh unexpired token has been generated for the page.
    You might be able to prevent this caching by setting your *admin* configure.php's HTTP_SERVER url to an https address instead of an http address. This would have the beneficial side effect of protecting your entire admin with SSL, which is a good thing.
    .

    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.

  4. #4
    Join Date
    Feb 2011
    Posts
    207
    Plugin Contributions
    0

    Default Re: Security error for customer login after host server change

    Quote Originally Posted by DrByte View Post
    What exact error?
    So, does this mean that if you set your ENABLE_SSL setting to 'false' that the problem goes away?
    What exactly do you mean by "a fresh browser"?That sounds exactly like the page was cached in your browser and the old security token had been set there, and thus your attempted login was using the cached token. Then when you get the login error and click submit again, it is successful because a new fresh unexpired token has been generated for the page.
    You might be able to prevent this caching by setting your *admin* configure.php's HTTP_SERVER url to an https address instead of an http address. This would have the beneficial side effect of protecting your entire admin with SSL, which is a good thing.
    Thank you, I have not tried setting the ENABLE_SSL to false, didn't think of that.

    The error message says "There was a security error when trying to login" (this is at customer login)

    Fresh browser means clear cache, close browser, re-open. Tried on 3 different browsers on PC and 2 on mac, clearing cache, etc. - just tried setting ENABLE_SSL to false, cleared the cache, closed/re-opened browser, but no change on either matter.

    Here is what is in my store/includes/configure.php:
    define('HTTP_SERVER', 'http://mydomain.com');
    define('HTTPS_SERVER', 'https://www.mydomain.com/');

    // Use secure webserver for checkout procedure?
    define('ENABLE_SSL', 'true');


    And this is the admin/includes/configure.php:
    define('HTTP_SERVER', 'http://mydomain.com');
    define('HTTPS_SERVER', 'https://mydomain.com/');
    define('HTTP_CATALOG_SERVER', 'http://mydomain.com');
    define('HTTPS_CATALOG_SERVER', 'https://mydomain.com/');
    // Use secure webserver for catalog module and/or admin areas?
    define('ENABLE_SSL_CATALOG', 'true');
    define('ENABLE_SSL_ADMIN', 'true');


    Really appreciate the help, thank you.
    Last edited by sparrowce; 26 Jul 2011 at 03:09 AM.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Security error for customer login after host server change

    Why do you have the "www." in your HTTPS_SERVER setting when all the rest don't?
    .

    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.

  6. #6
    Join Date
    Feb 2011
    Posts
    207
    Plugin Contributions
    0

    Default Re: Security error for customer login after host server change

    Quote Originally Posted by DrByte View Post
    Why do you have the "www." in your HTTPS_SERVER setting when all the rest don't?
    Good question . . . don't know what I'm doing, that's for sure. I removed the www, but it didn't change anything, unfortunately.

  7. #7
    Join Date
    Feb 2011
    Posts
    207
    Plugin Contributions
    0

    Default Re: Security error for customer login after host server change

    Still not resolved - saw this post, http://www.zen-cart.com/forum/showthread.php?t=180742, and am checking in my configuration/sessions settings, but do not know what I'm looking for. The directory seems to match what the host says, and the Check SSL Session ID is set to false, and recreate sessions is set to true. Any thing in these settings that could help? Thank you!

  8. #8
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Security error for customer login after host server change

    I would start with a fresh install of Zen Cart on your new server. Check whether *that* works. THEN start customizing it akin to what you have now. Keep testing its functionality. Finally, when you've got it working right, import your database and test again.
    .

    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
    Feb 2011
    Posts
    207
    Plugin Contributions
    0

    Default Re: Security error for customer login after host server change

    Thank you, I may try that, have so many customizations and a very short deadline, and had to troubleshoot so many things along the way, am concerned it might change the product links, which are heavily referenced on some other pages, and may break something else that's been customized, such as the free shipping and add-on's, such as hidden categories, easy populate, etc. Since it was working great before the server move, and not now, will go back to host and take a fresh look on that side. Appreciate the help, thank you.

  10. #10
    Join Date
    Feb 2011
    Posts
    207
    Plugin Contributions
    0

    Default Re: Security error for customer login after host server change

    To update if anyone else has this issue, the host support found the cause of the problem. The code correction mentioned in the tutorial was added to this page:

    includes\modules\pages\login\header_php.php

    All is well now. I had not seen this page mentioned in any of the tutorials or the posts I'd found on this same issue, hope their diligence in finding the problem will be of help, thank you.

 

 

Similar Threads

  1. Error after host migrated me to a new server?
    By ksport in forum General Questions
    Replies: 3
    Last Post: 25 Jun 2010, 07:08 PM
  2. Customer Login 'There was a security error when trying to login'
    By webzuma in forum Managing Customers and Orders
    Replies: 26
    Last Post: 11 Jun 2010, 04:21 PM
  3. SSL installed after zen, get error message for customer login
    By borobabe in forum Installing on a Windows Server
    Replies: 6
    Last Post: 22 Aug 2009, 03:14 PM
  4. Circle Login after Host Moved Server
    By CartyToo in forum General Questions
    Replies: 2
    Last Post: 23 Aug 2006, 05:30 AM

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