]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - index.php
Added the new pinghandler to the stopdaemons script and improved the behaviour and...
[quix0rs-gnu-social.git] / index.php
index 914ba5bde1453e2c21122a0766e8fc95fd8ac6cb..dae1ae75145e127a906b64a488f5248ebae05ae8 100644 (file)
--- a/index.php
+++ b/index.php
@@ -43,7 +43,11 @@ function handleError($error)
         return;
     }
 
-    common_log(LOG_ERR, "PEAR error: " . $error->getMessage());
+    $logmsg = "PEAR error: " . $error->getMessage();
+    if(common_config('site', 'logdebug')) {
+        $logmsg .= " : ". $error->getDebugInfo();
+    }
+    common_log(LOG_ERR, $logmsg);
     $msg = sprintf(_('The database for %s isn\'t responding correctly, '.
                      'so the site won\'t work properly. '.
                      'The site admins probably know about the problem, '.
@@ -61,6 +65,14 @@ function main()
 {
     global $user, $action;
 
+    if (!_have_config()) {
+        $msg = sprintf(_("No configuration file found. Try running ".
+                         "the installation program first."));
+        $sac = new ServerErrorAction($msg);
+        $sac->showPage();
+        return;
+    }
+
     // For database errors
 
     PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'handleError');