RE: [PHP] The so-called improvment in PHP 4.2.0

From: Date: Mon, 22 Apr 2002 20:16:55 +0000
Subject: RE: [PHP] The so-called improvment in PHP 4.2.0
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-94069@lists.php.net to get a copy of this message
Also see extract() and import_request_variables() Although, an upgrade to PHP 4.2.0 is not going to automatically disable register_globals. Upgrading PHP does not overwrite the existing php.ini file, so unless you ISP specifically changes this php.ini setting, nothing will change. -Rasmus On Mon, 22 Apr 2002, Alok K. Dhir wrote: > Change your scripts. It's relatively easy to cause variables in the > superglobal arrays to be set in the global namespace. Code samples for > this appear in various places in the the user contributed notes in the > PHP documentation. > > A quick and dirty working example: > > foreach (array_merge($_POST,$_GET) as $key=>$val) { > global $$key; > $$key=$val; > } > > If you include the above at the top of all your existing scripts, they > should continue to function. > > As always, caveat emptor... > > Alok > > > -----Original Message----- > > From: > > php-general-return-94064-adhir=govshops.com@lists.php.net > > [mailto:php-general-return-94064-adhir=govshops.com@lists.php. > > net] On Behalf Of Leif K-Brooks > > Sent: Monday, April 22, 2002 5:11 PM > > To: php-general@lists.php.net > > Subject: [PHP] The so-called improvment in PHP 4.2.0 > > > > > > I use $formvar for form processing, I don't use the arrays. > > This is how I was taught to do it. If my host upgrades to > > 4.2.0, my website is as good as gone! What am I supposed to do?! > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#94069) next »