Bingo!

What is happening is I have PHP code that will eventually be pulled from
a database, and some of them need to import the global scope (although I
have changed this for security reasons).  Only way to do this (easily)
when eval'ing code is with extract($GLOBALS) or know which variables I
want and pull them in one at a time.  Well for prototyping the code is
included in the file instead of being pulled from the DB.

Here is the minimum script that will crash for me.  Funny this used to
work, I tried it as an experiment and when it worked I proceeded as if
it would always work.

<?php

extract($GLOBALS);

?>

Guess extract() doesn't like the recursion of $GLOBALS??

-Chris

-----Original Message-----
From: Derick Rethans [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, November 21, 2001 12:30 AM
To: Chris Newbill
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DEV] strange crash

On Wed, 21 Nov 2001, Chris Newbill wrote:

> ---------------------------------------
> array.c(1263) : Block 0x08217420 status:
> Beginning:      OK (allocated on array.c:1218, 9 bytes)
>       End:      Overflown (magic=0x2A8FCC01 instead of 0x2A8FCC84)
>                 1 byte(s) overflown
> ---------------------------------------
> array.c(1218) :  Freeing 0x08217444 (9 bytes),
> script=/www/erain/st2/commercesys/html/discount_detail.php
>
> Ideas?  This happens with today's CVS and 4.1.0RC3.
>
> I haven't broken the script down to something small enough to
> reproduce..yet.

My guess is that it has something to do with the extract() function.

regards,

Derick Rethans

---------------------------------------------------------------------
        PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
             SRM: Site Resource Manager - www.vl-srm.net
---------------------------------------------------------------------


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to