Does Drupal override php setting by it self by .htaccess? When I migrate or restore a Drupal 6 site Always php version I have set in the account page of the shared hosting service has been automatically changed.

For example, though I have set php 5.3 for example.com when I restore the site using exactly the same domain, files, db and the host after the restoration php version is set to php 5.1

Also after the restoration php.ini file gets set back to OFF though it was set to "On" before the restration.

I contacted the shared hosting company but they say I should check the .htaccess file that overrides the php setting.

Does Drupal do this?
Does Drupal override php setting by it self by .htaccess?


No.  Nor does it do it by any other method.

As pointed out in the comment by kiamlaluno,  Drupal comes with its own .htaccess file. You'll find it as one the files in your Drupal root.  You can read through it yourself and see that it does not change the setting of PHP version that you set in the account page of your shared hosting service.

The .htaccess overrides some settings that may be set different in php.ini, as shown in the directives below (copied from the default .htaccess file), but not anything else.  As you can see, it has IfModule directives that makes the overrides contigent on the versions of PHP and Apache you use, rather than overriding the version.

# PHP 4, Apache 1.
&lt;IfModule mod_php4.c&gt;
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
&lt;/IfModule&gt;

# PHP 4, Apache 2.
&lt;IfModule sapi_apache2.c&gt;
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
&lt;/IfModule&gt;

# PHP 5, Apache 1 and 2.
&lt;IfModule mod_php5.c&gt;
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
&lt;/IfModule&gt;


The changes you ask about cannot be explained by the Drupal .htaccess-file or anything else done by Drupal. Nor do I know about any backup/restore program or migration program for Drupal that does such things as those you describe.