Setcookie problems... - PHP
This is a discussion on Setcookie problems... - PHP ; Please help...
When we are setting a cookie in a PHP page, that cookie cannot be accessed
by any page in a different folder. When we move the pages into the same
folder, the cookies worked fine. Can anyone shed ...
-
Setcookie problems...
Please help...
When we are setting a cookie in a PHP page, that cookie cannot be accessed
by any page in a different folder. When we move the pages into the same
folder, the cookies worked fine. Can anyone shed some light on this??
Here is how we are setting the cookie:
setcookie("cookiename", $value, time()+3600);
Also, you are supposed to be able to leave the time out and the cookie will
expire on session close, but when we leave the time out, no cookie is set.
Any help here either?
Chris
-
Re: [PHP] Setcookie problems...
On Wednesday, April 24, 2002, at 03:27 PM, Pusta wrote:
> When we are setting a cookie in a PHP page, that cookie cannot be
> accessed
> by any page in a different folder. When we move the pages into the same
> folder, the cookies worked fine. Can anyone shed some light on this??
Is the different directory pointed to by a different virtual host? I
could be completely mistaken, but don't cookies only work on a
per-domain name basis?
If that's not it, I don't know what else it could be.
Erik
----
Erik Price
Web Developer Temp
Media Lab, H.H. Brown
pricee@hhbrown.com
-
RE: [PHP] Setcookie problems...
From the manual (and with honor):
int setcookie ( string name [, string value [, int expire [, string path
[, string domain [, int secure]]]]])
so <?
setcookie ("TestCookie", $value,time()+3600, "/~rasmus/",
".utoronto.ca", 1);
?>
limits the cookie to work on only one specified folder
see for more: www.php.net/setcookie
Sincerely,
Maxim Maletsky
Founder, Chief Developer
www.PHPBeginner.com // where PHP Begins
> -----Original Message-----
> From: Erik Price [mailto
ricee@hhbrown.com]
> Sent: Wednesday, April 24, 2002 9:32 PM
> To: Pusta
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Setcookie problems...
>
>
> On Wednesday, April 24, 2002, at 03:27 PM, Pusta wrote:
>
> > When we are setting a cookie in a PHP page, that cookie cannot be
> > accessed
> > by any page in a different folder. When we move the pages into the
same
> > folder, the cookies worked fine. Can anyone shed some light on
this??
>
> Is the different directory pointed to by a different virtual host? I
> could be completely mistaken, but don't cookies only work on a
> per-domain name basis?
>
> If that's not it, I don't know what else it could be.
>
> Erik
>
>
>
>
> ----
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> pricee@hhbrown.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php