Installer fails with three PHP warnings when default.settings.php is not found

mbutcher - September 11, 2008 - 22:24
Project:Drupal
Version:7.x-dev
Component:install system
Category:feature request
Priority:normal
Assigned:kaustubhvp
Status:duplicate
Description

During an installation, I accidentally mv'd default.settings.php. On the third stage of the installer, the default.settings.php file was not found. The error was not handled as expected, though.

To reproduce:

  1. Remove or rename default.settings.php
  2. Run the installer, completing the first two pages normally.

Expected:
Garland-like installer page giving an error message in a red box.

Got:
A white screen with the following:

Warning: fopen(./sites/default/default.settings.php) [function.fopen]: failed to open stream: No such file or directory in /Users/mbutcher/Code/DrupalCore/6/drupal/includes/install.inc on line 188

Warning: Cannot modify header information - headers already sent by (output started at /Users/mbutcher/Code/DrupalCore/6/drupal/includes/install.inc:188) in /Users/mbutcher/Code/DrupalCore/6/drupal/includes/install.inc on line 618

Warning: Cannot modify header information - headers already sent by (output started at /Users/mbutcher/Code/DrupalCore/6/drupal/includes/install.inc:188) in /Users/mbutcher/Code/DrupalCore/6/drupal/includes/install.inc on line 619

Environment:
CVS checkout of DRUPAL-6 branch (from Sept 11, 2008)
Mac OS 10.5
PHP 5.2.5
Apache 2.0.59
Firefox 3.0.1

#1

kaustubhvp - May 20, 2009 - 02:03
Priority:normal» critical
Assigned to:Anonymous» kaustubhvp
Status:active» needs review

ya pal!
same error with me
i just edited that /includes/install.inc file on line no 188
the edit is as follows
using text editer reach to line no 176 of install.inc

$default_settings = './sites/default/default.settings.php';

this will be written there
so just modify it to

$default_settings = './sites/default/settings.php';

and reload the installer

lemme know is it worked for u too...

#2

Gábor Hojtsy - May 26, 2009 - 08:28
Version:6.x-dev» 7.x-dev
Category:bug report» feature request
Priority:critical» normal
Status:needs review» active

Well, you are not supposed to delete *any* files which come with the Drupal distribution. If Drupal would check all files on whether they exist before loading them, that would be a pretty big performance headache. Drupal just needs to assume you do not delete random files (including default.settings.php). I admit this default settings file could more easily be deleted, so it might make sense to build in more comprehensive checking to look for problems there. That should be a Drupal 7 feature request though.

#3

Damien Tournoud - May 26, 2009 - 08:30
Status:active» duplicate

This is a duplicate of #312144: Install fails when default.settings.php is not present, even if this one was technically first.

 
 

Drupal is a registered trademark of Dries Buytaert.