From dc27f58e9af4233dac32c6c3f6df7772b4e3004c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no> Date: Mon, 3 Mar 2008 12:42:59 +0000 Subject: [PATCH] give decent error message when config file does not exists git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@343 44740490-163a-0410-bde0-09ae8108e29a --- lib/SimpleSAML/Configuration.php | 3 +++ www/_include.php | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/SimpleSAML/Configuration.php b/lib/SimpleSAML/Configuration.php index 39f9e1b7b..374bb76a8 100644 --- a/lib/SimpleSAML/Configuration.php +++ b/lib/SimpleSAML/Configuration.php @@ -30,6 +30,9 @@ class SimpleSAML_Configuration { } private function loadConfig() { + if (!file_exists($this->configpath . '/config.php')) { + echo 'You have not yet created a configuration file. [ <a href="http://rnd.feide.no/content/installing-simplesamlphp#id405868">simpleSAMLphp installation manual</a> ]'; + } require_once($this->configpath . '/config.php'); $this->configuration = $config; } diff --git a/www/_include.php b/www/_include.php index e1322e90e..4be2ad401 100644 --- a/www/_include.php +++ b/www/_include.php @@ -26,7 +26,8 @@ ini_set('include_path', $path); require_once('SimpleSAML/Configuration.php'); -SimpleSAML_Configuration::init(dirname(dirname(__FILE__)) . '/config'); +$configdir = dirname(dirname(__FILE__)) . '/config'; +SimpleSAML_Configuration::init($configdir); -- GitLab