Drupal register_globals problem

Drupal register_globals problem

Have you tried to install Drupal, and got a message saying your server environment is unsupported because you have register_globals turned on? Have you been unable to change this because your web host (1&1, in my case) doesn’t let you play with PHP’s settings (and quite right too)?

Help is (possibly) at hand! It’s likely that although you can’t configure PHP directly, your host will allow per-directory PHP configuration changes. You do this with a plain-text file called php.ini, which in this case is placed in the root directory of your Drupal install, and contains just one line:

register_globals = off

Hurrah, eh? You can thank me with beer.

0 Comments

  1. If you’re at 1&1, try putting in the “.htaccess” file at drupal’s root:

    #Forcer PHP5 chez 1and1
    AddType x-mapp-php5 .php

    As PHP5 has “Register Globals” set to 0 by default at 1&1 !

    Webplate
  2. peeds

    can you provide a link to main page for the yahoo web hosting you are using?
    can you go over the process you are using?

    I am curious to get this working for different providers, it shouldn’t be that hard!

  3. Peeds, I am using a very affordable (the cheapest) linux webhosting solution from 1&1,
    and Webplate’s solution above is the best… I added that line at the top of the default drupal .htaccess file

    it looks like some of the basic options available in this situation are outlined here:
    http://faq.1and1.com/scripting_languages_supported/php/18.html

    look at it this way peeds, the support team says you cannot change the register_global to off…

    well fine, but is there any way like webplates to just force the use of php5.0+ which defaults register_global to off?

  4. Thanks a bunch, you probably solved me a TON of time; and to edit additional PHP parameters, insert a line break (press ‘Enter’) and type the next one out, using the same syntax as the first.

    Jake G.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.