Re: More on segfaulting sessions
| From: | (Richard Lynch) | Date: | Thu, 22 Jun 2000 04:31:18 +0000 |
| Subject: | Re: More on segfaulting sessions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-2585@lists.php.net to get a copy of this message | ||
In article <B571B448.B96%miguel@firmseek.com>, miguel@firmseek.com (Miguel
Cruz) wrote:
> Here's some code that seems to generate a segfault every time (well,
> beginning with the second time it's run, once the sess_ file has been
> created):
>
> <?
>
> function crash()
> {
> global $x, $HTTP_SESSION_VARS;
> session_start();
> session_register('x');
> $x++;
> }
>
> crash();
> print "value is $x";
>
> ?>
>
> I distilled it down from a 1000-line PHP file by removing parts until I had
> the shortest program that still killed httpd.
I *THINK* $HTTP_SESSION_VARS is already a global by nature, and by
declaring it global, you are then accessing some other $HTTP_SESSION_VARS
(an empty one) and possibly confusing PHP4 irreparably when it tries to
access it.
Does that make sense?
Well, try it without the HTTP_SESSION_VARS in the global statement anyway.
It shouldn't crash, so it's still a bug, but you may be able to get on
with your life while we fix it :-)
THANKS!!!
--
Richard Lynch | If this was worth $$$ to you, buy a CD
US Customer Support Director | from one of the artists listed here:
Zend Technologies USA | http://www.L-I-E.com/artists.htm
http://www.zend.com | (this has nothing to do with Zend,
duh!)