Jump to content

unset session bug (desirable possible fix for php 5.3)


Q695

Recommended Posts

When you do the following commands to unset a variable, it doesn't completely destroy the variable, but it doesn't use other session ids:

session_destroy();

unset($_SESSION['id']);

 

It also does this when you log in on at the log in page without logging out.

 

 

 

It took me about an hour to finally figure out that it didn't wipe the value completely.  What is the work around for this flaw, or hasn't it been built in yet?

Those two statements only have an effect if a session was started. Does your code have a session_start() prior to those lines of code and do you know for a fact (checked your web server error log file and/or have full error_reporting and display_errors turned on) that the session started without any header errors?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.