Register long arrays

From DreamHost
Jump to: navigation, search

Overview

In DreamHost's installation of PHP 5.3, the register_long_arrays directive is not enabled. As a result, scripts that make use of the following array variables will not work as expected:

  • $HTTP_COOKIE_VARS
  • $HTTP_ENV_VARS
  • $HTTP_GET_VARS
  • $HTTP_POST_VARS
  • $HTTP_SERVER_VARS
  • $HTTP_SESSION_VARS
  • $HTTP_POST_FILES
Note2 icon.png Note: Register long arrays is deprecated as of PHP5.3 and removed as of PHP 5.4. For more information, please visit the following page:


In PHP 6, neither the register_long_arrays directive nor the old $HTTP_*_VARS array variables will exist at all, so any script which still uses the old variables must be updated.

The following table lists alternative variables:

long_array name alternative
$HTTP_COOKIE_VARS $_COOKIE
$HTTP_ENV_VARS $_ENV
$HTTP_GET_VARS $_GET
$HTTP_POST_VARS $_POST
$HTTP_SERVER_VARS $_SERVER
$HTTP_SESSION_VARS $_SESSION
$HTTP_POST_FILES $_FILES

See also