From dbf82f7c1e995f25de6ed2c80b49677118df1a35 Mon Sep 17 00:00:00 2001 From: Eric Helgeson Date: Wed, 20 May 2009 15:14:04 -0500 Subject: [PATCH 1/2] fixed missing closing php tag when installer.php wrote to config.php --- install.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.php b/install.php index 32915200b2..a25f694677 100644 --- a/install.php +++ b/install.php @@ -260,7 +260,8 @@ function writeConf($sitename, $sqlUrl, $fancy, $path) "\$config['site']['name'] = \"$sitename\";\n\n". ($fancy ? "\$config['site']['fancy'] = true;\n\n":''). "\$config['site']['path'] = \"$path\";\n\n". - "\$config['db']['database'] = \"$sqlUrl\";\n\n"); + "\$config['db']['database'] = \"$sqlUrl\";\n\n". + "?>"); return $res; } From a3280961d2d92724dcdb451192450662f26eee8e Mon Sep 17 00:00:00 2001 From: Eric Helgeson Date: Wed, 20 May 2009 16:39:08 -0500 Subject: [PATCH 2/2] Removed return from 1st line of runDbScript() fixed broken html tag on success page. handlePost() now will show as many errors as it can (instead of one at a time) checkPrereqs() will show all errors at once instead of failing on first one, installer will be able to try to fix all instead of fixing one at a time and trying again. writeConf(): added if LACONICA is !defined exit Tests: drop database and remove config.php, ran installer. Passed. --- install.php | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/install.php b/install.php index a25f694677..bc82e5e37a 100644 --- a/install.php +++ b/install.php @@ -35,15 +35,17 @@ function main() function checkPrereqs() { + $pass = true; + if (file_exists(INSTALLDIR.'/config.php')) { ?>

Config file "config.php" already exists.

Require PHP version 5 or greater.

Cannot load required extension:

Cannot write config file to:

On your server, try this command: chmod a+w

Cannot write avatar directory: /avatar/

On your server, try this command: chmod a+w /avatar/