I upgraded from drupal 6.4 to 6.5 and got the register_globals Enabled ('1') error in Status report.

When I check through phpinfo.php on my main domain (drupal is installed in a separate folder under the main domain) I get that it's off, so it seems drupal gets it wrong. How to fix this?

Comments

cog.rusty’s picture

The register_globals value can be different in any directory. Copy your phpinfo file to Drupal's directory and run it by browsing there, to see its value there.

If you have Drupal's .htaccess file, it should contain some directives to turn register_globals off in Drupal's directory.

If that doesn't work, try to put a copy of php.ini in Drupal's directory and add a register_globals = Off line at the end.

portulaca’s picture

Thank you cog.rusty!

I put phpinfo.php in the drupals dir and register_globals was On

I added the line in the drupal's .htaccess but it didn't work, I tried both 0 and Off.

The php.ini file in drupal's dir worked :)

holeepassion’s picture

I have .htaccess file in the directory, containing these

# PHP 4, Apache 1

php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0

# PHP 4, Apache 2

php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0

# PHP 5, Apache 1 and 2

php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0

Could the message be wrong ????

Thanks

http://www.holeepassion.com

Positive actions for saving EARTH

cog.rusty’s picture

No, I don't think the message can be wrong. If the admin/reports/status page or phpinfo() says that register_globals is On then it is On. Is your web server Apache?

It is possible that your web server configuration does not allow you to override that value in .htaccess. If that is the case, then you need either to use a php.ini file or to switch to PHP5 if you can.