vampke Posted January 2, 2008 Share Posted January 2, 2008 Hi guys, I'm not sure if this is the right forum, so i apologise if it is not. I 've been using an open source php/mysql script for quite some time now. Everything worked great until recently i upgraded to the latest version. (The script is very uncommon and there is no forum for it anymore, author is not responsive). In the manager there is an icon that will open a javascript popup screen with the session id in the link. Since the upgrade, things will work until the cookie expires (I think this is the reason anyway), after cookie expiration the popup turns blank. If I manually delete the cookies and log in again, i get what i need. popup link is using this code: <a href="core/page.php?id=00001601&sessid=29d159f8580f66102738dbd769fca87f" onclick="NewWindow(this.href,'name','600','500','yes');return false;"> Obviously this is a cookie problem, but what can be done to solve this? Hope anyone can help me... Quote Link to comment https://forums.phpfreaks.com/topic/84118-cookie-problem/ Share on other sites More sharing options...
revraz Posted January 2, 2008 Share Posted January 2, 2008 What did you update to the latest version? Quote Link to comment https://forums.phpfreaks.com/topic/84118-cookie-problem/#findComment-428182 Share on other sites More sharing options...
vampke Posted January 2, 2008 Author Share Posted January 2, 2008 What did you update to the latest version? more functionality, security bug fixes, but... does it matter? Quote Link to comment https://forums.phpfreaks.com/topic/84118-cookie-problem/#findComment-428183 Share on other sites More sharing options...
vampke Posted January 2, 2008 Author Share Posted January 2, 2008 okay, i've been trying a few things. Apparently the cookies are set in the login script like this: setcookie("PHPSESSID",session_id( ),time()+3600,"/",$cookieDomain,""); setcookie("u",$email,time()+3600,"/",$cookieDomain,""); setcookie("type",$tname,time()+3600,"/",$cookieDomain,""); setcookie("time",date("U"),time()+3600,"/",$cookieDomain,""); logging out will do this: setcookie("session","0",time() - 3600,"","",""); setcookie("u","",time() - 3600,"","",""); setcookie("type","",time() - 3600,"","",""); setcookie("time","",time() - 3600,"","",""); The weird part is: after logging out, when i click on the back-button, the manager is still working. I'm guessing my cookies are not expiring like they should. I can see this in the cookie manager. Anyone any ideas? tried this in different browsers, they all do this Why aren't my cookies expiring? Quote Link to comment https://forums.phpfreaks.com/topic/84118-cookie-problem/#findComment-428478 Share on other sites More sharing options...
revraz Posted January 2, 2008 Share Posted January 2, 2008 I didn't ask Why, I asked What. As in, What was updated? PHP, the Script, MySQL, IIS, OS... Quote Link to comment https://forums.phpfreaks.com/topic/84118-cookie-problem/#findComment-428480 Share on other sites More sharing options...
revraz Posted January 2, 2008 Share Posted January 2, 2008 Try it like this setcookie("PHPSESSID",session_id( ),time()-13600,"/",$cookieDomain,""); Also, if you are using any sessions, they are not getting deleted here. So if your manager checks sessions they can still navigate. Quote Link to comment https://forums.phpfreaks.com/topic/84118-cookie-problem/#findComment-428485 Share on other sites More sharing options...
vampke Posted January 2, 2008 Author Share Posted January 2, 2008 I didn't ask Why, I asked What. As in, What was updated? PHP, the Script, MySQL, IIS, OS... oops, sorry, i thought it was clear that i updated the script setcookie("PHPSESSID",session_id( ),time()-13600,"/",$cookieDomain,""); i've already tried this, the cookie still doesn't get deleted. expiration date and time remain the same Also, if you are using any sessions, they are not getting deleted here. So if your manager checks sessions they can still navigate. how do you mean? Quote Link to comment https://forums.phpfreaks.com/topic/84118-cookie-problem/#findComment-428494 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.