Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

php.ini


xavier77

Recommended Posts

i got a error

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

 

this happend in the home of the site

any idea?

i install this local and work fine, but in the server say that

Link to comment
Share on other sites

// Compatibility patch to be able to leave Register_globals = off

// &&

// XSS fixes

if (function_exists ("import_request_variables") &&

False == ini_get('register_globals')) {

import_request_variables ("CGP",""); // php >=4.1

$HTTP_GET_VARS = $_GET;

$HTTP_POST_VARS = $_POST;

$HTTP_COOKIE_VARS = $_COOKIE;

$PHP_SELF = $_SERVER["PHP_SELF"];

$SERVER_NAME = $_SERVER["SERVER_NAME"];

$REMOTE_ADDR = $_SERVER["REMOTE_ADDR"];

$HTTP_X_FORWARDED_FOR = $_SERVER["HTTP_X_FORWARDED_FOR"];

$HTTP_VIA = $_SERVER["HTTP_VIA"];

foreach($_FILES as $k=>$v) {

$$k = $v['tmp_name'];

$k_name = $k . "_name";

$$k_name = $v['name'];

$k_size = $k . "_size";

$$k_size = $v['size'];

}

} else {

//http://de.php.net/manual/de/function.import-request-variables.php

//if you're stuck using a pre-4.10 version of php

extract($HTTP_GET_VARS, EXTR_PREFIX_ALL, "");

extract($HTTP_POST_VARS, EXTR_PREFIX_ALL, "");

}

 

this code is from (phpshop) http://www.phpshop.org

not sure if this will work with oscommerce but it's worth a try.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...