akopacsi Posted November 23, 2011 Share Posted November 23, 2011 I just installed a web server on my Windows 7 computer. I installed httpd-2.2.21-win32-x86-no_ssl.msi php-5.2.17-Win32-VC6-x86.zip mysql-5.5.17-win32.msi I added (uncommented) some PHP extensions and I added PHP stuffs to httpd.conf, but other settings were not modified. I just noticed that PHP Sessions are started correctly by session_start(),but they are not destroyed by session_destroy(). I have to close the browser to destroy them. I've never had just problems with my previous Apache, PHP installations. Can you tell please, what to do? What to check? Thank you Link to comment Share on other sites More sharing options...
Ingolme Posted November 23, 2011 Share Posted November 23, 2011 I think you have to start the session with session_start() before calling session_destroy() Also, according to the manual:http://es.php.net/session_destroy session_destroy() destroys all of the data associated with the current session. It does not unset any of the global variables associated with the session, or unset the session cookie. To use the session variables again, session_start() has to be called.In order to kill the session altogether, like to log the user out, the session id must also be unset. If a cookie is used to propagate the session id (default behavior), then the session cookie must be deleted. setcookie() may be used for that. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.