fix 500 error on missing config.php

This commit is contained in:
Andrew Dolgov 2011-12-12 15:19:34 +04:00
parent fe6d5185d4
commit 9da0e4a2ff
2 changed files with 9 additions and 3 deletions

View File

@ -1,15 +1,15 @@
<?php <?php
require_once "functions.php"; require_once "functions.php";
define('EXPECTED_CONFIG_VERSION', 23);
define('SCHEMA_VERSION', 86);
if (!file_exists("config.php")) { if (!file_exists("config.php")) {
print "<b>Fatal Error</b>: You forgot to copy print "<b>Fatal Error</b>: You forgot to copy
<b>config.php-dist</b> to <b>config.php</b> and edit it.\n"; <b>config.php-dist</b> to <b>config.php</b> and edit it.\n";
exit; exit;
} }
define('EXPECTED_CONFIG_VERSION', 23);
define('SCHEMA_VERSION', 86);
require_once "config.php"; require_once "config.php";
require_once "sanity_config.php"; require_once "sanity_config.php";

View File

@ -1,4 +1,10 @@
<?php <?php
if (!file_exists("config.php")) {
print "<b>Fatal Error</b>: You forgot to copy
<b>config.php-dist</b> to <b>config.php</b> and edit it.\n";
exit;
}
set_include_path(get_include_path() . PATH_SEPARATOR . "include"); set_include_path(get_include_path() . PATH_SEPARATOR . "include");
require_once "functions.php"; require_once "functions.php";