Post by huh » Tue Nov 25, 2008 4:17 pm

Error: register_globals is enabled!

hv searched around the forum..
but still dun understand how to solve this,,,

please help million thanks...

huh
Newbie

Posts

Joined
Tue Nov 25, 2008 11:51 am

Post by david.gilbert » Tue Nov 25, 2008 5:06 pm

try adding a .htaccess file with this as the very first line, otherwise PM me and I'll Try and help you out :)

Code: Select all

php_flag register_globals Off
-Dave

Professional Website Services - http://www.davidmgilbert.com/


User avatar
Active Member

Posts

Joined
Sun Jan 06, 2008 5:02 pm
Location - Mount Compass, South Australia

Post by hm2k » Tue Nov 25, 2008 5:14 pm

Your error is unrelated to the latest version of opencart, please upgrade.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by bruce » Tue Nov 25, 2008 5:18 pm

hm2k wrote: Your error is unrelated to the latest version of opencart, please upgrade.
what ??!

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by JNeuhoff » Tue Nov 25, 2008 5:46 pm

If your server runs the PHP scripts as CGI, try using a 'php.ini' file in your OpenCart main directory and in the 'admin' directory, with the following content:

register_globals = Off

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by hm2k » Tue Nov 25, 2008 7:03 pm

bruce wrote:
hm2k wrote: Your error is unrelated to the latest version of opencart, please upgrade.
what ??!
The most recently 0.x branch DOES NOT have any checks for "register_globals". It doesn't need them.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by bruce » Tue Nov 25, 2008 9:44 pm

Sorry, could not resist. Depending on the emphasis while reading... it looks quite funny

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by Qphoria » Tue Nov 25, 2008 10:00 pm

Are you kidding me? Please do not post if you have nothing helpful to say. I subscribe to these threads and was waiting for the original poster to reply.

http://i40.photobucket.com/albums/e244/ ... ileyLJ.gif[/img]

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by hm2k » Tue Nov 25, 2008 10:51 pm

I have no idea what is going on any more and I'm going to declare myself out of this thread. :)

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by Qphoria » Wed Nov 26, 2008 1:16 am

sorry I've hijacked the thread to trade a few jabs with bruce  :P

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by bruce » Wed Nov 26, 2008 6:52 am

:D Q, you are killing me... hahahaha

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by huh » Wed Nov 26, 2008 9:40 am

david.gilbert wrote: try adding a .htaccess file with this as the very first line, otherwise PM me and I'll Try and help you out :)

Code: Select all

php_flag register_globals Off
-Dave

you rock dave !!
its fine with the cart now =

thanks a lot everybody

huh
Newbie

Posts

Joined
Tue Nov 25, 2008 11:51 am

Post by Daniel » Thu Nov 27, 2008 12:38 am

Actually registered globals needs to be disabled to get opencart to work properly. Even with the code that has been added in the latest 0.0x. Globals can still cause opencart not to work properly.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by hm2k » Thu Nov 27, 2008 2:28 am

1. OpenCart will NOT install unless it is running PHP 5.0 or above. As of » PHP 4.2.0, this directive defaults to off.
2. Your web hosting provider should ensure the register-globals is set to OFF in the "php.ini" file.
3. You can uncomment the (php_flag register_globals Off) directive in the ".htaccess" file provided.
4. If all else fails, we have included the unregister_globals emulation.

I've seen plenty of "register_globals is enabled" error reports, yet i've seen no complaints with regards to the "unregister_globals emulation".
Last edited by hm2k on Thu Nov 27, 2008 2:41 am, edited 1 time in total.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by fido-x » Thu Nov 27, 2008 6:57 pm

hm2k wrote: 1. OpenCart will NOT install unless it is running PHP 5.0 or above. As of » PHP 4.2.0, this directive defaults to off.
2. Your web hosting provider should ensure the register-globals is set to OFF in the "php.ini" file.
3. You can uncomment the (php_flag register_globals Off) directive in the ".htaccess" file provided.
4. If all else fails, we have included the unregister_globals emulation.
1. This is correct.
2. Can you guarantee that your web hosting provider has register-globals set to off?
3. Do this to guarantee that register-globals is turned off.
4. I'll take your word on that.

It should be noted, that having register-globals set to ON is a security risk, which is why it is turned off by default in the first place.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by hm2k » Thu Nov 27, 2008 7:32 pm

fido-x wrote: It should be noted, that having register-globals set to ON is a security risk, which is why it is turned off by default in the first place.
I think the issue here is not whether it should be on or off (we know it should be off ;)), but handling cases where it is turned on.

1. You can still turn register globals on.
2. Some people have no control over their web hosting provider's decision.
3. Some web servers do not permit use of .htaccess or php_flag.
4. A fall back is included, if all else fails.

Daniel thinks the fall back should be to die() with an error, while I prefer the unregister_globals() method.

As I said, i've yet to see any issues with the method.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by david.gilbert » Thu Nov 27, 2008 10:08 pm

Although register_globals is a security risk, due to the large number of products available, it is not uncommon for register_globals to be needed. Therefore many hosting companies use extra security measures to counter-act the security risks imposed and have register_globals enabled to make their hosting compatible with more products than not.

Try running an osCommerce site with register_globals off, it simply wont happen. Because osCommerce is one of the most wideley used ecommerce solutions, many hosting providers need to set register_globas on to prevent huge amounts of support issues.

register_globals off emulation, whist I have not ever used it, some reading seems to suggest to me that it too poses other security issues that are not commonly prevented against with your standard run of the mill $7.95 hosting service, perhaps one for hm2k to check with some hosts hey? ;)

All of my dedicated hosting servers are set with register_globals off and I allow it to be over-written via .htaccess on a need to be overwritten basis. However I am one of the conservative people in this world that triple checks and applies security fixes for known bugs in all aspects of the servers software and operating system.

-Dave
Last edited by david.gilbert on Thu Nov 27, 2008 10:10 pm, edited 1 time in total.

Professional Website Services - http://www.davidmgilbert.com/


User avatar
Active Member

Posts

Joined
Sun Jan 06, 2008 5:02 pm
Location - Mount Compass, South Australia

Post by Qphoria » Thu Nov 27, 2008 11:35 pm

so osCommerce is like IE6.. widely used cancer... Funny how the worst things are always the most abundant

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 5 guests