420 Posted May 12, 2004 Share Posted May 12, 2004 Using the latest version of osC and I can't get this mod working at all. Specifically, I get errors referring to "undefined function" for autologincookie on both the login and logoff pages. I have followed the insturctions to a T, all files there and as directed, ran the SQl, etc. tia for any help. :) Quote Link to comment Share on other sites More sharing options...
Tomcat Posted May 12, 2004 Share Posted May 12, 2004 Same problem here. The function is not recognized from the login page... Quote Outside links in signatures are not allowed! Link to comment Share on other sites More sharing options...
100asa Posted May 12, 2004 Share Posted May 12, 2004 I've the same problem. I'm waiting for help Quote Skype: centoasa Skype: remigioruberto Link to comment Share on other sites More sharing options...
magicproshop Posted May 13, 2004 Share Posted May 13, 2004 (edited) It looks like the contribution has just been updated. http://www.oscommerce.com/community/contributions,2087 I guess a file was missing. One instruction was missing in the read me file.include('includes/functions/autologin.php'); I would love to hear any feedback from those who have it working. Take care Edited May 13, 2004 by magicproshop Quote Arizona Patent Services Link to comment Share on other sites More sharing options...
100asa Posted May 13, 2004 Share Posted May 13, 2004 Work fine! One problem: I'm login with username and password (login.php), flag the box remember me, see my account, close IE, open again IE into my website, but I see the "welcome guest" in the index page. Thank you Quote Skype: centoasa Skype: remigioruberto Link to comment Share on other sites More sharing options...
Guest Posted May 13, 2004 Share Posted May 13, 2004 Same here. I have recognized that nowhere the function call to the tep_doautologin is done. So my question here is: where should this function be called from?? To make it clear: Setting cookies is working fine, but you can not read them out, because osc do not get the command to read them out. I HOPE SOMEONE CAN HELP HERE :o ----------------------- 2. just a hint for those who would like to use this also for customers with dynamic IP addresses (theoratically, because I could not test yet) Just go the the autologin.php and do this in function tep_autologincookie setcookie( "osC_AutoCookieLogin", md5($check_customer['customers_id'].$check_customer['customers_email_address'].$check_customer['customers_password']), time()+60*60*24*14, "/", "", 0 ); and in the function tep_doautologin $check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where md5(CONCAT(customers_id,customers_email_address,customers_password'))= '" . $HTTP_COOKIE_VARS['osC_AutoCookieLogin'] . "'"); This should work then... BUT it is vital that the first point is answered... PLEASE Quote Link to comment Share on other sites More sharing options...
100asa Posted May 13, 2004 Share Posted May 13, 2004 What's the part of code to be change? Quote Skype: centoasa Skype: remigioruberto Link to comment Share on other sites More sharing options...
Tomcat Posted May 13, 2004 Share Posted May 13, 2004 Hi, After the contribution fix now I don't get the function error but the autologin feature doesn't seem to work... I'm in local testing and when I close and re-open explorer I have to re-login because I'm not recognised as registered user Did anybody experience the same? Thanks Quote Outside links in signatures are not allowed! Link to comment Share on other sites More sharing options...
100asa Posted May 14, 2004 Share Posted May 14, 2004 I've just installed fixed contribution, autologin secure 2.01 by Chaveiro, but in login page this error: Fatal error: Cannot redeclare tep_autologincookie() (previously declared in /web/htdocs/www.100asa.it/home/includes/functions/autologin.php:21) in /web/htdocs/www.100asa.it/home/includes/functions/autologin.php on line 21 Quote Skype: centoasa Skype: remigioruberto Link to comment Share on other sites More sharing options...
magicproshop Posted May 20, 2004 Share Posted May 20, 2004 Does anyone have this working? Quote Arizona Patent Services Link to comment Share on other sites More sharing options...
notset4life Posted June 6, 2004 Share Posted June 6, 2004 I've just installed fixed contribution, autologin secure 2.01 by Chaveiro, but in login page this error: Fatal error: Cannot redeclare tep_autologincookie() (previously declared in /web/htdocs/www.100asa.it/home/includes/functions/autologin.php:21) in /web/htdocs/www.100asa.it/home/includes/functions/autologin.php on line 21 Same error here. Quote Link to comment Share on other sites More sharing options...
evama999 Posted June 9, 2004 Share Posted June 9, 2004 HI everyday,I came from Taiwan, It's glad to know every good friend. I also just installed fixed contribution, autologin secure 2.01 by Chaveiro. and the contribution can working very normal. But I found a very important problem First I have installed two osc2.2 on two different share hosting. one hosting I install osc2.2 and select install the SSL while in the osc2.2's insatll step. and another hosting insatll osc2.2 without SSL. A strong point was that if install osc2.2 with SSL,all your customer will feel your shopwebsite very safe like : new customer register,customer login,customer checkout ......etc,this was OSC's good because it auto suitable with your hosting. Now was my pronlem point, The autologin secure 2.01 insatlled with no SSL mode will be work very normal. The autologin secure 2.01 insatlled with SSL mode, can be installed ok but can not work,I mean after customer login ,he close the IE and open a new IE, this customer still need login again. autologin secure 2.01 is a very usefull contribution Does any good friend can help fix this problem Thank first. Quote Link to comment Share on other sites More sharing options...
Acheron Posted June 11, 2004 Share Posted June 11, 2004 It would be useful, but it doesn't work and never has. No sign of Chaviero issuing an update either. It's up to us now. ;) Quote Link to comment Share on other sites More sharing options...
Guest Posted July 13, 2004 Share Posted July 13, 2004 (edited) Take a look at the tep_autologincookie method (includes/functions/autologin.php): function tep_autologincookie ($on) { global $customer_id ; if ($on) { ? ? if (tep_session_is_registered('customer_id')) { ? ? ? $check_customer_query = tep_db_query("select customers_id, customers_password, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'"); ? ? ? if (tep_db_num_rows($check_customer_query)) { //? echo "COOKIE ON" ; ? ? $check_customer = tep_db_fetch_array($check_customer_query); ? ? $ip_address = tep_get_ip_address(); ? ? setcookie( "osC_AutoCookieLogin", md5($check_customer['customers_id'].$check_customer['customers_email_address'].$check_customer['customers_password'].$ip_address), time()+60*60*24*60, "/",? ".YOUR-DOMAIN.COM", 0 ); ? } ? } ? ? } else { //? echo "COOKIE OFF" ; ? ? setcookie( "osC_AutoCookieLogin", "", 0, "/",? ".YOUR-DOMAIN.COM", 0 ); } } Notice the definition of the .YOUR-DOMAIN.COM and the inclusion of the first dot. Now, it would probably be best to use a predefined constant variable from the stock OSC files (such as HTTP_COOKIE_DOMAIN) but not necessary. Be sure to use the dot in front especially if you use a different subdomain for SSL. For example, I use secure.my-domain.com and the cookie needs to be set DOMAIN WIDE. With the dot in front, when they sign in or register at https://secure.my-domain.com and return to http://my-domain.com/index.php they are still logged in. So, to answer everybody's question of whether or not the contribution works: YES, and works flawlessly if properly configured. Make these changes and see how it works for you! Chemo Edited July 13, 2004 by Chemo Quote Link to comment Share on other sites More sharing options...
sam_a Posted August 16, 2004 Share Posted August 16, 2004 Hi - I tried the configuration above, but it still doesn't work. No errors or anything. Login works fine. But when I close my IE browser and reopen it with osCommerce, I'm a Guest again. Anyone besides Chemo get this working? Or Autlogin 1.07 on the latest osCommerce? (No offense Chemo, I've just spent 24 hours trying to get it working on a fresh install, and am convinced there must be another configuration step.) Thanks ! Quote Link to comment Share on other sites More sharing options...
sam_a Posted August 16, 2004 Share Posted August 16, 2004 Never mind. Mine was a case of catalog/login.php vs catalog/include/language/english/login.php. Goodness ! Works fine. B) Quote Link to comment Share on other sites More sharing options...
ChrisW123 Posted August 17, 2004 Share Posted August 17, 2004 Sam, Can you explain the problem you had a little more? Did you mean you made your changes to catalog/include/language/english/login.php when you should have made them to catalog/login.php? I made my changes to catalog/login.php but I still can't get this to work! It seems that in Autologin.php, the function tep_autologincookie() is only called when $on is false (logoff). But it never gets called when @on is true. Any ideas please! Thanks, -Chris. Quote Link to comment Share on other sites More sharing options...
sam_a Posted August 18, 2004 Share Posted August 18, 2004 Yes, I accidentally edited the wrong file. After many hours, I did a fresh install, including the english/login file, and it started working. No configuration was necessary, though I've since changed some configuration okay. Quote Link to comment Share on other sites More sharing options...
Druide Posted August 18, 2004 Share Posted August 18, 2004 (edited) NOTE to ALL users from this contribution after installing this contribution i noticed a horrible thing, the searchengine spiders are NOT picking up your site anymore. The reason is that it stops reading the webpage in application_top.php where the change from this contribution starts if (ALLOW_AUTOLOGON == 'true') { // Is Autologon enabled? if (basename($PHP_SELF) != FILENAME_LOGIN) { // yes if (!tep_session_is_registered('customer_id')) { include('includes/modules/autologon.php'); } } } else { setcookie("email_address", "", time() - 3600, $cookie_path); //no, delete email_address cookie setcookie("password", "", time() - 3600, $cookie_path); //no, delete password cookie } thats where it gets killed, it took me forever to bugtrack this one :(:( SO BE AWARE !!! i've turned it off till the moment i've time to bugtrack this Edited August 18, 2004 by Druide Quote Robert We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;) Link to comment Share on other sites More sharing options...
sam_a Posted August 18, 2004 Share Posted August 18, 2004 Ok, I am mistaken, I have not gotten this mod working properly as of yet. EITHER: (1) The mod seems installed fine, but when I close and open my browser the login is lost. OR (2) The login holds when I close and open my browser, but there is no way to logoff. I can toggle between these two scenarios by modifying the configuration as Chemo suggests. It seems Chemo's configuration is necessary to get the mod working, but then the logoff is failing to reset the cookie OR the application_top code is ignoring the reset the cookie. Any ideas how to fix this mod's logoff or application_top code? Sam Quote Link to comment Share on other sites More sharing options...
ChrisW123 Posted August 19, 2004 Share Posted August 19, 2004 No idea how to make it work... I'm sure I installed it correctly (checked it twice) and it just doesn't work for me. Plus with the post by Druide about search engines stopping their search because of it, I'm going to completely uninstall it. :( Quote Link to comment Share on other sites More sharing options...
sam_a Posted August 19, 2004 Share Posted August 19, 2004 Chris, let me know if you find another solutions (like getting the other autologin mod to work). Meantime I'm going to keep at this a little longer. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 5, 2004 Share Posted September 5, 2004 The claim by him about search engines not spidering the site after the contribution install is not accurate. My clients site gets crawled every day and indexes properly. Chemo Quote Link to comment Share on other sites More sharing options...
Guest Posted September 7, 2004 Share Posted September 7, 2004 The claim by him about search engines not spidering the site after the contribution install is not accurate. My clients site gets crawled every day and indexes properly. Chemo After installing this mod, I could not get it to work, but my site is still spidered daily. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 16, 2004 Share Posted September 16, 2004 Okay, I finally got it to work. The tricky part for me was figuring out how to do the SQL part (since I don't do much with that on a regular basis). Everything else is pretty straightforward. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.