Re: [PHP-DEV] Sessions, session_register()
On Tue, 17 Dec 2002, John Coggeshall wrote: Can someone enlighten me as to why session_register() and $_SESSION shouldn't be used togeather? It seems to me the session_register() function(s) should just be working with $_SESSION anyway... Are they doing something different? Is this desired behavior if it is doing something different? Where did you find that recommendation? - Sascha -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Sessions, session_register()
Where did you find that recommendation? http://www.php.net/manual/en/function.session-register.php Read the note :) I thought it was kind of strange myself... If this is changed in 4.3 I will update the docs to reflect this, but I wanted to see what everyone had to say about it first. John -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Sessions, session_register()
- Original Message - From: Sascha Schumann [EMAIL PROTECTED] To: Andrey Hristov [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 11:02 AM Subject: Re: [PHP-DEV] Sessions, session_register() Isn't that an error that 4.2.3 throws when session_register() is used as well as registering directly in $_SESSION? I haven't worked with 4.2.3 in a long time, but at least I don't remember any bug reports about it. Sorry, it's in 4.3.0 . I thought about this : php_error(E_WARNING, Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn.); Andrey -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Sessions, session_register()
php_error(E_WARNING, Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn.); I saw this when I was digging through the source -- but that doesn't really answer my question... Which is the side effect of which? Are users supposed to use $_SESSION, or the functions? Or should both be able to be used interchangeably? John Andrey -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Sessions, session_register()
Isn't that an error that 4.2.3 throws when session_register() is used as well as registering directly in $_SESSION? So the message is not easily comprehensible, I suppose. There is no problem when you have register_globals enabled and you mix session_register and use of $_SESSION. The problem stems from the fact that some users have been (ab)using session_register when register_globals is off. session_register is only supposed to be used for the register_globals=on case. This was possible due to a defect in the module which has been addressed. The warning is displayed, if the module notices that someone is (ab)using the old side-effect. - Sascha -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Sessions, session_register()
The problem stems from the fact that some users have been (ab)using session_register when register_globals is off. session_register is only supposed to be used for the register_globals=on case. Those functions need to be updated in the manual then to reflect this change. If I say PHP = 4.3.0 only allows session_register(), session_is_registered(), and session_unregister() if register_globals is enabled will that suffice? John -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php