[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Cookies not persistent
At 10:47 PM 6/1/2002 -0700, you wrote:
>>>Hi, for some reason my cookies aren't persistent. I have set
>>>an >>expire in the proper format in the set-cookie tag, and they are
>>>read properly >>until I close the browser and come back. There is no
>>>entry for "Cookies" in >>the catalog.cfg which should then default to
>>>"Yes". This is on 4.8.3. >>I've scoured the manuals. What am I
>>>missing? Thank you!
>>I assume that you have set your browser preferences to allow persistent
>>cookies. I ignore persistent cookies in my browser settings.
>>
>>You could set your browser to show you the contents of the cookies it
>>receives, which will verify whether or not Interchange is sending you
>>cookies, and may help you to track down the problem.
>>
>>Other than the above, if you show your [set-cookie] code, people may be
>>able to let you know where you're going wrong.
>
>
>Ok, I checked and my browser is set to accept persistent cookies. Here is
>the code that sets and reads the cookies:
>
>[set-cookie name=loginu value="[value mv_username]" expire="Mon,
>03-Jun-2005 12:00:00 GMT"][set-cookie name=loginp value="[value
>mv_password]" expire="Mon, 03-Jun-2005 12:00:00 GMT"]
>
>[set name=autologin interpolate=1][read-cookie loginu][/set]
>[if scratch autologin ne ]
><font face="Verdana" size="2"><b>Hello [scratchd autologin]!</b></font>
>[/if]
>
>This code works perfectly to set and read the cookie until the browser is
>closed and reopened. No cookie is read then and [read-cookie loginu]
>returns nothing. I've been over and over this and I can't figure it out.
>Thanks!
>
>- Grant
>
>P.S. That expiration date is only temporary.
Grant - FWIW, I enabled persistent cookies in my browser, set CookieLogin
to yes in a standard 4.8.3. foundation store, and boom - cookie auto-login
works, even after closing and starting an new browser session. The code
that actually writes this cookie is located in Userdb.pm and I would
recommend you let it do it's thing rather than trying to roll your own. All
you have to is add a checkbox which (when checked) will set
mv_cookie_password to 1 on the login and/or new_account forms one you have
verified that the user's browser will accept cookies...
- Ed L.
===============================================================
Increase profits from your Interchange store...
http://www.newmediaems.com/cgi-bin/nm/software_fus.html
===============================================================
New Media E.M.S. Software Solutions for Business
463 Main St., Suite D eCommerce | Consulting | Hosting
Placerville, CA 95667 edl@newmediaems.com
(530) 622-9421 http://www.newmediaems.com
(866) 519-4680 Toll-Free (530) 622-9426 Fax
===============================================================