I have a patch(not really, just a start) to improve the install system so that if you were to visit /index.php when it is not installed, the installer would appear.
It works like this: on index.php, it checks to see if the variable $installed in includes/installed.inc does not equal 0. If this is false, it includes install.php.
In install.php, when the install is finished, it makes the contents of includes/installed.inc simply

NOTE: the patch generates errors, and does not work. It is just an idea in progress.

Comments

dmitrig01’s picture

Component: other » base system
Category: feature » task
Priority: Critical » Normal

updating to the appropriate settings

webchick’s picture

-1 to adding a dummy file for this purpose, especially one that requires write access to the includes directory.

This patch is checking installed status _every_ time _any_ page on Drupal is loaded, when the only time we'll ever really need to do it is the very first time index.php is ran. Another option might be to make the database error that gets displayed when it can't connect a bit smarter, and forward the user to install.php if it doesn't appear to have been run (it's keeping track of this somehow, because if you go back to install.php after you've run it, it won't let you)).

eaton’s picture

If you've never run the installer, you'll get the traditional Drupal database error screen. That screen includes an explicit link to the installer, noting that it should be run if the user is setting up the site for the first time. It's possible that message should be made more obvious, but I don't think the solution is to put more code on every single page-hit 'just in case'.

dmitrig01’s picture

In my cvs install from this morning, there was no link.

dmitrig01’s picture

Status: Needs work » Needs review
StatusFileSize
new7.45 KB

A lot better, and less mods. How's this?

eaton’s picture

Er... The patch you just posted actually showed the HTML with the link to the installer being removed. :-)

The problem with this version of the patch is that in cases of actual database connectivity problems, the site will be automatically, transparently redirected to the installer -- even if it's already been installed and just needs to have the sql server rebooted or something like that.

The 'couldn't connect to the database' screen is less than perfect, but I think if it is to be changed to something 'automatic' we need to be very very scrupulous about not giving users the WRONG information by implying that it must be re-installed or something like that.

dmitrig01’s picture

StatusFileSize
new627 bytes

How about this?

dmitrig01’s picture

StatusFileSize
new611 bytes

this might help(fixed version)

Frando’s picture

Hmm, what if there's just a problem with my database server?

If mysql crashes, I usually don't need or want to reinstall drupal.

I don't think we need a autodetection. We have a readme.txt, and visiting youdomain.com/install.php shouldn't be too hard to achieve for anyone.

Steven’s picture

Status: Needs review » Closed (won't fix)

This was already discussed in the install system discussion and was rejected.