Re: Session Variables Problem (Missing)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To be sure that there is no coding error, just try this simple code:
'============ Begin ==============
<?
session_start();
if (isset($_SESSION["test"])){
 echo $_SESSION["test"];
}
else {
 echo "new session";
 $_SESSION["test"]="session variable saved";
}
?>
'============== End ==============
I have got no problem about the session variables on my W2K system with both
IIS and Apache installed.

By the way, since the php.ini is the same both for IIS and Apache, both
servers share the same session (and the session variables).

"Brad Lawryk" <webmaster@wltimberwolves.com> schrieb im Newsbeitrag
20040109224429.80774.qmail@pb1.pair.com">news:20040109224429.80774.qmail@pb1.pair.com...
> I am new to PHP moving over from ASP and one of things I relied on heavily
> was session variables. It seems that everytime a new page is opened it
> starts a new session.
>
> I have set up a simple test site you can see whats happening - easier than
> to explain.
>
> http://www.cflsquad.com/index.php
>
> Use
> Username: testuser
> Password: testpassword
>
> the next page after log in should read "You are logged in as: testuser".
> What tells me is that the session variable is resetting to a new on each
> page is that the 'testuder' text doesn't show becuase the session var is
> being read. These exact same pages work fine oon a Linux server so I know
> its a Windows Server issue. The odd thing is that the session ID is passed
> and saved but the session variable that is created on log in is not
passed.
> Again, it woks just fine on a Linux server - just not Windows.
>
> I have changed the path in the php.ini file as many have suggested fixes
the
> problem but it hasn't made a difference for me.
>
> Thanks
>
> --
> Brad Lawryk
> Williams Lake TimberWolves
> www.wltimberwolves.com
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux