Brand new Drupal user and administrator.

I successfully installed 7.14 on a virtual server with an internal IP. The install completed and I was able to view the front page of the default site. I was working my way through the tabs on the dashboard when suddenly, install.php started taking over the site. Now, any attempt to reload the site loads install.php (with two PHP errors).

As far as I can recall, the only thing I did was to change the permissions of the settings.php file back to a secure state.

Any ideas I can try to resurrect my site?

Thanks in advance,



VM’s picture

make sure settings.php has within it the proper information to connect to the DB.

also aids to know what the two php errors were that you were receiving.

jameyo’s picture

Fixed the problem. I'd followed the instructions for re-securing the settings.php file but those seemed to be in error, as they were not readable at the server level. I chmod'ed settings.php to be read-only by all and the site works again.

islalobo’s picture

The same thing is happening for me. When I chmod the permissions of settings.php the install.php appears instead of my site. I've tested that the proper username, password, database name are in the file. The information works when I mysql -u -p -h.

The site works when I have the permissions set to -r--r--r-- (I'm not sure what that is in numbers). However, based on security tips listed here: I want to have the permissions set to -r--r---- (which I think is 440). When I chmod the settings to 440 the site doesn't work and the above problems happens.

The two php error notices that I am getting are as follows:

  • Warning: include_once(/var/www/html/sites/default/settings.php) [function.include-once]: failed to open stream: Permission denied in drupal_settings_initialize() (line 739 of /var/www/html/includes/
  • Warning: include_once() [function.include]: Failed opening '/var/www/html/sites/default/settings.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in drupal_settings_initialize() (line 739 of /var/www/html/includes/

The line that is causing trouble in includes/ is:

  if (file_exists(DRUPAL_ROOT . '/' . conf_path() . '/settings.php')) {
    include_once DRUPAL_ROOT . '/' . conf_path() . '/settings.php';
gisle’s picture

The permissions on settings.php must ensure that the file is readable by the web server user. In other words, if settings.php is owned by the web server user, permissions 400 (-r-------) will be OK. But if it is owned by someone else, 444 (-r--r--r-) must be used.

- gisle