Jump to content

cookie problem


vampke

Recommended Posts

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...

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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?

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.