How do I fix the PHP5 issue with long predefined array variables ($HTTP_*_VARS)?
Posted by Support, Last modified by Support on 30 October 2008 01:09 PM
The use of long predefined array variables ($HTTP_*_VARS) which was part of PHP4, are disabled in PHP 5. If you are running code that is ment for PHP4 or you have code that uses these and are having issues with form posting or form get, then use the code below to fix this issue.

// Emulate PHP4 Variables
if( !isset( $HTTP_SERVER_VARS ) )
{
$HTTP_SERVER_VARS = $_SERVER;
}
if( !isset( $HTTP_GET_VARS ) )
{
$HTTP_GET_VARS = $_GET;
}
if( !isset( $HTTP_POST_VARS ) )
{
$HTTP_POST_VARS = $_POST;
}
if( !isset( $HTTP_POST_FILES ) )
{
$HTTP_POST_FILES = $_FILES;
}
(591 vote(s))
Helpful
Not helpful

Comments (0)