When I installed a new version of Drupal on one of my sites, an error showed up on the administration page:
Ads by Google
Posted by ellen at April 09, 2008 09:43 PM
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
Ads by Google
thanks a lot, you are my hero
You are a GENIUS!
You are great. You saved my day.
Thank you very much for this information!!!
Thank you!!! mwah!
Thanks, that was easy. Really appreciate it.
Thanks a million!
thank you so much! i was going to give up trying to install Drupal.
I recently migrated to Hostgator and the php.ini fix worked wonders.
Thank you ;)
awesome!
"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"
How do I create a file called php.ini? Can you walk me thru this?
_Randall
Hi Randall,
Just make a text file called "php.ini"
Put this one line in it:
php5_flag register_globals off
Then upload it to the directory containing your drupal installation.
I've installed Drupal 7 on my Hostgator site today, and this did not work. What I had to do was get a copy of the php.ini file from /usr/local/lib/
To do this, I created a file called gettheini.php with the following in it:-
Once done, I modified the register_globals line in the newly retrieved php.ini and set it to off and that worked for me!