
October 9th, 2008, 03:15 PM
| | | Cookie in IE7
I have st a cookie that would last for 30 days. If I put a line <img
src="http://www.example.com/readcookie.php" width="1" height="1"in a
php file, I cannot read the cookie if I use IE7. However, it works in
Firefox and Chrome. If I try to access the URL http://www.example.com/readcookie.php
in IE7, I am able to read the cookie then.
I am using the following lines of code
to set the cookie
setcookie("TestCookie",$userid,time()+(60*60*24*30 ),"/"); ------------- to read the cookie
$MyUserId = $_COOKIE['TestCookie']; -------------------------Sets
the variable $MyUserId if I try to access the file containg this code
in browser. However, this code does not work if I include the file
containing this code. | 
October 9th, 2008, 06:25 PM
| | | Re: Cookie in IE7
Pankaj wrote: Quote:
I have st a cookie that would last for 30 days. If I put a line <img
src="http://www.example.com/readcookie.php" width="1" height="1"in a
php file, I cannot read the cookie if I use IE7. However, it works in
Firefox and Chrome. If I try to access the URL http://www.example.com/readcookie.php
in IE7, I am able to read the cookie then.
>
I am using the following lines of code
>
to set the cookie
>
setcookie("TestCookie",$userid,time()+(60*60*24*30 ),"/"); ------------->
to read the cookie
>
$MyUserId = $_COOKIE['TestCookie']; -------------------------Sets
the variable $MyUserId if I try to access the file containg this code
in browser. However, this code does not work if I include the file
containing this code.
| When setting the cookie from server, it would require that you
reload the page. http://in2.php.net/setcookie
--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/ | 
October 9th, 2008, 06:35 PM
| | | Re: Cookie in IE7
Pankaj wrote: Quote:
I have st a cookie that would last for 30 days. If I put a line <img
src="http://www.example.com/readcookie.php" width="1" height="1"in a
php file, I cannot read the cookie if I use IE7. However, it works in
Firefox and Chrome. If I try to access the URL http://www.example.com/readcookie.php
in IE7, I am able to read the cookie then.
>
I am using the following lines of code
>
to set the cookie
>
setcookie("TestCookie",$userid,time()+(60*60*24*30 ),"/"); ------------->
to read the cookie
>
$MyUserId = $_COOKIE['TestCookie']; -------------------------Sets
the variable $MyUserId if I try to access the file containg this code
in browser. However, this code does not work if I include the file
containing this code.
>
>
>
| Why are you trying to read a cookie with an <imgtag? That doesn't
make any sense.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. jstucklex@attglobal.net
================== | 
October 9th, 2008, 06:35 PM
| | | Re: Cookie in IE7
On Oct 9, 10:25 pm, Jerry Stuckle <jstuck...@attglobal.netwrote: <snip> Quote:
Why are you trying to read a cookie with an <imgtag? That doesn't
make any sense.
| Possibly, he's spying his users (stats).
<OT>
How is life and economy going?
</OT>
--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/ | 
October 9th, 2008, 06:45 PM
| | | Re: Cookie in IE7
On Oct 9, 10:32 pm, "R. Rajesh Jeba Anbiah"
<ng4rrjanb...@rediffmail.comwrote: Quote:
On Oct 9, 10:25 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
> <snip> Quote:
Why are you trying to read a cookie with an <imgtag? That doesn't
make any sense.
| >
Possibly, he's spying his users (stats).
>
<OT>
How is life and economy going?
</OT>
| Disregard OT, I thought I was replying to Geof
--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/ | 
October 9th, 2008, 07:15 PM
| | | Re: Cookie in IE7
Message-ID:
<aafee92c-0550-480a-9672-981904193479@n33g2000pri.googlegroups.comfrom
R. Rajesh Jeba Anbiah contained the following: Quote: Quote:
><OT>
> How is life and economy going?
></OT>
| >
Disregard OT, I thought I was replying to Geof
| :-)
Mail me and we can catch up (use the address in the sig), Haven't seen
you post for ages..
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011 http://slipperyhill.co.uk - http://4theweb.co.uk | 
October 9th, 2008, 09:25 PM
| | | Re: Cookie in IE7
..oO(Jerry Stuckle) Quote:
>Pankaj wrote: Quote:
>I have st a cookie that would last for 30 days. If I put a line <img
>src="http://www.example.com/readcookie.php" width="1" height="1"in a
>php file, I cannot read the cookie if I use IE7. However, it works in
>Firefox and Chrome. If I try to access the URL http://www.example.com/readcookie.php
>in IE7, I am able to read the cookie then.
>>
>I am using the following lines of code
>>
>to set the cookie
>>
>setcookie("TestCookie",$userid,time()+(60*60*24*3 0),"/"); ------------->>
>to read the cookie
>>
>$MyUserId = $_COOKIE['TestCookie']; -------------------------Sets
>the variable $MyUserId if I try to access the file containg this code
>in browser. However, this code does not work if I include the file
>containing this code.
>>
>>
>>
| >
>Why are you trying to read a cookie with an <imgtag? That doesn't
>make any sense.
| It does. An HTTP request is an HTTP request, it doesn't matter if the
return is an HTML page or an image. If for example there's an image-
generating script, there might also be the need for reading some cookie
value, maybe the preferred image size or something like that.
In my own case some images can be delivered by a script from a protected
directory. Authentication is handled with a cookie-based session, so the
request for such an image _must_ contain the session cookie or the image
won't be delivered, because the authentication fails.
Micha | 
October 10th, 2008, 06:45 AM
| | | Re: Cookie in IE7
On Oct 10, 1:16*am, Michael Fesser <neti...@gmx.dewrote: Quote:
.oO(Jerry Stuckle)
>
>
> Quote:
Pankaj wrote: Quote:
I have st a cookie that would last for 30 days. If I put a line <img
src="http://www.example.com/readcookie.php" width="1" height="1"in a
php file, I cannot read the cookie if I use IE7. However, it works in
Firefox and Chrome. If I try to access the URLhttp://www.example.com/readcookie.php
in IE7, *I am able to read the cookie then.
| | > Quote: Quote: |
I am using the following lines of code
| | >> Quote: Quote:
setcookie("TestCookie",$userid,time()+(60*60*24*30 ),"/"); -------------
>Sets the cookie
| | >> Quote: Quote:
$MyUserId = $_COOKIE['TestCookie']; -------------------------Sets
the variable $MyUserId if I try to access the file containg this code
in browser. However, this code does not work if I include the file
containing this code.
| | > Quote:
Why are you trying to read a cookie with an <imgtag? *That doesn't
make any sense.
| >
It does. An HTTP request is an HTTP request, it doesn't matter if the
return is an HTML page or an image. If for example there's an image-
generating script, there might also be the need for reading some cookie
value, maybe the preferred image size or something like that.
>
In my own case some images can be delivered by a script from a protected
directory. Authentication is handled with a cookie-based session, so the
request for such an image _must_ contain the session cookie or the image
won't be delivered, because the authentication fails.
>
Micha
| I am tracking how many users from my site visited one of my partner
site and signed up there. AFAIK, I do not have another way of finding
this out. I do not think it is an issue with authentication because
the code works if the user agent is firefox/ opera/ chrome.
Pankaj | 
October 10th, 2008, 12:55 PM
| | | Re: Cookie in IE7
Pankaj wrote: Quote:
On Oct 10, 1:16 am, Michael Fesser <neti...@gmx.dewrote: Quote:
>.oO(Jerry Stuckle)
>>
>>
>> Quote:
>>Pankaj wrote:
>>>I have st a cookie that would last for 30 days. If I put a line <img
>>>src="http://www.example.com/readcookie.php" width="1" height="1"in a
>>>php file, I cannot read the cookie if I use IE7. However, it works in
>>>Firefox and Chrome. If I try to access the URLhttp://www.example.com/readcookie.php
>>>in IE7, I am able to read the cookie then.
>>>I am using the following lines of code
>>>to set the cookie
>>>setcookie("TestCookie",$userid,time()+(60*60*24 *30),"/"); -------------
>>>>Sets the cookie
>>>to read the cookie
>>>$MyUserId = $_COOKIE['TestCookie']; -------------------------Sets
>>>the variable $MyUserId if I try to access the file containg this code
>>>in browser. However, this code does not work if I include the file
>>>containing this code.
>>Why are you trying to read a cookie with an <imgtag? That doesn't
>>make any sense.
| >It does. An HTTP request is an HTTP request, it doesn't matter if the
>return is an HTML page or an image. If for example there's an image-
>generating script, there might also be the need for reading some cookie
>value, maybe the preferred image size or something like that.
>>
>In my own case some images can be delivered by a script from a protected
>directory. Authentication is handled with a cookie-based session, so the
>request for such an image _must_ contain the session cookie or the image
>won't be delivered, because the authentication fails.
>>
>Micha
| >
I am tracking how many users from my site visited one of my partner
site and signed up there. AFAIK, I do not have another way of finding
this out. I do not think it is an issue with authentication because
the code works if the user agent is firefox/ opera/ chrome.
>
Pankaj
>
| Are both of these sites in the same domain?
This type of failure is usually caused by a higher security setting in
IE than the others.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. jstucklex@attglobal.net
================== | 
October 11th, 2008, 02:35 AM
| | | Re: Cookie in IE7
Rajesh, the page is reloaded. I tried to read the cookie after the
user has filled up a two page form
R. Rajesh Jeba Anbiah wrote: Quote:
Pankaj wrote: Quote:
I have st a cookie that would last for 30 days. If I put a line <img
src="http://www.example.com/readcookie.php" width="1" height="1"in a
php file, I cannot read the cookie if I use IE7. However, it works in
Firefox and Chrome. If I try to access the URL http://www.example.com/readcookie.php
in IE7, I am able to read the cookie then.
I am using the following lines of code
to set the cookie
setcookie("TestCookie",$userid,time()+(60*60*24*30 ),"/"); ------------- to read the cookie
$MyUserId = $_COOKIE['TestCookie']; -------------------------Sets
the variable $MyUserId if I try to access the file containg this code
in browser. However, this code does not work if I include the file
containing this code.
| >
When setting the cookie from server, it would require that you
reload the page. http://in2.php.net/setcookie
>
--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/ | | 
October 11th, 2008, 02:35 AM
| | | Re: Cookie in IE7
Yes they are on the same domain
Jerry Stuckle wrote: Quote:
Pankaj wrote: Quote:
On Oct 10, 1:16 am, Michael Fesser <neti...@gmx.dewrote: Quote:
.oO(Jerry Stuckle)
>
>
>
>Pankaj wrote:
>>I have st a cookie that would last for 30 days. If I put a line <img
>>src="http://www.example.com/readcookie.php" width="1" height="1"in a
>>php file, I cannot read the cookie if I use IE7. However, it works in
>>Firefox and Chrome. If I try to access the URLhttp://www.example.com/readcookie.php
>>in IE7, I am able to read the cookie then.
>>I am using the following lines of code
>>to set the cookie
>>setcookie("TestCookie",$userid,time()+(60*60*24* 30),"/"); -------------
>>>Sets the cookie
>>to read the cookie
>>$MyUserId = $_COOKIE['TestCookie']; -------------------------Sets
>>the variable $MyUserId if I try to access the file containg this code
>>in browser. However, this code does not work if I include the file
>>containing this code.
>Why are you trying to read a cookie with an <imgtag? That doesn't
>make any sense.
It does. An HTTP request is an HTTP request, it doesn't matter if the
return is an HTML page or an image. If for example there's an image-
generating script, there might also be the need for reading some cookie
value, maybe the preferred image size or something like that.
>
In my own case some images can be delivered by a script from a protected
directory. Authentication is handled with a cookie-based session, so the
request for such an image _must_ contain the session cookie or the image
won't be delivered, because the authentication fails.
>
Micha
| I am tracking how many users from my site visited one of my partner
site and signed up there. AFAIK, I do not have another way of finding
this out. I do not think it is an issue with authentication because
the code works if the user agent is firefox/ opera/ chrome.
Pankaj
| >
Are both of these sites in the same domain?
>
This type of failure is usually caused by a higher security setting in
IE than the others.
>
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. jstucklex@attglobal.net
==================
| | 
October 11th, 2008, 07:45 AM
| | | Re: Cookie in IE7
On Fri, 10 Oct 2008 18:32:46 -0700 (PDT), Pankaj <panahuja@gmail.com>
wrote: Quote: |
>Yes they are on the same domain
| and subdomain (i.e. both have "www")?
--
Free personal divertable Phone number: <http://www.bizorg.co.uk/personalnos.htm> | 
October 14th, 2008, 03:25 AM
| | | Re: Cookie in IE7
On Oct 11, 6:31 am, Pankaj <panah...@gmail.comwrote: Quote:
Rajesh, the page is reloaded. I tried to read the cookie after the
user has filled up a two page form
| Check the status bar--if it's been denied by the policy settings.
Probably your domain name or cookie name might be a trouble. Also, try
setting P3P policy header http://www.sitepoint.com/print/p3p-cookies-ie6/
--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/ |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over network members.
|