From d5afeab484e8add0c84d2d5600d57eb7eab80ab0 Mon Sep 17 00:00:00 2001 From: slerena Date: Wed, 8 Aug 2007 18:36:18 +0000 Subject: [PATCH] 2007-08-08 Sancho Lerena * reporting/stat_win.php, general/noaccess.php: Fixed problem with paths outside index.php call. * index.php: Some fixes in checks for problems in startup and needed files. * general/*: Better layout of problems, some minimal fixes. New file added to warn user of missed config.php file. Better treatment of fails. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@596 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 13 +++-- pandora_console/general/error_install.php | 24 ++++------ pandora_console/general/error_noconfig.php | 55 ++++++++++++++++++++++ pandora_console/general/error_perms.php | 25 +++++----- pandora_console/general/footer.php | 18 ++++--- pandora_console/general/header.php | 12 ++--- pandora_console/index.php | 12 +++-- 7 files changed, 111 insertions(+), 48 deletions(-) create mode 100644 pandora_console/general/error_noconfig.php diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 270ab82000..43836900dd 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,8 +1,15 @@ +2007-08-08 Sancho Lerena + + * reporting/stat_win.php, general/noaccess.php: Fixed problem with + paths outside index.php call. + + * index.php: Some fixes in checks for problems in startup and needed files. + + * general/*: Better layout of problems, some minimal fixes. New file added to + warn user of missed config.php file. Better treatment of fails. + 2007-08-06 Sancho Lerena - * reporting/stat_win.php, general/noaccess.php: Fixed problem with - paths outside index.php call. - * pandoradb.sql, alert_manager.php: Alert time support uses TIME format instead numeric (changes requested by esanchezm). diff --git a/pandora_console/general/error_install.php b/pandora_console/general/error_install.php index 88013ae8c9..cbf8302e55 100644 --- a/pandora_console/general/error_install.php +++ b/pandora_console/general/error_install.php @@ -1,15 +1,15 @@ -Pandora FMS - <?php echo $lang_label["header_title"]; ?> +Pandora FMS - The Free Monitoring System - Console Error @@ -40,7 +36,7 @@ if (file_exists("include/languages/language_".$language_code.".php")) { - +

Installer active

diff --git a/pandora_console/general/error_noconfig.php b/pandora_console/general/error_noconfig.php new file mode 100644 index 0000000000..ff44dcdc0d --- /dev/null +++ b/pandora_console/general/error_noconfig.php @@ -0,0 +1,55 @@ + + + + +Pandora FMS - The Free Monitoring System - Console error + + + + + + + + + + + + +
+
+

No configuration file found

+
+
+ + +
+
+

Pandora FMS Console cannot find include/config.php or this file has invalid + permissiones and HTTP server cannot read it. Please read documentation to fix this problem.
+
+
+ + diff --git a/pandora_console/general/error_perms.php b/pandora_console/general/error_perms.php index a5c0537f54..160f33e407 100644 --- a/pandora_console/general/error_perms.php +++ b/pandora_console/general/error_perms.php @@ -1,15 +1,15 @@ -Pandora FMS - <?php echo $lang_label["header_title"]; ?> +Pandora FMS - The Free Monitoring System - Console error @@ -40,7 +37,7 @@ if (file_exists("include/languages/language_".$language_code.".php")) { - +

Bad permission for include/config.php

diff --git a/pandora_console/general/footer.php b/pandora_console/general/footer.php index 1cd329ae2e..618c9df62c 100644 --- a/pandora_console/general/footer.php +++ b/pandora_console/general/footer.php @@ -1,13 +1,15 @@ "; echo ' Pandora FMS '.$pandora_version.' Build '.$build_version.'
'. diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index 463f92a967..698862b126 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -1,15 +1,15 @@ -// Additions to code for Pandora FMS 1.2 graph code +// Please see http://pandora.sourceforge.net for full contribution list // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -25,7 +24,7 @@ // Pandora FMS 1.x uses Pear Image::Graph code //Pandora Version, if not defined here it would take from config.php -$build_version="PC070806"; +$build_version="PC070808"; $pandora_version="v1.3-dev"; global $build_version; global $pandora_version; @@ -37,7 +36,7 @@ if ($develop_bypass != 1){ // If no config file, automatically try to install if (! file_exists("include/config.php")){ if (!file_exists("install.php")){ - include "general/error_install.php"; + include ("general/error_noconfig.php"); exit; } else include ("install.php"); @@ -59,6 +58,11 @@ if ($develop_bypass != 1){ } } +if ((! file_exists("include/config.php")) OR (! is_readable("include/config.php"))){ + include ("general/error_noconfig.php"); + exit; +} + // Real start session_start(); include "include/config.php";