summaryrefslogblamecommitdiffstats
path: root/public/index.php
blob: bc107377daefea02dd21c713993cb79ae819937c (plain) (tree)
1
2
3
4
5
6
7
8
     

                                       
                                                                               


                                 
                                                                                                     


                                               

                                           




                                    
                     
                                    

                                             
  

                       
                                                     
                                                                   
     
                                                                     

                
                         
        
<?php
// 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
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);

// Set Session lifetime
if(stristr($_SERVER['HTTP_USER_AGENT'],'prebootGUI'))
	Zend_Session::setOptions(array('cookie_lifetime' => null));
else 
	Zend_Session::setOptions(array('cookie_lifetime' => '3600'));

// Run bootstrap
$application->bootstrap()
->run();