Drupal register_globals problem
howto January 24th. 2008, 10:09amHave 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.
February 27th, 2008 at 21:00
OMG, its help me so much… thaaaaaaaaaaaaaanks!!!!!
March 6th, 2008 at 08:51
Thank you very much, it’s really efficent.
and ok for the beer (or french wine bottle : it’s better)
Thierry
March 7th, 2008 at 18:18
THANKS!!!!! 2 beers for YOU MEN!!!
Pablo
March 11th, 2008 at 16:07
Perfect!!! I was about to give up on Drupal….Good show ol’ man!
March 27th, 2008 at 20:23
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 !
May 1st, 2008 at 18:12
thanks. I had some beer but drank all of it. wanna wait around ’till it comes back? LOL
but thanks, really.
June 3rd, 2008 at 07:01
Has anyone tried this on Yahoo web hosting? Yahoo does not allow .htaccess file and creating the php.ini file did not make any difference for me.
-peeds
June 3rd, 2008 at 07:34
peeds:
Have you contacted Yahoo about your problem? They may be able to suggest something.
June 4th, 2008 at 00:59
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!
June 4th, 2008 at 02:12
I contacted Yahoo, and at the moment, there is no solution for this. Details in my post:
http://blog.technicalley.com/index.php/drupal-installation-problems-with-yahoo-sb-web-hosting
-peeds
June 4th, 2008 at 04:32
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?
June 9th, 2008 at 01:00
In a completely non-gay way, I love you! I’ve been trying to get this changed for awhile and this worked. Thanks.
July 2nd, 2008 at 03:53
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.
July 31st, 2008 at 19:35
Thank you so much, you helped me a lot. =)
August 7th, 2008 at 15:27
That was very helpful!!!
Many thanks
August 22nd, 2008 at 15:13
you are the man !!
August 29th, 2008 at 19:37
Thanks a million!!! you deserve a case of your favorite beer, man.
September 8th, 2008 at 15:55
I have an account on ohost.de with register_globals enabled. So i tried this but it has no effect. Drupal is installed in the root folder - could it be a reason for this?
September 8th, 2008 at 19:33
Seedy:
Unfortunately, some webhosts deny the use of php.ini files, so you’d need to speak to their technical support.