Re: Session not working
| From: | Sek-Mun Wong | Date: | Thu, 31 Jul 2003 00:28:17 +0000 |
| Subject: | Re: Session not working | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-20941@lists.php.net to get a copy of this message | ||
1) Verify that you've specified (and created) your sessiondata (usually
{drive:}/php/sessiondata directory,
2) check to see if a session id has been written there.
3) if not, make sure that the apache logon (usually localsystem) has access
to write to sessiondata (which it should have by default). Turn simple file
sharing off on XP if you have an issue.
"Voodoo" <voodoo36@terra.com.br> wrote in message
news:20030730031137.84128.qmail@pb1.pair.com...
> I'm using a local Apache 1.3 server on WinXP, and I've gotta test some php
> scripts at home, can't publish them. I'm trying to set some session vars,
> but the variables simply disappear when I try to use them again. Made the
> following code to test it, but when I click on 'increment' the 'numb' var
is
> set to 0 again.
>
>
> //code on test.php:
> <?php
> session_start();
> if (isset($_SESSION['numb'])) {
> $_SESSION['numb']++;
> } else {
> $_SESSION['numb'] = 0;
> }
> echo $_SESSION['numb']."<br>";
> ?>
> <a href="test.php">Increment</a>
>
> The strange thing is that when I publish this 'test.php' file on a web
> server it works just fine. I think there's something wrong with my local
> server configuration or at the php.ini file, but I can't figure out what
is
> it.
>
> Can somebody help me?
>
> Thanks,
>
> Voodoo
>
>