NYCPHP Meetup

NYPHP.org

[nycphp-talk] $_SESSION, session_unset(), unset($_SESSION['var']), register_globals and the PHP Manual

Phillip Powell phillip.powell at adnet-sys.com
Fri Jul 23 14:45:51 EDT 2004


Henry Ponce wrote:

>Phil:
>
>I've never had a problem using unset() to remove a $_SESSION variable, when 
>register_globals is on or off.
>
>Henry
>_______________________________________________
>talk mailing list
>talk at lists.nyphp.org
>http://lists.nyphp.org/mailman/listinfo/talk
>
>  
>
Did this include PHP 4.3.6 as well?

I was told that you cannot change the value of an autoglobal in a 
function or method with register_globals on and expect to retain that 
change upon exit, you'd have to globalize the autoglobal before you exit.

unset($_SESSION);
if ((int)ini_get('register_globals')) === 1) global $_SESSION;

Phil

-- 
---------------------------------------------------------------------------------
Phil Powell
Multimedia Programmer
BPX Technologies, Inc.
#: (703) 709-7218 x107 
Fax: (703) 709-7219

	




More information about the talk mailing list