[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-developers] caution about php 4.2
- Subject: Re: [cobalt-developers] caution about php 4.2
- From: "Steve Werby" <steve-lists@xxxxxxxxxxxx>
- Date: Wed May 1 23:37:49 2002
- List-id: Discussion Forum for developers on Sun Cobalt Networks products <cobalt-developers.list.cobalt.com>
"Matthew Nuzum" <cobalt@xxxxxxxxxxxxx> wrote:
> Be careful about rushing into php 4.2. It does not have "register
> globals" on by default. Many (many many many) scripts out there rely on
> this setting, even though it is sloppy and unsafe.
>
> If you're scripts use the variable: $firstname to access the contents
> from a form, you will need to change it to one of these new (since 4.1)
> "Superglobal" variables: $_REQUEST["firstname"], $_GET["firstname"] or
> $_POST["firstname"]
>
> If the customers hosted on your Raq servers aren't expecting an upgrade,
> you may get lots of support calls if you don't give them plenty of
> advance notice.
Of course, you can just set register_globals = On in php.ini and restart
Apache. IMO PHP's move to set register_globals to Off by default is a good
idea b/c it encourages better code, but the implications are pretty minor if
you have root access to the box and can make a 1 line change to php.ini.
I'm not trying to slight your warning Matt, just letting others know a
workaround since you didn't come out and say how to revert PHP to the old
behavior.
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/