I'm trying to install drupal 5.7 on my server, but i get the message:

register_globals is enabled. Drupal requires this configuration directive to be disabled. Your site may not be secure when register_globals is enabled. The PHP manual has instructions for how to change configuration settings. (Currently using PHP register globals Enabled)

my hosting provider won't change the general php configuration, and the .htaccess from drupal won't solve the problem neither, the value is 0, but still get the message.
i looked at this issue: http://drupal.org/node/209409
but the patches there won't work for drupal 5.7.

I also tryed with drupal 5.6 but is doesn't work also. even aplying the patch suggested in the issue mentioned. (http://drupal.org/node/209409)

Comments

VM’s picture

Status: Active » Closed (fixed)

your host is better suited to respond to how you turn off register globals on their server. If .htaccess doesn't work you may have to ask to use a custom php.ini file, if they don't allow that you should find a host that doesn't have this turned on by default.

VM’s picture

Category: bug » support
leanazulyoro’s picture

Status: Closed (fixed) » Active

excuse me, am i wrong or no matter what configuration mi hosting provider has, i should be able to turn off register globals, and other php config options, from the .htaccess file that comes with drupal?
if this is correct, which i think it is, then the configurations from the .htacess file doesn't work, since it says that register globals is 0, wich is "off", and it should be qualifield as a bug as it was in the issue http://drupal.org/node/209409. there they provide several patches to solve the issue. those patches doesn't cover d5.7, that's what this issue is about.

leanazulyoro’s picture

Category: support » bug
VM’s picture

Category: bug » support

A host can disallow changes to their default settings. Therefore yes, in this case you are incorrect. If a host doesn't allow you to change their default settings then you can't no matter what method is used. Thus the question is for your host.

The question that should be asked of your host is as follows:

Can register_globals be turned off for my account on the server, if so how ?

Drupal does not run with register globals on, there are multiple programs written in PHP that won't run with this setting.

There are 3 ways to override a default PHP setting IF the host allows.
1) using .htaccess (you state this didn't work for you)
2) using a custom php.ini file setting register_globals to OFF
3) possibly using settings.php to overide the setting.

None of the above methods will work if your host doesn't allow their default settings to be changed. Accounts on shared hosts, need to check with their hosting provider when it comes to overriding their default settings and the best practice to do so. In my experience with shared hosts chances are high that if they don't allow overriding with one method, they don't allow it with any method. Though again, they would be better suited to answer your specific question with regards to their servers.

The thread you are pointing, by my reading, fixes an incorrect reporting in drupal where even though register globals is set to OFF. Drupal was still reporting that register_globals was ON. Thus that patch and the thread in general has nothing to do with your problem and your problem isn't related to that issue. Unless your host has verified or you have, using a phpinfo(), that register_globals is actually OFF on the server and drupal is continuing to report that it is ON. This should also explain why applying that patch was both unnecessary and didn't fix the problem you are having. The patch can be removed in your case if register_globals is indeed set to ON, in your environment.

Mguel’s picture

Subscribing

russ77’s picture

simply add

AddType x-mapp-php5 .php

at the bottom of .htaccess file.
Worked for me.

xcorex’s picture

same here! :(

mrhealey’s picture

i got the same error. i use godaddy hosting. i found the problem was an old version of php. i updated from v4 to v5, and the error went away. good luck.

gpk’s picture

Status: Active » Fixed

See also http://drupal.org/node/222343.

Marking as fixed, since there is little more to be said on the topic.

Note that it's not possible to change the setting from the settings.php file since register_globals can't be modified at run-time (using ini_set()). See http://uk2.php.net/manual/en/ini.core.php#ini.register-globals.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

ncruz1908’s picture

Thanks russ77, "AddType x-mapp-php5 .php" worked for me. However, what is the code programed to do? I just hate applying things without quite understanding how they work.

Hosting Service: 1and1
Drupal: 6.12

VM’s picture

looks like it simply tells the server to use PHP 5 for .php files.

Based on my experience this is needed because the host is set up to default to PHP4 rather than default to PHP5.