When I installed a new version of Drupal on one of my sites, an error showed up on the administration page:
Checking phpinfo() showed that Register Globals was "off". This thread on Drupal.org, discusses the fact that even if phpinfo() shows that Register Globals is OFF, this error may still show up, because of a bug in some versions of Drupal.
According to php.net, Register globals can be turned off in .htaccess files like this:
# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
# add the following directive to the list:
php_flag register_globals off
</IfModule>
- Drupal.org thread on the register_globals error bug
- php.net: how to change register_globals setting in .htaccess file
However, I've found that the simplest way to correct this issue on Hostgator is to upload a file called php.ini containing this line to the directory containing drupal :
php5_flag register_globals off
thanks a lot, you are my hero
Posted by: yoagf on January 18, 2009 1:50 PMYou are a GENIUS!
Posted by: Jimi Sweet NYC on March 6, 2009 5:57 PMYou are great. You saved my day.
Posted by: Maanas on July 14, 2009 12:11 AMThank you very much for this information!!!
Thank you!!! mwah!
Posted by: xacarias on July 22, 2009 12:56 AMThanks, that was easy. Really appreciate it.
Posted by: Shawn on September 1, 2009 7:11 PMThanks a million!
Posted by: ls on March 7, 2010 5:49 AMthank you so much! i was going to give up trying to install Drupal.
Posted by: tyke on June 17, 2010 12:58 PMI recently migrated to Hostgator and the php.ini fix worked wonders.
Thank you ;)
Posted by: Kaden Feldmesser on July 12, 2010 4:43 AMawesome!
Posted by: jack on July 13, 2010 8:57 AM