Jump to content

Problem with php.ini


karath

Recommended Posts

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.

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...