Incorrect “register globals enabled” error in Drupal on hostgator

When I installed a new version of Drupal on one of my sites, an error showed up on the administration page:

The status page reports:

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.

Note: Make sure that the directive in php.ini files is

register_globals off

NOT

register_globals=off

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>

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 :

 register_globals off