Re: BUG: variables from the query string are not accessible in script
| From: | Wez Furlong | Date: | Thu, 11 Apr 2002 01:20:00 +0000 |
| Subject: | Re: BUG: variables from the query string are not accessible in script | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-82536@lists.php.net to get a copy of this message | ||
the php configuration directive register_globals defaults to off
in PHP 4.2; are you sure it's not just due to misconfiguration?
--Wez.
On 11/04/02, "Aaron Bannert" <<aaron@apache.org>> wrote:
> I've been fighting this all day and I'm curious if anyone else has
> been able to reproduce this problem. Essentially what happens is
> the normal variables are registered in a hash table at sapi startup,
> then while executing we try to fetch from the symbol table. At
> this point I'm seeing an "undefined variable" error, even though
> I saw the variable get registered only moments before. This leads
> me to believe one of the following: 1) it's using a different
> hash table, or 2) the original hash table and the one used in
> zend_fetch_var_address were not properly merged.
>
> I'm curious if anyone who is using a different sapi module is seeing
> this problem, or if it is isolated to the apache2filter. If not, does
> anyone have any idea what is missing/erroneous in the apache2filter
> that could cause this?
>
>
> To see this in action:
>
> compile apache 2.0.35
> checkout php4_2_0RC2
> (optionally apply my patch posted earlier to this list)
> compile php (--with-apxs2=/foo/bar/apxs)
> install php
>
> run httpd in a debugger: gdb bin/httpd
> (gdb) r -X
> ... wait until it serves normal requests
> hit Ctrl-C to be back to the prompt
> (gdb) b php_register_variable_ex
> (gdb) b zend_fetch_var_address
> (gdb) c
>
> then hit a php script, like so:
>
> curl -i 'ñO€ŠflÜO�÷]`‰Ú
> http://example.com/test.php?foo=777&floob=654'
>
> You'll be able to see the 'foo' and 'floob' variables being set in
> some
> hash table. Then later when you get to zend_fetch_var_address it'll fail
> to retrieve the same values it set earlier. I'm really hoping that
> someone experienced in Zend and the SAPI will spot the problem right
> away and point me in the right direction.
>
>
> -aaron
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php