changeset 1019:22b6442d5cb3

Add error messages for missing mconfig.inc.php.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 05 Nov 2015 19:11:40 +0200
parents aff236da33ba
children 2a259e243350
files faptool.php index.php managedb.php
diffstat 3 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/faptool.php	Thu Nov 05 18:55:40 2015 +0200
+++ b/faptool.php	Thu Nov 05 19:11:40 2015 +0200
@@ -5,6 +5,14 @@
 // Special entry/preview/etc backend management commandline utility
 // (C) Copyright 2012-2015 Tecnic Software productions (TNSP)
 //
+if (!file_exists("mconfig.inc.php"))
+{
+  die(
+    "ERROR: Missing site configuration file. Please copy ".
+    "'mconfig.inc.php.example' to 'mconfig.inc.php' and ".
+    "edit it as needed.\n");
+}
+
 require_once "mconfig.inc.php";
 require_once "msite.inc.php";
 
--- a/index.php	Thu Nov 05 18:55:40 2015 +0200
+++ b/index.php	Thu Nov 05 19:11:40 2015 +0200
@@ -4,6 +4,9 @@
 // Main HTML page wrapper
 // (C) Copyright 2012-2015 Tecnic Software productions (TNSP)
 //
+if (!file_exists("mconfig.inc.php"))
+  die("Missing site configuration file.\n");
+
 require_once "mconfig.inc.php";
 require_once "msite.inc.php";
 require_once "msession.inc.php";
--- a/managedb.php	Thu Nov 05 18:55:40 2015 +0200
+++ b/managedb.php	Thu Nov 05 19:11:40 2015 +0200
@@ -4,6 +4,14 @@
 // FAPWeb Database management utility
 // (C) Copyright 2012-2015 Tecnic Software productions (TNSP)
 //
+if (!file_exists("mconfig.inc.php"))
+{
+  die(
+    "ERROR: Missing site configuration file. Please copy ".
+    "'mconfig.inc.php.example' to 'mconfig.inc.php' and ".
+    "edit it as needed.\n");
+}
+
 require_once "mconfig.inc.php";
 require_once "msite.inc.php";
 require_once "dbdefs.inc.php";