Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with unset

Status
Not open for further replies.

cgillin

Programmer
Joined
Mar 20, 2003
Messages
58
Location
US
At home I have a Linux machine running PHP v4.2.2 and have the following code which works correctly..

unset($_SESSION['name']);

However, when I put my files up on a webserver running PHP v4.0.2 it doesn't work. I also tried...

unset($HTTP_SESSION_VARS['name']);

which didn't work either. Does anyone know of a bug with PHP v4.0.2 as far as using unset to remove session variables or any other reason this might not work?

Thanks
 
Unfortunately using session_unregister() did not work either
 
Be aware of the context. $HTTP_SESSION_VARS is not a global variable. If you try to unset it from within a function you have to specify that it's global.

Best would be for the server admin to upgrade. 4.0.2 is ancient.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top