Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

php.ini


xavier77

Recommended Posts

Posted

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

Posted

i know that i must do this : register_globals = On

but i cant

the php.ini is in the server of my hosting provider

what can i do?

Posted

ask your host to enable this for you, or change hosts.

Posted

// 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.

Archived

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

×
×
  • Create New...