Jump to content

Recommended Posts

Posted

hi

I have a problem in my hosting

on my page I get an error

 

"Server Requirement Error: register_globals is disabled in your PHP configuration. This Can Be enabled in your php.ini configuration file or in the. Htaccess file in your catalog directory."

 

and an error happens in the installer Oscommerce

 

"FATAL ERROR: register_globals is disabled in php.ini, please enable it!"

 

my page www.steincrivel.heliohost.org

Posted

This support request is being escalated to our root admin. Does Stevie allow them to enable register_globals via .htaccess?

Posted

We have register_globals off for security reasons and we can't use php_value. Our PHP is setup under suPHP - it isn't compiled under a DSO. In other words, the php_value directive does not exist under our Apache.

Posted

Append the following to your PHP script:

 

/**
* function to emulate the register_globals setting in PHP
* for all of those diehard fans of possibly harmful PHP settings :-)
* @author Ruquay K Calloway
* @param string $order order in which to register the globals, e.g. 'egpcs' for default
*/
function register_globals($order = 'egpcs')
{
    // define a subroutine
    if(!function_exists('register_global_array'))
    {
        function register_global_array(array $superglobal)
        {
            foreach($superglobal as $varname => $value)
            {
                global $$varname;
                $$varname = $value;
            }
        }
    }
    
    $order = explode("\r\n", trim(chunk_split($order, 1)));
    foreach($order as $k)
    {
        switch(strtolower($k))
        {
            case 'e':    register_global_array($_ENV);        break;
            case 'g':    register_global_array($_GET);        break;
            case 'p':    register_global_array($_POST);        break;
            case 'c':    register_global_array($_COOKIE);    break;
            case 's':    register_global_array($_SERVER);    break;
        }
    }
}

register_globals();

Guest
This topic is now closed to further replies.
×
×
  • Create New...