473,385 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

MSIE 7 and cookies

Ike
I have a username/sid pair for typical authentication. That is, for someone
signing in under a given username, a sid is created, saved in both a cookie
and the db on the server. This I am doing as follows:

$timer = md5(time());
$sid = $UserID . "+" . $timer. "+" . $country;
SetCookie("ggcookie", $sid, time() + 86400 * 10000); //Set Cookie
for 10000 days
$query = "update associates set sid=\"$timer\" where
username=\"$UserID\"";

Thus, when another page is called, I immediately retrieve the value of the
cookie as follows:

if (!(isset($ggcookie))) {
echo "cookie not set in browser.";
exit;
}
$sidarray = explode("+", "$ggcookie");

However, for one particular user I have, upon upgrading to MSIE 7, this no
longer works as whenever he calls up a new page, he gets "cookie not set in
browser". In looking at his security settings his Zone is "Internet," set to
"Medium High" and his privacy policy is set to "Medium" (see below). I have
duplicated these settings on my machine and am able to get and parse the
cookie without any problem. I am wondering what may have changes with MSIE
7, or something I am missing, that is throwing this entire procedure for
this particular user? Any ideas are greatly appreciated. -Ike

"Medium" privacy settings call for
-blocks third party cookies that do not have a privacy policy
-blocks third party cookies that save information that can be used to
contact you without your explicit consent
-restricts first-party cookies that save information that can be used to
contact you without your explicit consent
(note, these are the same settings as on my machine which is working fine)
Feb 1 '07 #1
9 1594
Kind of weird... Is he using any kind of other firewall software?

User could try clearing his cookies and retrying.

You could try adding the path and domain to the cookie just to see
what happens: setcookie('cookie', $val, time() + $exp, '/',
$_SERVER['HTTP_HOST']);

On Jan 31, 7:45 pm, "Ike" <r...@hotmail.comwrote:
I have a username/sid pair for typical authentication. That is, for someone
signing in under a given username, a sid is created, saved in both a cookie
and the db on the server. This I am doing as follows:

$timer = md5(time());
$sid = $UserID . "+" . $timer. "+" . $country;
SetCookie("ggcookie", $sid, time() + 86400 * 10000); //Set Cookie
for 10000 days
$query = "update associates set sid=\"$timer\" where
username=\"$UserID\"";

Thus, when another page is called, I immediately retrieve the value of the
cookie as follows:

if (!(isset($ggcookie))) {
echo "cookie not set in browser.";
exit;}

$sidarray = explode("+", "$ggcookie");

However, for one particular user I have, upon upgrading to MSIE 7, this no
longer works as whenever he calls up a new page, he gets "cookie not set in
browser". In looking at his security settings his Zone is "Internet," set to
"Medium High" and his privacy policy is set to "Medium" (see below). I have
duplicated these settings on my machine and am able to get and parse the
cookie without any problem. I am wondering what may have changes with MSIE
7, or something I am missing, that is throwing this entire procedure for
this particular user? Any ideas are greatly appreciated. -Ike

"Medium" privacy settings call for
-blocks third party cookies that do not have a privacy policy
-blocks third party cookies that save information that can be used to
contact you without your explicit consent
-restricts first-party cookies that save information that can be used to
contact you without your explicit consent
(note, these are the same settings as on my machine which is working fine)

Feb 1 '07 #2
On Wed, 31 Jan 2007 16:45:35 -0800, Ike <rx*@hotmail.comwrote:
I have a username/sid pair for typical authentication. That is, for
someone
signing in under a given username, a sid is created, saved in both a
cookie
and the db on the server. This I am doing as follows:

$timer = md5(time());
$sid = $UserID . "+" . $timer. "+" . $country;
SetCookie("ggcookie", $sid, time() + 86400 * 10000); //Set Cookie
for 10000 days
$query = "update associates set sid=\"$timer\" where
username=\"$UserID\"";

Thus, when another page is called, I immediately retrieve the value of
the
cookie as follows:

if (!(isset($ggcookie))) {
echo "cookie not set in browser.";
exit;
}
$sidarray = explode("+", "$ggcookie");

However, for one particular user I have, upon upgrading to MSIE 7, this
no
longer works as whenever he calls up a new page, he gets "cookie not set
in
browser". In looking at his security settings his Zone is "Internet,"
set to
"Medium High" and his privacy policy is set to "Medium" (see below). I
have
duplicated these settings on my machine and am able to get and parse the
cookie without any problem. I am wondering what may have changes with
MSIE
7, or something I am missing, that is throwing this entire procedure for
this particular user? Any ideas are greatly appreciated. -Ike

"Medium" privacy settings call for
-blocks third party cookies that do not have a privacy policy
-blocks third party cookies that save information that can be used to
contact you without your explicit consent
-restricts first-party cookies that save information that can be used to
contact you without your explicit consent
(note, these are the same settings as on my machine which is working
fine)
Why is it that you kill the script if the cookie isn't set? You shouldn't
require cookies to be set in order for people to use your site.

--
Curtis, http://dyersweb.com
Feb 1 '07 #3
Ike
This ONLY occurs when a new browswer window is instantiated. That is, an
instance of the browswer is running, it sets a cookie. Now, if you go to any
page within the site, it checks to see that the cookie is set, if so, it
let's you into the page on that site. All works fine.

However, if you open another browswer instance (the first one, which set the
cookie, is still running too) the second instance fails to see that the
cookie is set in MSIE 7.

Any ideas how I can make the second instance know that the cookie is, in
fact, already set? Thanks, Ike
Feb 1 '07 #4
"Ike" <rx*@hotmail.comwrote:
>
This ONLY occurs when a new browswer window is instantiated. That is, an
instance of the browswer is running, it sets a cookie. Now, if you go to any
page within the site, it checks to see that the cookie is set, if so, it
let's you into the page on that site. All works fine.

However, if you open another browswer instance (the first one, which set the
cookie, is still running too) the second instance fails to see that the
cookie is set in MSIE 7.
Do your cookies have expiration dates in the future? If not, this is
exactly how it's supposed to work. The cookies are local to the instance.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Feb 2 '07 #5
Ike

"Tim Roberts" <ti**@probo.comwrote in message
news:rb********************************@4ax.com...
"Ike" <rx*@hotmail.comwrote:
>>

Do your cookies have expiration dates in the future? If not, this is
exactly how it's supposed to work. The cookies are local to the instance.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Tim,

Is this only for MSIE I suppose? In Firefox, it opens a new instance of the
browswer, and runs fine there. -Ike
Feb 2 '07 #6
On Fri, 02 Feb 2007 06:06:01 -0800, Ike <rx*@hotmail.comwrote:
>
"Tim Roberts" <ti**@probo.comwrote in message
news:rb********************************@4ax.com...
>"Ike" <rx*@hotmail.comwrote:
>>>

Do your cookies have expiration dates in the future? If not, this is
exactly how it's supposed to work. The cookies are local to the
instance.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.

Tim,

Is this only for MSIE I suppose? In Firefox, it opens a new instance of
the
browswer, and runs fine there. -Ike

Try setting the expiration date ahead to see for sure

--
Curtis, http://dyersweb.com
Feb 3 '07 #7
On Feb 1, 5:45 am, "Ike" <r...@hotmail.comwrote:
I have a username/sid pair for typical authentication. That is, for someone
signing in under a given username, a sid is created, saved in both a cookie
and the db on the server. This I am doing as follows:

$timer = md5(time());
$sid = $UserID . "+" . $timer. "+" . $country;
SetCookie("ggcookie", $sid, time() + 86400 * 10000); //Set Cookie
for 10000 days
<snip>

Do not reinvent the wheels; use PHP's own session--preferrably
with db based handler.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Feb 4 '07 #8
On Feb 1, 9:15 am, Curtis <dyers...@verizon.netwrote:
<snip>
Why is it that you kill the script if the cookie isn't set? You shouldn't
require cookies to be set in order for people to use your site.
Cookies are the effective way to solve many known security issues.
It is always better to use cookies than trans sid based sessions.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Feb 4 '07 #9
On Sat, 03 Feb 2007 23:19:12 -0800, R. Rajesh Jeba Anbiah
<ng**********@rediffmail.comwrote:
On Feb 1, 9:15 am, Curtis <dyers...@verizon.netwrote:
<snip>
>Why is it that you kill the script if the cookie isn't set? You
shouldn't
require cookies to be set in order for people to use your site.

Cookies are the effective way to solve many known security issues.
It is always better to use cookies than trans sid based sessions.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/
Yes, but that wasn't my point.

--
Curtis, http://dyersweb.com
Feb 5 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Rudolf Horbas | last post by:
G'day, has any of You ever experienced the problem that posted forms deliver an empty $_POST-array? I have a form like: <form method="POST" action="https://.../result.html?qid=70"> <input...
6
by: Ralph A. Gable | last post by:
I am opening MSIE6 with this code: ie=Dispatch('InternetExplorer.Application.1') ie.Navigate(url) while ie.Busy: time.sleep(0.1) ied=ie.Document while ied.ReadyState != 'complete':...
4
by: Brian Burgess | last post by:
Hi all, Anyone know of any special issues with storing cookies with ASP? I'm trying this with two browsers: One is IE 6.0 with cookies set to 'prompt'. This has been working properly as any...
3
by: Stan Brown | last post by:
Standard advice -- even given here recently -- for hiding CSS from MSIE 4.x is to enclose the styles in @media { ... }. The same advice is given at . Unfortunately, it doesn't work with MSIE...
4
by: Alex Bell | last post by:
I am developing at http://www.members.iinet.net.au/~abell1/test/index.htm with city.css at http://www.members.iinet.net.au/~abell1/test/city.css. Both validate. In index.htm there is a block of...
0
by: Alex Bell | last post by:
Thanks to the people who helped me with centering a block of text in MSIE 5.5 in the site I am developing at http://www.members.iinet.net.au/~abell1/test/index.htm with city.css at...
6
by: Mark | last post by:
Hi... I've come across some weird bug with Response.Cookies. Or maybe it will be called "by design" but for the life of me I can't figure out what purpose it would serve. If you're setting a...
1
by: ticmanis | last post by:
Hello, I'm having trouble getting MSIE 6.0 (running on XP SP2) to accept a cookie which works fine in both Firefox and wget. The web server is Boa 0.94.13 (a small embedded server) using PHP...
2
by: Vincitori | last post by:
Hi, is there any way I can read and write Microsoft Internet Explorer's cookies? Thanks, - Vincent
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.