Disabling Register_globals... where and how?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Suggested Hosts
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
LizzyT
Registered User
Posts: 47
Joined: Thu Jan 10, 2008 10:49 pm
Location: Cville, Virginia.... USA!!

Disabling Register_globals... where and how?

Post by LizzyT »

Hi,

Does anyone know how or where do I disable the register_globals settings? I see php code for it but have no idea what to do with it in the common file.

Thanks,
Liz

RachelHelps
Registered User
Posts: 57
Joined: Tue Dec 18, 2007 10:02 pm

Re: Disabling Register_globals... where and how?

Post by RachelHelps »

I need to know this too. Please and thank you. This is the only thing that is holding me up from completing the upgrade and I am anxious to finish.
http://www.rachelhelps.com/forum

Love the styles. Thanks! :)

User avatar
Frogmen
Registered User
Posts: 132
Joined: Fri Dec 28, 2007 11:48 pm
Location: Palma De Mallorca. Spain

Re: Disabling Register_globals... where and how?

Post by Frogmen »

You have to create a php.ini file in the phpBB3's install directory and add the following lines:

ini_set('mbstring.http_input', 'pass');
ini_set('mbstring.http_output', 'pass');
register_globals = Off

Rgds
Frogmen

DeathIsYou
Registered User
Posts: 22
Joined: Wed Jan 30, 2008 5:09 pm

Re: Disabling Register_globals... where and how?

Post by DeathIsYou »

Yeh same as above, but even though it said that the 'http_input & output' needed to be changed I didn't have to.

I made a php.ini file but only put

Code: Select all

register_globals = Off
in it and it was fine. Just trying to make it a but quicker :P

RachelHelps
Registered User
Posts: 57
Joined: Tue Dec 18, 2007 10:02 pm

Re: Disabling Register_globals... where and how?

Post by RachelHelps »

Thank you Death, but I tried that before posting and I uploaded it both into my root directory and into phpbb3's directory (never thought about the install directory) and it didn't work. I will try both now and let you know if it worked.

Thanks to you both.
http://www.rachelhelps.com/forum

Love the styles. Thanks! :)

RachelHelps
Registered User
Posts: 57
Joined: Tue Dec 18, 2007 10:02 pm

Re: Disabling Register_globals... where and how?

Post by RachelHelps »

Didn't work. I uploaded it first in the install directory with just the one line. Then I uploaded it with all 3 lines to the same directory...didn't work. Then I tried it to the phpbb3 directory and then my website root directory...nothing works. Still get the big red no. Tried refreshing the page...I'll keep trying unless you guys see something I may have missed?
http://www.rachelhelps.com/forum

Love the styles. Thanks! :)

rover787
Registered User
Posts: 30
Joined: Fri Feb 01, 2008 11:50 am

Re: Disabling Register_globals... where and how?

Post by rover787 »

Your "register_globals" is in your php.ini file, which is on the webserver itself. If you have ssh access to your server you can change the setting to "off". [Don't forget to restart the http server afterwards].

----------------------------------------------------------------------------------------------------------------
Option 2:
open your .htaccess file in the root directory and amend it with:
php_flag register_globals off


(if that doesn't work try)
php_value register_globals 0

-----------------------------------------------------------------------------------------------------------------
Option 3:
Ask your provider if he could change your php.ini setting for you.

Hope one of these works for you.

RachelHelps
Registered User
Posts: 57
Joined: Tue Dec 18, 2007 10:02 pm

Re: Disabling Register_globals... where and how?

Post by RachelHelps »

rover787 wrote:Your "register_globals" is in your php.ini file, which is on the webserver itself. If you have ssh access to your server you can change the setting to "off". [Don't forget to restart the http server afterwards].

----------------------------------------------------------------------------------------------------------------
Option 2:
open your .htaccess file in the root directory and amend it with:
php_flag register_globals off


(if that doesn't work try)
php_value register_globals 0

-----------------------------------------------------------------------------------------------------------------
Option 3:
Ask your provider if he could change your php.ini setting for you.

Hope one of these works for you.
I am sorry for being so clueless, but can you be more specific please? What is ssh access?

I do not see a .htaccess file. I only have like 1 system file in the root directory of my website and that is the php.ini file I made and put there that was suppose to fix the problem.
http://www.rachelhelps.com/forum

Love the styles. Thanks! :)

rover787
Registered User
Posts: 30
Joined: Fri Feb 01, 2008 11:50 am

Re: Disabling Register_globals... where and how?

Post by rover787 »

"I am sorry for being so clueless ..."
Nothing to worry about, I have the same problems when knitting socks :)

You use ssh (secure shell) when you have direct access to the server, which is obviously not your case.

There should have been an .htaccess file when you unzipped phpBB.

Basically it's just a flat file:

Code: Select all

<Files "config.php">
Order Allow,Deny
Deny from All
</Files>

<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
Have a look and if not, come back to me.

RachelHelps
Registered User
Posts: 57
Joined: Tue Dec 18, 2007 10:02 pm

Re: Disabling Register_globals... where and how?

Post by RachelHelps »

Ok no wonder I couldn't find it. It is in the phpbb3 folder, but when the folder is uploaded to my server it does not show up. So I edited the file then uploaded it by itself and it still doesn't show. FileZilla only shows php files and I checked the install and it still says it is not disabled. :(

Thanks again for all your help.
http://www.rachelhelps.com/forum

Love the styles. Thanks! :)

rover787
Registered User
Posts: 30
Joined: Fri Feb 01, 2008 11:50 am

Re: Disabling Register_globals... where and how?

Post by rover787 »

Ok just two things before I recommend option 3: (ask your provider)

Did you put

Code: Select all

php_flag register_globals off
in your .htaccess?

Is the file name correct?
.htaccess (with a full stop/period in front of it) ?

RachelHelps
Registered User
Posts: 57
Joined: Tue Dec 18, 2007 10:02 pm

Re: Disabling Register_globals... where and how?

Post by RachelHelps »

Ok. I may have to take you up on option 3. Every time I upload that file it says critical error and yes it is .htaccess.
http://www.rachelhelps.com/forum

Love the styles. Thanks! :)

LizzyT
Registered User
Posts: 47
Joined: Thu Jan 10, 2008 10:49 pm
Location: Cville, Virginia.... USA!!

Re: Disabling Register_globals... where and how?

Post by LizzyT »

I know I started this thread but what is the point of disabling register_globals? I mean what does it do or rather not do?

Thanks,

Liz
Liz

DeathIsYou
Registered User
Posts: 22
Joined: Wed Jan 30, 2008 5:09 pm

Re: Disabling Register_globals... where and how?

Post by DeathIsYou »

.htaccess -- That file is usually not allowed to be uploaded to your FTP server because you can change the whole PHP settings which your host uses :P

As for register globals:
PHP.net wrote: When on, register_globals will inject your scripts with all sorts of variables, like request variables from HTML forms. This coupled with the fact that PHP doesn't require variable initialization means writing insecure code is that much easier. It was a difficult decision, but the PHP community decided to disable this directive by default. When on, people use variables yet really don't know for sure where they come from and can only assume. Internal variables that are defined in the script itself get mixed up with request data sent by users and disabling register_globals changes this.

RachelHelps
Registered User
Posts: 57
Joined: Tue Dec 18, 2007 10:02 pm

Re: Disabling Register_globals... where and how?

Post by RachelHelps »

Thank you DeathisYou. So I will contact my provider.

Have a good one!

On another note could you help with this?

http://www.phpbb.com/community/viewtopi ... 5&t=734815
http://www.rachelhelps.com/forum

Love the styles. Thanks! :)

Locked

Return to “[3.0.x] Support Forum”