summaryrefslogtreecommitdiff
path: root/src/SemanticScuttle/header.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2012-01-25 22:51:11 +0100
committerChristian Weiske <cweiske@cweiske.de>2012-01-25 22:51:11 +0100
commit7b50608138ba2caf4da8aa83300ebf15116cc96d (patch)
tree62387c3f20d68cc1a1c24a135155c987cedbb7f7 /src/SemanticScuttle/header.php
parenta484c992738224f9d78f9df6b0e938e96ebd03f7 (diff)
downloadsemanticscuttle-7b50608138ba2caf4da8aa83300ebf15116cc96d.tar.gz
semanticscuttle-7b50608138ba2caf4da8aa83300ebf15116cc96d.tar.bz2
set proper exit status when config file does not exist
Diffstat (limited to 'src/SemanticScuttle/header.php')
-rw-r--r--src/SemanticScuttle/header.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/SemanticScuttle/header.php b/src/SemanticScuttle/header.php
index 694df54..1f2f12c 100644
--- a/src/SemanticScuttle/header.php
+++ b/src/SemanticScuttle/header.php
@@ -32,18 +32,15 @@ $cfg = new SemanticScuttle_Config();
list($configfile, $defaultfile) = $cfg->findFiles();
if ($defaultfile === null) {
header('HTTP/1.0 500 Internal Server Error');
- die(
- 'No default configuration file config.default.php found.'
+ echo 'No default configuration file config.default.php found.'
. ' This is really, really strange'
- . "\n"
- );
+ . "\n";
+ exit(1);
}
if ($configfile === null) {
header('HTTP/1.0 500 Internal Server Error');
- die(
- 'Please copy "config.php.dist" to "config.php" in data/ folder.'
- . "\n"
- );
+ echo 'Please copy "config.php.dist" to "config.php" in data/ folder.' . "\n";
+ exit(1);
}
set_include_path(
get_include_path() . PATH_SEPARATOR
@@ -58,7 +55,8 @@ if (isset($_GET['unittestMode']) && $_GET['unittestMode'] == 1
) {
if ($allowUnittestMode !== true) {
header('HTTP/1.0 400 Bad Request');
- die("Unittestmode is not allowed\n");
+ echo "Unittestmode is not allowed\n";
+ exit(2);
}
define('HTTP_UNIT_TEST_MODE', true);