From 73b7795bc0b232491de35dd91ad9ea86ad34eae8 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 18 Apr 2019 23:17:24 +1000 Subject: [PATCH] Fixes #21 - Undefined variable: _SESSION --- htdocs/index.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/index.php b/htdocs/index.php index 56d8676..e5d92ea 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -57,6 +57,11 @@ if (defined('CONFDIR')) else $app['config_file'] = 'config.php'; +if (! is_readable($app['config_file'])) { + if (ob_get_level()) ob_end_clean(); + die(sprintf("Missing configuration file %s - have you created it?",$app['config_file'])); +} + # Make sure this PHP install has session support if (! extension_loaded('session')) error('

Your install of PHP appears to be missing php-session support.

Please install php-session support before using phpLDAPadmin.
(Dont forget to restart your web server afterwards)

','error',null,true);