summaryrefslogtreecommitdiffstats
path: root/public/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'public/index.php')
-rw-r--r--public/index.php20
1 files changed, 13 insertions, 7 deletions
diff --git a/public/index.php b/public/index.php
index 7934852..b631d50 100644
--- a/public/index.php
+++ b/public/index.php
@@ -9,6 +9,7 @@
*
* General information about OpenSLX can be found at http://openslx.org/
*/
+
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
@@ -27,15 +28,20 @@ set_include_path(implode(PATH_SEPARATOR, array(
require_once 'Zend/Application.php';
// Create application
-$application = new Zend_Application(
- APPLICATION_ENV,
- APPLICATION_PATH . '/configs/application.ini'
-);
+try {
+ $application = new Zend_Application(
+ APPLICATION_ENV,
+ APPLICATION_PATH . '/configs/application.ini'
+ );
+} catch (Zend_Config_Exception $e) {
+ echo "<h2>application.ini not found</h2>";
+ echo "<br/> make sure you copied and modified <code>application.ini.dist</code> to <code>application.ini</code>";
+}
// Set Session lifetime
-if(stristr($_SERVER['HTTP_USER_AGENT'], 'prebootGUI'))
- { Zend_Session::setOptions(array('cookie_lifetime' => null)); }
-else {
+if(stristr($_SERVER['HTTP_USER_AGENT'], 'prebootGUI')) {
+ Zend_Session::setOptions(array('cookie_lifetime' => null));
+} else {
Zend_Session::setOptions(array('cookie_lifetime' => null));
Zend_Session::setOptions(array('gc_maxlifetime' => '1800'));
}