Try catching more errors into zendphp.log

This commit is contained in:
Martin Konecny 2012-09-06 14:01:54 -04:00
parent a941743ed7
commit acf06e289f
2 changed files with 20 additions and 23 deletions

View file

@ -34,19 +34,25 @@ if (file_exists('/usr/share/php/libzend-framework-php')) {
/** Zend_Application */
require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
date_default_timezone_set('UTC');
require_once (APPLICATION_PATH."/logging/Logging.php");
Logging::setLogPath('/var/log/airtime/zendphp.log');
$sapi_type = php_sapi_name();
if (substr($sapi_type, 0, 3) == 'cli') {
set_include_path(APPLICATION_PATH . PATH_SEPARATOR . get_include_path());
require_once("Bootstrap.php");
} else {
$application->bootstrap()
->run();
// Create application, bootstrap, and run
try {
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
$sapi_type = php_sapi_name();
if (substr($sapi_type, 0, 3) == 'cli') {
set_include_path(APPLICATION_PATH . PATH_SEPARATOR . get_include_path());
require_once("Bootstrap.php");
} else {
$application->bootstrap()->run();
}
} catch (Exception $e) {
Logging::info($e->getMessage());
}