"André Nęss" <andrena.spamreallysucks@ifi.uio.no> wrote in message
news:bnf89a$48b$1@maud.ifi.uio.no...[color=blue]
> gf:
>[color=green]
> > I had a client recently contact me with a script that wasn't working. I
> > quickly isolated the problem as to the fact that the $_GET array was not
> > being made available to all scripts, even though register_globals was[/color][/color]
set[color=blue][color=green]
> > to
> > ON. The client then notified his host who seemed to know exactly the
> > issue and we added these lines to the top of the script (this script is
> > included in all other scripts) and it solved the problems:
> >
> > /* mp.net patch */
> > foreach($_GET as $var => $value) $$var = $value;
> > foreach($_POST as $var => $value) $$var = $value;
> > foreach($_COOKIE as $var => $value) $$var = $value;
> > foreach($_SERVER as $var => $value) $$var = $value;
> > ob_start();
> > /* end of patch */[/color]
>
> // A simpler solution:
> extract($_REQUEST);
> extract($_SESSION);
>[color=green]
> > The host added these comments to my client:
> > "I can fix that for you, but in a couple of months, PHP5 will be out for
> > real, so you might as well want to fix it in your code."
> >
> > Is this a work-around for right now or is there some kind of rework that
> > all scripts will have to be modified for version 5?[/color]
>
> register_globals is considered a bad thing, so you should really strive to
> move away from it.
>
> André Nęss[/color]
That's not the point, though, although I understand. This is not my
application and the application requires it.
Can anyone address my original question?
Gaylen
Raven Web Hosting
http://ravenwebhosting.com
PHP KISGB PHP Guest Book for Standard and phpNuke sites
http://www.ravenphpscripts.com
PHP KISSQ PHP Stock Quote for Standard and phpNuke sites
http://www.ravenphpscripts.com