Re: Re: Newbie scope revisited
| From: | Jason Wong | Date: | Sun, 16 Nov 2003 14:51:40 +0000 |
| Subject: | Re: Re: Newbie scope revisited | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-169830@lists.php.net to get a copy of this message | ||
On Friday 14 November 2003 05:36, Matthew Morvant wrote:
> > it. Still investigating I run phpinfo(), it turns out that
>
> register_globals
>
> > is set to ON (both places). However the server does not act this way. I
> > searched for an htaccess file, which I belive (not sure) can override
> > settings in the ini file. I could not find one.
You can do the following test to really confirm:
> To clarify "both" places are the Local value and the Master value. An
> example of code that doesn't work follows
>
> asume a user follows this link http://test/test.php?adduser=1
>
> <?php
>
> if( isset($adduser) ) /////// If I change to if(isset($_GET['adduser']))
> all works fine
> {
> // function properly
> }
> else
> {
> //crap out
> }
>
> ?>
Add in phpinfo() to the above code so that they both run on the same page. If
the local value for register_globals is still ON, and if(isset($adduser)) is
still false then you may have to report this as a bug (if you're using the
latest release version of PHP).
> So now I am stuck in
> > the same place I started. My client doesn't want to pay for me to
> > "scope" all of the variables in the application, but it doesn't appear to
> > work without the proper scoping. Any suggestions on further research
> > will be appreciated.
Well basically say to them "pay up or shut up", but you may want to couch it
in more diplomatic terms ;-)
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
A man does not look behind the door unless he has stood there himself.
-- Du Bois
*/