Session in Windows 2000
| From: | Danilo Meles | Date: | Fri, 17 Aug 2012 01:19:20 +0000 |
| Subject: | Session in Windows 2000 | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-1845@lists.php.net to get a copy of this message | ||
Hi Folk's
I'm having some problems using session on PHP.
PHP is installed under Windows 2000 IIS (INtenet Information server)
I Create a session using the code above:
session_start();
session_name("teste");
$session_login = "$login";
session_register("session_login");
And the session is saved in the correct folder I put in php.ini.
The problem is at the time the user click to logoff this application, I've
used:
session_start("teste");
if ( !session_destroy("teste") ) {
echo "User conected!!!";
}
else {
echo "User not conected $temp !!!";
}
When it ocurrs , user will not be able to access any template on the site
because the session must exist. Something like this:
session_start("teste");
if (session_is_registered("session_login")) {
echo "Clique para desconectar: ";
echo "<a href=\"desconectar.php\">Desconectar</a>";
}
else {
header("Location: index.php");
}
The problem is when the session is destroyed , nothing happens. The session
was not destroyed. But if we run the same application on linux it works
very good !!!
Could you help me, please???
Thank you a lot!!
Danilo Meles