From 4a1354c45f90c2153f50e3187eb7999739604251 Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Thu, 27 Nov 2014 18:47:05 -0500 Subject: [PATCH] Work on new WordPress style install process --- .../build/airtime-setup/setup-config.php | 2 + airtime_mvc/build/airtime.conf | 32 ------ airtime_mvc/public/airtime-boot.php | 82 ++++++++++++++ airtime_mvc/public/config-check.php | 107 ++++++++++++++++++ airtime_mvc/public/index.php | 106 ++++++----------- installer/install | 21 ++-- 6 files changed, 233 insertions(+), 117 deletions(-) create mode 100644 airtime_mvc/build/airtime-setup/setup-config.php delete mode 100644 airtime_mvc/build/airtime.conf create mode 100644 airtime_mvc/public/airtime-boot.php create mode 100644 airtime_mvc/public/config-check.php diff --git a/airtime_mvc/build/airtime-setup/setup-config.php b/airtime_mvc/build/airtime-setup/setup-config.php new file mode 100644 index 000000000..a4abe2daf --- /dev/null +++ b/airtime_mvc/build/airtime-setup/setup-config.php @@ -0,0 +1,2 @@ +bootstrap()->run(); + } +} catch (Exception $e) { + echo $e->getMessage(); + echo "
";
+    echo $e->getTraceAsString();
+    echo "
"; + Logging::info($e->getMessage()); + if (VERBOSE_STACK_TRACE) { + Logging::info($e->getTraceAsString()); + } else { + Logging::info($e->getTrace()); + } +} + diff --git a/airtime_mvc/public/config-check.php b/airtime_mvc/public/config-check.php new file mode 100644 index 000000000..f877e77b6 --- /dev/null +++ b/airtime_mvc/public/config-check.php @@ -0,0 +1,107 @@ + + + + + + + + +

+ Airtime Configuration Checklist +

+ + + + + + + + + + + + + + + + + + + + + +
+ Airtime Configuration +
+ Component + + Description + + Solution +
+ Zend + + PHP MVC Framework + > + > + Ubuntu: try running sudo apt-get install libzend-framework-php +
Debian: try running sudo apt-get install zendframework + +
+ Database + + PostgreSQL data store for Airtime + > + > + Try running sudo apt-get install php5-pgsql php5-mysql + +
+ + +

+ Looks like something went wrong! If you've tried everything we've recommended in the table above, come + visit our forums + or check out the manual. +

+ +
+

+ PHP Extension List +

+

+ +

+bootstrap()->run(); - } -} catch (Exception $e) { - echo $e->getMessage(); - echo "
";
-    echo $e->getTraceAsString();
-    echo "
"; - Logging::info($e->getMessage()); - if (VERBOSE_STACK_TRACE) { - Logging::info($e->getTraceAsString()); - } else { - Logging::info($e->getTrace()); - } +if (array_key_exists('config', $_GET)) { + showConfigCheckPage(); +} + +// If a configuration file exists, forward to our boot script +if (file_exists(BUILD_PATH . AIRTIME_CONFIG)) { + airtimeConfigureDatabase(); + + // If the database doesn't exist, or is improperly configured, + // show the user a configuration error page so they know what went wrong + if (!airtimeCheckDatabase()) { + showConfigCheckPage(); + } + + require_once(WEB_ROOT_PATH . 'airtime-boot.php'); +} +// Otherwise, we'll need to run our configuration setup +else { + require_once(BUILD_PATH . SETUP_DIR . 'setup-config.php'); } diff --git a/installer/install b/installer/install index 50f016944..043d9cae6 100644 --- a/installer/install +++ b/installer/install @@ -36,17 +36,17 @@ echo " * \____|__ /___||____|_ / |____| |___\____|__ /__ echo " * \/ \/ \/ \/ *" echo " ****************************************************************" -echo " ____ ______ ____ ____ __________ __ _________ ____ ____ " +echo " ____ ______ ____ ____ __________ __ _________ ____ ____ " echo " / _ \\\\____ \_/ __ \ / \ / ___/ _ \| | \_ __ \_/ ___\/ __ \ " -echo " ( <_> ) |_> > ___/| | \ \___ ( <_> ) | /| | \/\ \__\ ___/ " -echo " \____/| __/ \___ >___| / /____ >____/|____/ |__| \___ >___ > " -echo " |__| \/ \/ \/ \/ \/ " -echo " .___.__ __ __ .__ " -echo "____________ __| _/|__| ____ _____ __ ___/ |_ ____ _____ _____ _/ |_|__| ____ ____ " -echo "\_ __ \__ \ / __ | | |/ _ \ \__ \ | | \ __\/ _ \ / \\\\__ \\\\ __\ |/ _ \ / \ " -echo " | | \// __ \_/ /_/ | | ( <_> ) / __ \| | /| | ( <_> ) Y Y \/ __ \| | | ( <_> ) | \ " -echo " |__| (____ /\____ | |__|\____/ (____ /____/ |__| \____/|__|_| (____ /__| |__|\____/|___| / " -echo " \/ \/ \/ \/ \/ \/ " +echo " ( <_> ) |_> > ___/| | \ \___ ( <_> ) | /| | \/\ \__\ ___/ " +echo " \____/| __/ \___ >___| / /____ >____/|____/ |__| \___ >___ > " +echo " |__| \/ \/ \/ \/ \/ " +echo " .___.__ __ __ .__ " +echo "____________ __| _/|__| ____ _____ __ ___/ |_ ____ _____ _____ _/ |_|__| ____ ____ " +echo "\_ __ \__ \ / __ | | |/ _ \ \__ \ | | \ __\/ _ \ / \\\\__ \\\\ __\ |/ _ \ / \ " +echo " | | \// __ \_/ /_/ | | ( <_> ) / __ \| | /| | ( <_> ) Y Y \/ __ \| | | ( <_> ) | \ " +echo " |__| (____ /\____ | |__|\____/ (____ /____/ |__| \____/|__|_| (____ /__| |__|\____/|___| / " +echo " \/ \/ \/ \/ \/ \/ " echo -e "\n-----------------------------------------------------" echo " * Installing Apache * " @@ -136,4 +136,3 @@ echo " " echo " To get started with Airtime, visit localhost:5000 " echo " in your web browser of choice " echo "-----------------------------------------------------" -