Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-25-2007, 04:43 PM   PM User | #1
knkk
New Coder

 
Join Date: Jun 2007
Posts: 61
Thanks: 13
Thanked 0 Times in 0 Posts
knkk is an unknown quantity at this point
Physical location of cookies created by setCookie() function, and expiry

I am not able to locate the cookies created by the setCookie function. They are not in the standard IE folder where temporary Internet files and cookies are placed. Does anyone know where I search, or how I trace them?

Also, I created cookies using this command:

Code:
$string_to_check = $type."_".$pid;
setCookie("$string_to_check", "1", time()+30*1);
The cookie doesn't expire in 30 seconds - in fact, it doesn't seem to expire at all.

One of the reasons that I want to see the actual cookies is to see what the expiration time is being set to.

I'd be quite grateful for any pointers. Thank you very much for your time!
knkk is offline   Reply With Quote
Old 08-25-2007, 04:47 PM   PM User | #2
Nightfire
Senior Coder

 
Nightfire's Avatar
 
Join Date: Jun 2002
Posts: 4,266
Thanks: 6
Thanked 48 Times in 48 Posts
Nightfire is on a distinguished road
You do realise that time()+30*1 is identical to time()+30 don't you?
__________________
Blue Panda
Website Design | 1 Pound Ads | 'ow much? | Coding Geeks
Nightfire is offline   Reply With Quote
Old 08-26-2007, 07:56 AM   PM User | #3
knkk
New Coder

 
Join Date: Jun 2007
Posts: 61
Thanks: 13
Thanked 0 Times in 0 Posts
knkk is an unknown quantity at this point
Oh yes . It was 60*60, then it became 60*5 etc as I kept testing...
knkk is offline   Reply With Quote
Old 08-26-2007, 08:13 AM   PM User | #4
knkk
New Coder

 
Join Date: Jun 2007
Posts: 61
Thanks: 13
Thanked 0 Times in 0 Posts
knkk is an unknown quantity at this point
Also, I just noticed that my code works in FF but not in IE. That is, the cookie expires in FF in 30s, but not in IE. But I do not see the actual cookie in FF either (when I do Tools -> Options -> Show Cookies).
knkk is offline   Reply With Quote
Old 08-26-2007, 01:22 PM   PM User | #5
knkk
New Coder

 
Join Date: Jun 2007
Posts: 61
Thanks: 13
Thanked 0 Times in 0 Posts
knkk is an unknown quantity at this point
I just figured that my IE cookie expires in about 9 hours and 33 minutes though I set it to expire in 30 seconds. Cannot figure out why .
knkk is offline   Reply With Quote
Old 08-26-2007, 02:24 PM   PM User | #6
knkk
New Coder

 
Join Date: Jun 2007
Posts: 61
Thanks: 13
Thanked 0 Times in 0 Posts
knkk is an unknown quantity at this point
Okay, so I figured this out. The time zones in the client machine and the server were different. I set them both to the exact same time and zone, and IE too started working.

For anyone who needs to do the same on a Linux box (change the time zone):

http://www.linuxsa.org.au/tips/time.html
knkk is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:10 PM.


Advertisement
Log in to turn off these ads.