Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

FATAL ERROR: register_globals is disabled in php.i


pjbailey

Recommended Posts

I get this error

 

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

When going to setup the software

So after some searching on the net I found you have to enable this on the server so I asked the provider to do this and here is their reply

 

"Following a security upgrade, a change has been made to our PHP configuration to switch register_globals OFF. To get around this, you simply need to copy the following code into the top of your script.

 

 

--------------------------------------------------------------------------------

--------------

 

$post_keys = array_keys($_POST);

for($i = 0; $i < sizeof($post_keys); $i++) {

$var = $post_keys[$i];

$$var = $_POST[$post_keys[$i]];

}

$get_keys = array_keys($_GET);

for($i = 0; $i < sizeof($get_keys); $i++) {

$var = $get_keys[$i];

$$var = $_GET[$get_keys[$i]];

}

$server_keys = array_keys($_SERVER);

for($i = 0; $i < sizeof($server_keys); $i++) {

$var = $server_keys[$i];

$$var = $_SERVER[$server_keys[$i]];

} "

 

But I have no idea where to paste this or even how you edit it, is it doe in notepad, how you save it etc??

 

Any help would be helpful

 

Peter

Link to comment
Share on other sites

I think your hosting company is referring to a simple one-page php script. I'm not sure that would work with osCommerce, and even more unsure as to where it would go. There is a workaround available now from the Contributions section, and I would suggest you hunt around to find and install this solution. Either that or find a new hosting company.

 

Vger

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...