Page 5 of 21 FirstFirst ... 3456715 ... LastLast
Results 41 to 50 of 209
  1. #41
    Join Date
    Nov 2004
    Location
    U.K. South Wales
    Posts
    501
    Plugin Contributions
    0

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    I'm still writing my w.i.p essay here..bear with me..

    Have a look at
    http://uk.php.net/setcookie
    Whether you know php or not, you'll see references low on the page, to the ways different browsers analyze domain names when deciding whether to store a cookie, which in this case is the thing that enables auto logon. There is a vital parameter in the cookie called the domain path.

    One prob I have fully examined tonight, is how to get auto login using a domain without the 'www.' in front. Most servers accept 'domain.com' as well as www.domain.com.

    One of zencarts quirks is that if the domain gets set to 'domain.com' in the config file, all the pages in zencart have that in the url. This can happen I think when you install, if you initially access your zencart install folder without the www. in front.

    But looking at the page quoted above, IE6 especially, it seems that IE6 refuses to store a cookie if there's not two dots in the domain name, if its a dot com. So anyone without the 'www.' in front in the config file, won't ever save a cookie in IE6, for auto logon?

    But this isn't the end of the story, as I found out. My IE6 bookmark for my site home page has no www. in front. I proved that when this url is used, the cookie -even if saved properly previously using the contrib's login page with a full www.domain.com, -- the cookie is not read out by IE6 with a page url that has no www. in front. i.e no auto logon.

    'for me' IE 6.0.28 sp1, on win 2000 sp2, does not cough up the 'zencart_cookie_permlogin' cookie **previously** saved by a 'www.doman.com' page log in (ticked checkbox), if the page url in the browser address bar **now has** 'domain.com'. Coders can check that out by putting 'echo the cookie value' in php code, near the top of the index page header.

    So... woe betide any zencart user that enters the site url without the www. in front, he'll have to manually log on?

    I have to be away soon..so can't really go much further at present with this. But it almost seems that cookies for auto logon are a difficult challenge, whereas as far as I know, the only cookie zencart uses is 'zenid', and possibly with a 'non-www.' domain if cookies fail then the server can revert to session variables for zenid, so it doesn't matter...

    So the basic problem is, if i'm correct, with certain browsers being awkward about when they will save a cookie, or cough it back up, with the non-www. url page domain base, (or cookie domain) I don't see quite how to ensure auto logon works regardless.

    One way would be to redirect any page without www. to the same page with www. in front?

    This is not a critique, but if I'm right it needs some mods..

  2. #42
    Join Date
    Nov 2004
    Location
    U.K. South Wales
    Posts
    501
    Plugin Contributions
    0

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    ..still enmeshed.....and here's a mod
    this is the gobbledegook text from that cookies discussion page I quoted a while back which applies to us unfortunates using .com domains for our zencart,

    'Only hosts within the specified domain can set a cookie for a domain and domains must have at least two (2) or three (3) periods in them to prevent domains of the form: ".com", ".edu", and "va.us". Any domain that fails [sic] within one of the seven special top level domains listed below only require two periods. Any other domain requires at least three. The seven special top level domains are: "COM", "EDU", "NET", "ORG", "GOV", "MIL", and "INT".'
    To avoid the existing auto logon cookie not being saved, or not read later by the browser, because your .com domain without www. has only one dot, but it wants two.......

    as I said, this happens if the user accesses any cart page **without** the 'www.' in front of the domain name in the url,

    this javascript code puts the www. back in front:

    Code:
    var URL;
    URL = window.location.href;
    if(URL.indexOf("www.") < 0){
    window.location.href = URL.replace("://","://www.");
    }
    To implement this, with dreamweaver or another linux cr/lf editor, put that code into a file called
    'jscript_autologin.js'
    and save it.

    OR get it off my site in zip form
    http://www.hareslade.com/zc125/downl..._autologin.zip
    Upload the file into your \jscript folder of your current (or default) template.

    I'm not sure whether a .co.uk domain for instance also needs a www. to make the cookie available. As already stated, it appears that if the domain url does not have the www., IE6 especially, fails to give the cookie when the autologin text wants to get it, because the browser says a requesting .com domain without a www. is unnacceptable.
    ======

    The above is a non-invasive mod you can add into the auto login contrib.

    .coms people and others in the list will notice the home page now comes up correctly as auto logged in, provided of course the log on page was set to auto in the tickbox choice and the cookie was saved.

    My javascript knowledge is not immense, but the code seems to work, you see the url change abruptly in the address bar when a non-www. url is used.

  3. #43
    Join Date
    Nov 2004
    Location
    U.K. South Wales
    Posts
    501
    Plugin Contributions
    0

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    ..and my final comment is, is obvious but I didn't realise..

    If you activate auto login with say IE6, then start using opera instead, you have to do a 'activate auto login' with Opera freshly, because browsers don't use each other's cookies.

    That may be why some people think the contrib doesn't work proper..

  4. #44
    Join Date
    Apr 2007
    Location
    Tampa, Florida
    Posts
    180
    Plugin Contributions
    0

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    Hello,
    Just installed the Auto Login Mod, and I'm getting the following error at the top of the page. I'd like to find a fix rather than uninstall so any help would be appreciated.

    "module_directory('require_languages.php')); // set the product filters according to selected product type $typefilter = 'default'; if (isset($_GET['typefilter'])) $typefilter = $_GET['typefilter']; require(DIR_WS_INCLUDES . zen_get_index_filters_directory($typefilter . '_filter.php')); // query the database based on the selected filters $listing = $db->Execute($listing_sql); // if only one product in this category, go directly to the product page, instead of displaying a link to just one item: // if filter_id exists the 1 product redirect is ignored if (SKIP_SINGLE_PRODUCT_CATEGORIES=='True' and (!isset($_GET['filter_id']) and !isset($_GET['alpha_filter']))) { if ($listing->RecordCount() == 1) { zen_redirect(zen_href_link(zen_get_info_page($listing->fields['products_id']), ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing->fields['products_id'])); } } // This should be last line of the script: $zco_notifier->notify('NOTIFY_HEADER_END_INDEX'); ?>"

    Thanks

  5. #45
    Join Date
    Nov 2004
    Location
    U.K. South Wales
    Posts
    501
    Plugin Contributions
    0

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    autologin revisited..
    I think the log out page is not always working, the cookie is not being deleted.

    This can be tested by initialising autologon, convince yourself it works.

    Then log off, close the browser, (and all other browser windows of the same browser), then come back to the cart home page with the same browser.

    If the cookie really was deleted, you'll be asked to log on when you return.
    If it logs you on then obviously the cookie is still existing.

    I reckon the cookie set code in logoff\header_php.php is incomplete, see below.
    Without a path set to same path (/) as the original cookie, I can see why a logoff might not destroy the cookie.

    Certainly only the modified code seems to correctly work in firefox.

    Code:
    Existing code was similar to:
    setcookie("zencart_cookie_permlogin", "expired", time() - 3600);
    Modify to:
    setcookie("zencart_cookie_permlogin", "expired", time() - 3600, '/', $current_domain);

  6. #46
    Join Date
    Feb 2007
    Location
    Vienna
    Posts
    38
    Plugin Contributions
    0

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    Quote Originally Posted by gxjenkins View Post
    Hello,
    Just installed the Auto Login Mod, and I'm getting the following error at the top of the page. I'd like to find a fix rather than uninstall so any help would be appreciated.

    "module_directory('require_languages.php')); // set the product filters according to selected product type $typefilter = 'default'; if (isset($_GET['typefilter'])) $typefilter = $_GET['typefilter']; require(DIR_WS_INCLUDES . zen_get_index_filters_directory($typefilter . '_filter.php')); // query the database based on the selected filters $listing = $db->Execute($listing_sql); // if only one product in this category, go directly to the product page, instead of displaying a link to just one item: // if filter_id exists the 1 product redirect is ignored if (SKIP_SINGLE_PRODUCT_CATEGORIES=='True' and (!isset($_GET['filter_id']) and !isset($_GET['alpha_filter']))) { if ($listing->RecordCount() == 1) { zen_redirect(zen_href_link(zen_get_info_page($listing->fields['products_id']), ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing->fields['products_id'])); } } // This should be last line of the script: $zco_notifier->notify('NOTIFY_HEADER_END_INDEX'); ?>"

    Thanks
    well, seems it spits out the code as html.
    check if you forgot the opening php tags <?php in front of the code.

  7. #47
    Join Date
    Jan 2007
    Posts
    236
    Plugin Contributions
    0

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    The mod does NOT keep me logged in as promised. Im IE7 and all files have been processed correctly.

    www.theribbondiva.com

  8. #48
    Join Date
    Nov 2004
    Location
    U.K. South Wales
    Posts
    501
    Plugin Contributions
    0

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    studeo
    try firefox or netscape browsers

    check that the login cookie is saved with Ie7 (presumably theres a way)

  9. #49
    Join Date
    Jan 2007
    Posts
    236
    Plugin Contributions
    0

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    Im sorry to say that it is not effective in Firefox either. I will recheck my files but I believe I install all correctly.

  10. #50
    Join Date
    Jan 2007
    Posts
    236
    Plugin Contributions
    0

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    More info:

    I stay logged in as long as the browser is open. If I close and go back to the site, no login. I re-upped all files again just in case, but same non-results.

    Any advice?

    PS: If we can make this work, there is a bold NB: at the beginning of the check box line I would like to edit. Which file would that be in?

    Thanks

 

 
Page 5 of 21 FirstFirst ... 3456715 ... LastLast

Similar Threads

  1. Admin auto login for a cron job
    By Gigo in forum Customization from the Admin
    Replies: 20
    Last Post: 9 Aug 2012, 07:39 AM
  2. Is there a way to auto-login to admin?
    By mikejd in forum General Questions
    Replies: 4
    Last Post: 3 Nov 2009, 09:55 AM
  3. Auto-switching DB login to end 1226 Error
    By Camarilladee in forum Basic Configuration
    Replies: 7
    Last Post: 2 Jun 2006, 05:56 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