[thelist] php sessions

Sven Göttner lists at goettner.de
Tue Oct 15 16:44:01 CDT 2002


<tip type="php sessions">

>From PHP 4.2.2 upwards, register_globals (an php.ini value) is OFF by default.
That way, you can safely manipulate the array $HTTP_SESSION_VARS manually.

You also don't do HAVE to use session_is_registered()
and all these functions but can directly check:

<code>
if (!isset($HTTP_SESSION_VARS['username'])) {
	do_something();
}
</code>

This would equal

<code>
if (!session_is_registered('username')) {
	do_something();
}
</code>

BUT:
Read carefully about the various possibilities
regarding your development (and your production server's) PHP-Setup,
since not only register_globals, but also track_vars and some other
directives mingle with the session handling:
http://www.php.net/manual/en/ref.session.php
</tip>



More information about the thelist mailing list