RE: [PHP] register_globals

From: Date: Fri, 11 Apr 2003 18:20:16 +0000
Subject: RE: [PHP] register_globals
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-143554@lists.php.net to get a copy of this message
ahh ok... darn, I was hoping there was a way. I'll try some code like you suggested. Thanks. -Dan Joseph -----Original Message----- From: luis [mailto:luis@fuegolabs.com] Sent: Friday, April 11, 2003 2:15 PM To: 'Dan Joseph'; php-general@lists.php.net Subject: RE: [PHP] register_globals register_globals "0" PHP_INI_PERDIR|PHP_INI_SYSTEM Meaning: PHP_INI_PERDIR 2 Entry can be set in php.ini, .htaccess or httpd.conf PHP_INI_SYSTEM 4 Entry can be set in php.ini or httpd.conf So the answer is not. Globals are created before your PHP script is executed so there's no way in the script to change what was already done. You can try something like this in your scripts: foreach(array_keys($_REQUEST) as $reqvar) { if(isset($$reqvar)) unset($$reqvar); } -----Original Message----- From: Dan Joseph [mailto:djoseph@duhq.us] Sent: Friday, April 11, 2003 3:02 PM To: php-general@lists.php.net Subject: [PHP] register_globals Hi All, Is there a way to override the register_globals in the ini file and set it to off in my php scripts? I'm currently on a server that has it on and it needs to be on not to break a few other sites, but I'd like to secure a new one... -Dan Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#143554) next »