From c2cb464ff253568f1059164bf87adf1eb9e6ee04 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 3 Apr 2007 03:50:36 +0000 Subject: [PATCH] r1530: Adding an installer check in install/install.php to prevent people from attempting to install without the right MySQL permissions --- docs/changes.txt | 1 + install/install.php | 87 ++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 79 insertions(+), 9 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 431e0a7..898bfef 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -7,6 +7,7 @@ - Change: When clicking the "[Run Search]" link in the "Saved Searches" section of the "Options" tab, force the search to rerun - Fixed: Some email roles would not get notified under certain circumstances because the list of users to notify was reset - Fixed: Errors would occurr on installation due to a problem with not loading all the data at the right time +- Enhancement: The installer will now check to ensure that all the proper MySQL permissions are enabled 1.2.0 Beta 2 =============================== diff --git a/install/install.php b/install/install.php index 18cc8d3..6f223d3 100644 --- a/install/install.php +++ b/install/install.php @@ -19,7 +19,7 @@ || ################################################################### \*=====================================================================*/ -define('STOP_MARK', 7); +define('STOP_MARK', 8); define('ACTIVE_SITE', 'install.php'); require_once('./global.php'); @@ -46,6 +46,75 @@ if ($bugsys->in['mark'] == 0) if ($bugsys->in['mark'] == 1) { ?> +

Installation Check

+ + + +

This step will ensure that Bugdar can install and run properly. In all of these tests, green means the test succeeded and red means it didn't.

+ +MySQL Privileges: +"; + + $valcount = array_count_values($tests); + if ($valcount['fail'] > 0) + { + echo "

Please adjust your MySQL setup and refresh this page to ensure that Bugdar can operate properly. If you do not do so, Bugdar cannot be installed.

"; + page_end(false); + } +} + +// ################################################################### + +if ($bugsys->in['mark'] == 2) +{ +?>

Initializing Database

This step will load the tables into your database so the rest of the installation can proceed forward.

@@ -63,7 +132,7 @@ if ($bugsys->in['mark'] == 1) // ################################################################### -if ($bugsys->in['mark'] == 2) +if ($bugsys->in['mark'] == 3) { ?>

Loading Default Data

@@ -97,7 +166,7 @@ if ($bugsys->in['mark'] == 2) // ################################################################### -if ($bugsys->in['mark'] == 3) +if ($bugsys->in['mark'] == 4) { ?>

Loading Settings

@@ -119,7 +188,7 @@ if ($bugsys->in['mark'] == 3) // ################################################################### -if ($bugsys->in['mark'] == 4) +if ($bugsys->in['mark'] == 5) { ?>

Cache Data

@@ -165,7 +234,7 @@ if ($bugsys->in['mark'] == 4) // ################################################################### -if ($bugsys->in['mark'] == 5) +if ($bugsys->in['mark'] == 6) { $value = 'http' . ($_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] != '80' ? ':' . $_SERVER['SERVER_PORT'] : '') . str_replace('/install/install.php', '', $_SERVER['SCRIPT_NAME']); ?> @@ -174,7 +243,7 @@ if ($bugsys->in['mark'] == 5)

These three settings are fundamental in setting up your bug tracking system. Please fill them in to proceed with the installation.

- +
Tracker Name (the name of the entire tracking system, for instance "Acme Inc. Bug Tracker"):
Tracker URL (the root URL of your tracker, we have tried to guess this for you; it does not end with a trailing slash!):
@@ -191,7 +260,7 @@ if ($bugsys->in['mark'] == 5) // ################################################################### -if ($bugsys->in['mark'] == 6) +if ($bugsys->in['mark'] == 7) { ?>

New Administrator

@@ -199,7 +268,7 @@ if ($bugsys->in['mark'] == 6)

Your settings have been saved. Now you must create a new administrative account for yourself. This account will have complete control over the system.

- +
Display Name:
Email Address:
@@ -219,7 +288,7 @@ if ($bugsys->in['mark'] == 6) // ################################################################### -if ($bugsys->in['mark'] == 7) +if ($bugsys->in['mark'] == 8) { ?>

User Added

-- 2.22.5