[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-developers] caution about php 4.2
- Subject: [cobalt-developers] caution about php 4.2
- From: "Matthew Nuzum" <cobalt@xxxxxxxxxxxxx>
- Date: Wed May 1 10:26:44 2002
- Organization: Bearfruit.org
- List-id: Discussion Forum for developers on Sun Cobalt Networks products <cobalt-developers.list.cobalt.com>
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.
On a side note, the free Phakt PHP 4 extension for Dreamweaver relies
upon register globals. Dreamweaver is one of the most popular
development tools around, so if you or your customers use this to write
PHP code, you'll need to keep your "register globals".
Another side note: the $_ variables are global by default, so if you
only develop for 4.1 and higher, you will see some great benefits to
using these new variables instead of the "registered global" variables.
For more info, cf: http://www.php.net/manual/en/reserved.variables.php
And for Phakt: http://www.interakt.ro/phakt/
Matthew Nuzum
www.bearfruit.org
cobalt@xxxxxxxxxxxxx