Jump to content

Recommended Posts

Posted

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.

 

How do I fix this?

Posted
How do I fix this?

 

You can't change php.ini, it's the global configuration for server wide PHP. If you could change that it would change everyones PHP settings I think.

 

Fist of I must warn you that register globals is dangerous in terms of security. In PHP5 it is off by default. I would recommend changing software to run without register globals if possible. In future versions of PHP it will no longer exist, there won't even be an option for it.

 

Having said that if you really need it the following may work:

 

Add the following to your .htaccess file for the folders the code you need register_global for is in.

If there are .htaccess files in sub directories then add this line to them to, if there are no .htaccess files in the sub directories you don't need to create them.

 

php_flag register_globals on

It may not be permitted due to "security restrictions".

If you get a 500 server error message it means Apache had a problem with the file, or security settings won't let you do it.

 

I should reitterate, register_globals can be unsafe, if you are writing your own PHP write your code to use $_POST or $_GET superglobal arrays. If it's someone elses code there is not much you can do. But it will break if and when it is run on PHP6.

 

Posted

The above fix should work. I just have a question... what software are you using that needs requires register_globals? Is it an old version of Mambo by any chance?

Posted

Umm... I'm using Ecommerce I think... or Zen Cart...

 

EDIT: I have a problem... it doesn't seem to work at all... I dunno where the access file is... unfortunately I'm pretty clueless....

 

EDIT: They were both OScommerce and Cubecart. I now use Zencart and it works...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...