Enable register_globals in PHP 5.4

I am working on a framework that uses register_globals. My local php version is 5.4. I know register_globals is DEPRECATED since PHP 5.3.0 and REMOVED in PHP 5.4. But i have to make it work on PHP 5.4, Is there any way? Any help and suggestions will be highly appreciable. Thanks.

Answer:

You can emulate register_globals by using extract in global scope:
extract($_REQUEST);
Or put it to independent function using global and variable variables
function globaling()
    {
    foreach ($_REQUEST as $key => $val)
        {
        global ${$key};
        ${$key} = $val;
        }
    }
P.S. i think that your have released application and do not want to change anything in it.
You can create globals.php file with
Then add auto_prepend_file directive to .htaccess
php_value auto_prepend_file ./globals.php
After this globals will be prepend to every call

Answer:
From the PHP manual, it says that:
This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
However, a Google search revealed this method on Ubuntu Forums:
Nope, it's finally gone for good. Whatever site is still using globals had, what, half-a-dozen years or more now to fix the code?
The quickest solution is to create the globals from scratch by running this code at the beginning of the app:
Code:
foreach ($_REQUEST as $key=>$val) {
    ${$key}=$val;
}
You have to be careful that any variable created this way isn't already defined in the remainder of the script.
You can force this code to be run ahead of every page on the site by using the auto_prepend_file directive in an .htaccess file.
I'd strongly recommend looking at the code that requires register_globals and changing it so that it works properly with it being disabled.