Re: REVIEW: Imminent session patch
| From: | Ilia A. | Date: | Wed, 02 Oct 2002 18:48:01 +0000 |
| Subject: | Re: REVIEW: Imminent session patch | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-88874@lists.php.net to get a copy of this message | ||
On October 2, 2002 05:13 am, Sascha Schumann wrote:
> Could some kind soul with a thorough understanding of the
> engine details please review the attached patch?
>
> Changes:
>
> - Fix two simple memory leaks.
> - Fix a bug which did not initialize $_SESSION, if
> is_array($HTTP_SESSION_VARS) was true.
>
> - Sascha
The patch does solve the problems it sets out to fix, most important of which
in my opinion is the memory leak. There is however another problem, which I
believe should be addressed. The problem being that session_register()
function does not work unless the user has register_globals enabled.
This particular problem causes problems for anyone using php software that was
written before this limitation was added. In fact the sessions tests inside
ext/session/tests fail for that very reason.
To this affect, I have made a few modifications to the patch written by Sascha
that address this problem. After the patch is applied, register_session()
works regardless of whether or not register_globals are enabled or disabled.
Ilia
Attachment: [text/x-diff] session.c.patch
Attachment: [text/x-diff] session.c.patch