1/9/2007
PHP Register_Globals and Register_Long_Arrays
After upgrading several servers to PHP5 a few older versions of popular applications started giving odd errors. Register_globals has been configured off by default for security reasons since early PHP4. Applications that rely on register_globals all had .htaccess files enabling it for the subdirectory only. The errors we were seeing were similar though, data didn’t appear to be passing through a form post.
With a little research inside the PHP5 php.ini file, I found a related parameter, register_long_arrays. This parameter turns on legacy support for the long PHP parameters $HTTP_POST_VARS, $HTTP_GET_VARS, etc. which have since been supplanted by $_POST, $_GET, etc.
Dropped the following into the .htaccess file and all is well:
More info:
http://www.php.net/manual/en/ini.core.php#ini.register-long-arrays
Popularity: 18%


