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
Comment #1
VM CreditAttribution: VM commentedyour 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.
Comment #2
VM CreditAttribution: VM commentedComment #3
leanazulyoro CreditAttribution: leanazulyoro commentedexcuse 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.
Comment #4
leanazulyoro CreditAttribution: leanazulyoro commentedComment #5
VM CreditAttribution: VM commentedA 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:
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.
Comment #6
Mguel CreditAttribution: Mguel commentedSubscribing
Comment #7
russ77 CreditAttribution: russ77 commentedsimply add
AddType x-mapp-php5 .php
at the bottom of .htaccess file.
Worked for me.
Comment #8
xcorex CreditAttribution: xcorex commentedsame here! :(
Comment #9
mrhealey CreditAttribution: mrhealey commentedi 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.
Comment #10
gpk CreditAttribution: gpk commentedSee 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.
Comment #12
ncruz1908 CreditAttribution: ncruz1908 commentedThanks 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
Comment #13
VM CreditAttribution: VM commentedlooks 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.