How to Turn Register Globals Off

Ask all your questions about the script here.
Josh
Site Admin
Posts: 372
Joined: Mon Nov 05, 2007 7:30 pm
Location: California
Contact:

How to Turn Register Globals Off

Postby Josh » Wed Nov 28, 2007 8:17 pm

I've listed below a simple and effective (hopefully) way to turn register globals off. I know it works on 1and1 Linux servers, but I'm not so sure about the others. Your best bet is to test it out, post if it works or not (include what hosting company), and, if all else is lost, refer to your hosting company's faq.

1. Create an .htaccess file (save a plain text Notepad file as .htaccess)

2. Place the following line into it: php_flag register_globals off

3. Save file as .htaccess

3. Put .htaccess file in the root directory of the script

Please let this work, :D
Hyperplazia
iWebTutor.com
User avatar
chrisx84
Super User
Posts: 58
Joined: Fri Nov 16, 2007 9:04 am
Location: Hamilton, Ontario, Canada
Contact:

Re: How to Turn Register Globals Off

Postby chrisx84 » Wed Nov 28, 2007 11:33 pm

thats a good way but the way Doug is it is to create a file called php.ini and just put register_globals=off
User avatar
Douglas
Site Admin
Posts: 625
Joined: Sat Oct 27, 2007 11:29 pm
Location: BC, Canada
Contact:

Re: How to Turn Register Globals Off

Postby Douglas » Fri Nov 30, 2007 5:44 pm

Both will work just as good :D Thanks!
SilverWolf
New
Posts: 5
Joined: Sun Feb 03, 2008 7:44 pm

Re: How to Turn Register Globals Off

Postby SilverWolf » Mon Feb 04, 2008 11:54 am

well I just couldn't get the .htaccess to work. I even checked out several tutorials on creating .htaccess and nothing I tried worked.

So I tried the php.ini and it worked with both my index.html and index.php. Gut the php has caused a few problems with my original index.

the menu had shuk in size on the left side, my right side is gone, the middle seem ok.

question: Can you use Iframes with php?

If you haven't guessed I am fairly new to php programing. :D
Josh
Site Admin
Posts: 372
Joined: Mon Nov 05, 2007 7:30 pm
Location: California
Contact:

Re: How to Turn Register Globals Off

Postby Josh » Mon Feb 04, 2008 1:40 pm

My suggestion and recommendation is that you don't use any type of frame at all.

Frames aren't supported across all browsers and tend to differ in look/shape depending on the browser.

If you would like, you could provide your website address so I can take a look. 0.o

I hope all goes well.

-Josh
User avatar
Douglas
Site Admin
Posts: 625
Joined: Sat Oct 27, 2007 11:29 pm
Location: BC, Canada
Contact:

Re: How to Turn Register Globals Off

Postby Douglas » Wed May 14, 2008 12:18 am

Here is how to do it if that doesn't work:

viewtopic.php?f=11&t=9&p=139&hilit=security.class.php#p139
tommy
New
Posts: 4
Joined: Fri Jul 25, 2008 3:35 am
Location: Napoli
Contact:

Re: How to Turn Register Globals Off

Postby tommy » Sun Jul 27, 2008 2:17 am

Register globals must be turned off for this system to work properly. It is a major security risk. If you really want them turned on, contact me:

Sigh! they are deprived of hope. I have lost much time in order to understand something at the end to us and me meeting these cursed register global in " on" . Mine provider it says that for emergency reason nearly all the provider put this register in on. I must renounce to this beautiful script? It is not possible to make it to work also with register global to on? It succeeds if to find you a solution you I pray to make me to know it sending to me un' email to info@superbit.it.
I embrace to you cordial Tommy

P.S.
s.o. windows
Josh
Site Admin
Posts: 372
Joined: Mon Nov 05, 2007 7:30 pm
Location: California
Contact:

Re: How to Turn Register Globals Off

Postby Josh » Sun Jul 27, 2008 7:55 am

In includes/Security.class.php you'll find: (near the top)

Code: Select all

      // Check register_globals
      if (@ini_get('register_globals') == 1 || strtoupper(@ini_get('register_globals')) == 'ON') {
      die(REGISTER_GLOBALS_ON);
      }

Remove it and you won't get the error anymore. :D You are now free to use the script. :)
harry
New
Posts: 2
Joined: Fri Apr 04, 2008 2:04 pm

Re: How to Turn Register Globals Off

Postby harry » Sat Aug 30, 2008 4:11 pm

Should....yes...does it work now? No....

Code: Select all

Fatal error: Call to a member function update() on a non-object in /home/rdohn/public_html/dealer/includes/Security.class.php on line 255
Josh
Site Admin
Posts: 372
Joined: Mon Nov 05, 2007 7:30 pm
Location: California
Contact:

Re: How to Turn Register Globals Off

Postby Josh » Sat Aug 30, 2008 9:16 pm

I must have been tired when I was writing that...sorry!

The code has been updated. :D

Return to “Support”

Who is online

Users browsing this forum: No registered users and 1 guest