blob: b631d500c175760bd93a6c5c02c4cb634a8ee344 (
plain) (
tree)
|
|
<?php
/*
* Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
* This program is free software distributed under the GPL version 2.
* See http://gpl.openslx.org/
*
* If you have any feedback please consult http://feedback.openslx.org/ and
* send your suggestions, praise, or complaints to feedback@openslx.org
*
* 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'));
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
// Create application
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 {
Zend_Session::setOptions(array('cookie_lifetime' => null));
Zend_Session::setOptions(array('gc_maxlifetime' => '1800'));
}
// Run bootstrap
$application->bootstrap()
->run();
|