Strange, because I just set up the code exactly as posted below, under
Win2K and Apache 2.0, and it worked fine.

Cheers,
Pablo

-----Original Message-----
From: Golawala, Moiz M (IndSys, GE Interlogix)
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 23, 2003 1:11 PM
To: Daniel Guerrier; [EMAIL PROTECTED]
Subject: RE: [PHP] PHP not remembering sessions

It seems that there is a problem with the session management on
windows/apache. I was surfing the web to find an answer, and I noticed
that there are couple of other people who have the same problem. But
alas, there were no answers posted to this problem. So someone, please
help me if you know why this is happening.

Thanks
Moiz

-----Original Message-----
From: Daniel Guerrier [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 23, 2003 4:04 PM
To: Golawala, Moiz M (IndSys, GE Interlogix); [EMAIL PROTECTED]
Subject: Re: [PHP] PHP not remembering sessions


Use
$_SESSION['var']

instead of

$_SESSION["var"]
--- "Golawala, Moiz M (IndSys, GE Interlogix)"
<[EMAIL PROTECTED]> wrote:
> Hi All, 
> 
> I have a problem with PHP not remembering sessions.
> for example:
> 
> in page1.php:
> 
> <? session_start();
>     $_SESSION["var"] = "Please help"; ?>
>       <form action="sessionTest2.php" method=post>
>       <input type="text" name="loopCount" size="21",
> maxlength="20"></td> 
>       <input type="submit" value="Submit"></td>       
> 
> 
> in page2.php
> <? session_start();
>     echo $_SESSION["var"];
>     echo $_POST["loopCount"];
> ?>
> 
> what I see above is only data for loopCount. I am
> not able to see the "Please help" on page2
> 
> I noticed that 2 cookies were created one for each
> session start. When I opened one of the cookies, I
> noticed that the data "Please help" was in the
> session cookie. Somehow php thinks a session is not
> already created and starts a new session on
> page2.php.
> 
> my php.ini file has:
> register_globals = off
> session.use_cookies = 1
> session.use_only_cookies = 1
> session.auto_start = 0
> session.gc_maxlifetime = 1440
> 
> Please can someone help me. I am not sure what I am
> doing wrong? Maybe it is some configuration that is
> causing this issue. Any help appreciated.
> 
> Thanks,
> moiz
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to