Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Broadsword

Recommended Posts

Hi - i hope someone can give me some advice please!

 

My website which runs OSCommerce has been working fine for nearly a year. But then a week ago i was unable to gain access to my Admin area and instead got the error message -

 

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

 

Nothing on my site has changed so i do not know what the problem is. The php.ini file within my root directory has the text -

 

register_globals = On

 

So that's confused me as well! Is there another php.ini file i need to change?

 

Any assistance would be grateful. And also any explanation as to why this has happened all of a sudden after previously having no trouble.

 

Cheers.

Link to comment
Share on other sites

the watch this is kinda confusing since you already have a php.ini file in your root directory.

so just the .htaccess and the register globals patch are available options.

 

Your host probably does not use your php.ini file as it is in your root directory.

easiest way is the .htaccess but the patch does give you increased security

Link to comment
Share on other sites

the watch this is kinda confusing since you already have a php.ini file in your root directory.

so just the .htaccess and the register globals patch are available options.

 

Your host probably does not use your php.ini file as it is in your root directory.

easiest way is the .htaccess but the patch does give you increased security

 

I agree with you Jonathan but the caption says create a new file and it is only a guide for people who are not sure how to create a php.ini file - but if you feel it really is that confusing then i will change it

Regards

 

Mark A Reynolds

Link to comment
Share on other sites

the guide itself is not confusing, Broadsword has just completed that guide and still has the error.

see this quote:

The php.ini file within my root directory has the text -

 

register_globals = On

 

So that's confused me as well! Is there another php.ini file i need to change?

Link to comment
Share on other sites

Or watch this

 

But the register_globals patch is the way to go really - it looks like your host has disabled register_globals

 

Thank you SO MUCH! I was having trouble with my site after a transfer and your answer fixed it. Thank you thank you thank you thank you!!!!!!!!!!!!!

 

Kathy

Link to comment
Share on other sites

Thank you SO MUCH! I was having trouble with my site after a transfer and your answer fixed it. Thank you thank you thank you thank you!!!!!!!!!!!!!

 

Kathy

 

Thanks Kathy

 

Did you find it easy to follow?

Regards

 

Mark A Reynolds

Link to comment
Share on other sites

Thanks Kathy

 

Did you find it easy to follow?

 

YES! After reading so much "crap" about the php.ini file and trying other things, nothing worked. The little video took 30 seconds to watch, another 30 seconds to do it, and voila! Problem fixed! And this was after having my host's techs working on the issue for four days! Geez!

 

Thanks again for the easy to follow information.

 

Kathy

Link to comment
Share on other sites

YES! After reading so much "crap" about the php.ini file and trying other things, nothing worked. The little video took 30 seconds to watch, another 30 seconds to do it, and voila! Problem fixed! And this was after having my host's techs working on the issue for four days! Geez!

 

Thanks again for the easy to follow information.

 

Kathy

 

Your very welcome -

Regards

 

Mark A Reynolds

Link to comment
Share on other sites

two options, either aply the register globals patch (contribution)

or add a line in your .htaccess file that says:

php_flag register_globals on

 

Hi, thanks for all the replies. Appreciated.

 

Before i look for the contribution i would like to try the .htaccess method.

 

My .htaccess file (found at www.mysite.co.uk/admin/.htaccess contains the following text -

 

 

AuthType Basic AuthName "OS Commerce Administration"

AuthUserFile "/home/jasonw/.htpasswds/store/admin/passwd" require valid-user

 

Sorry to appear dim but where do i put the php_flag register_globals on text?

 

Thanks

Link to comment
Share on other sites

Hi, thanks for all the replies. Appreciated.

 

Before i look for the contribution i would like to try the .htaccess method.

 

My .htaccess file (found at www.mysite.co.uk/admin/.htaccess contains the following text -

AuthType Basic AuthName "OS Commerce Administration"

AuthUserFile "/home/jasonw/.htpasswds/store/admin/passwd" require valid-user

 

Sorry to appear dim but where do i put the php_flag register_globals on text?

 

Thanks

 

down the bottom you should have a module for register gloabls starts with #

 

I can't look at the moment as i am uploading a new site but remove the # at the beginning

Regards

 

Mark A Reynolds

Link to comment
Share on other sites

and if you do not have that part you can add that for example at the bottom

 

Sorry - but you've completely lost me!!

 

All i want to know is where to insert the

 

php_flag register_globals on

 

text in my .htaccess file?

 

I've had a look at the readme file for the contribution and i just can't believe how much aggrevation this has caused! If the .htaccess file trick doesn't work i think i'll have a word with my host again.

 

Cheers again.

Link to comment
Share on other sites

Sorry - but you've completely lost me!!

 

All i want to know is where to insert the

 

php_flag register_globals on

 

text in my .htaccess file?

 

I've had a look at the readme file for the contribution and i just can't believe how much aggrevation this has caused! If the .htaccess file trick doesn't work i think i'll have a word with my host again.

 

Cheers again.

 

Add this to the biottom of your .htaccess file found in your root folder (make sure you leave a blank line at the bottom

 

<IfModule mod_php4.c>

php_value session.use_trans_sid 0

php_value register_globals 1

</IfModule>

Regards

 

Mark A Reynolds

Link to comment
Share on other sites

Add this to the biottom of your .htaccess file found in your root folder (make sure you leave a blank line at the bottom

 

<IfModule mod_php4.c>

php_value session.use_trans_sid 0

php_value register_globals 1

</IfModule>

 

Thanks. But unfortunately i am still getting the original error message.

 

Is there anyhing else i should be doing in addition to adding text to that .htaccess file?

Link to comment
Share on other sites

Thanks. But unfortunately i am still getting the original error message.

 

Is there anyhing else i should be doing in addition to adding text to that .htaccess file?

 

what htaccess file are you putting the text in? admin or root folder?

Regards

 

Mark A Reynolds

Link to comment
Share on other sites

Thanks all for your replies and help.

 

Just thought i'd let you know all's ok now.

 

Couldn't get it to work with the suggestions here - and just reading through the instructions for the contribution gave me a headache! So i went back to my host one more time - and they solved it.

 

 

Cheers again.

Link to comment
Share on other sites

  • 4 months later...

hi, everyone, i have tried the way you talked above, but it's doesn't work.

 

when i check my phpinfo.php, it says the php.ini file is located in /etc/php.ini. i don't have this directory in my site. how can i find this path??

 

thank you very much

 

william

Link to comment
Share on other sites

That's referring to the location on the server, which you don't have access to if you are on a shared server. You need to add your own php.ini file to your site.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

That's referring to the location on the server, which you don't have access to if you are on a shared server. You need to add your own php.ini file to your site.

 

Jack

 

thank you for your reply.

 

i have a VPS from 1and1 (like a dedicate server).

i have tried many times to put php.ini in my site (follow the things people did above), but it doesn't work.

the phpinfo.php show me the real php.ini is located in ../etc/php.ini, unfortunately i can't find it in my server.

 

that's why i chose to use this contribution.

 

do u have any idea about this? appreciate!!!!!!

 

regards

william

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...