diff --git a/install.php b/install.php index 221e4746fe..6f8bff91ec 100644 --- a/install.php +++ b/install.php @@ -240,17 +240,16 @@ function haveExternalLibrary($external_library) function checkPrereqs() { - $pass = true; + $pass = true; if (file_exists(INSTALLDIR.'/config.php')) { - ?>
Config file "config.php" already exists.
- Config file "config.php" already exists.'); $pass = false; } if (version_compare(PHP_VERSION, '5.2.3', '<')) { - ?>Require PHP version 5.2.3 or greater.
Require PHP version 5.2.3 or greater.'); + $pass = false; } $reqs = array('gd', 'curl', @@ -258,11 +257,10 @@ function checkPrereqs() foreach ($reqs as $req) { if (!checkExtension($req)) { - ?>Cannot load required extension:
%s
', $req);
+ $pass = false;
}
- }
-
+ }
// Make sure we have at least one database module available
global $dbModules;
$missingExtensions = array();
@@ -273,30 +271,28 @@ function checkPrereqs()
}
if (count($missingExtensions) == count($dbModules)) {
$req = implode(', ', $missingExtensions);
- ?>Cannot find database support. You need at least one of these PHP extensions installed:
%s
', $req);
+ $pass = false;
+ }
+
+ if (!is_writable(INSTALLDIR)) {
+ printf('Cannot write config file to: %s
On your server, try this command: chmod a+w %s
', INSTALLDIR);
+ $pass = false;
}
- if (!is_writable(INSTALLDIR)) {
- ?>
Cannot write config file to:
On your server, try this command: chmod a+w
- Cannot write to %s directory: %s
On your server, try this command: chmod a+w %s
Cannot write directory:
On your server, try this command: chmod a+w