CartMetrix - Do you know yours?

« Apache Error: Client denied by server configuration | Home | Interesting Ecommerce Comparison »

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:

php_flag register_long_arrays on

More info:
http://www.php.net/manual/en/ini.core.php#ini.register-long-arrays

Popularity: 18%

Trackback:

Post History

2006-12-06 01:12
Updated link to register_globals

Related Posts

  • No related posts

Post your opinion

Verification Image

Please type the letters you see in the picture.

Subscribe without commenting


damonparker.org is proudly powered by WordPress
Entries (RSS) and Comments (RSS).

copyright © 2002-2008 damonparker.org. all rights reserved.

Close
E-mail It