diff --git a/airtime_mvc/application/Bootstrap.php b/airtime_mvc/application/Bootstrap.php index dc4776ee5..8666d60bf 100644 --- a/airtime_mvc/application/Bootstrap.php +++ b/airtime_mvc/application/Bootstrap.php @@ -1,14 +1,4 @@ registerPlugin(new RabbitMqPlugin()); + /* The bootstrap class should only be used to initialize actions that return a view. Actions that return JSON will not use the bootstrap class! */ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap diff --git a/airtime_mvc/application/models/User.php b/airtime_mvc/application/models/User.php index 6753f34f0..5f68cc240 100644 --- a/airtime_mvc/application/models/User.php +++ b/airtime_mvc/application/models/User.php @@ -304,8 +304,6 @@ class Application_Model_User $sql = $sql . " AND ".$like; } - //echo $sql.PHP_EOL; - //print_r($params); $sql = $sql ." ORDER BY login"; return Application_Common_Database::prepareAndExecute($sql, $params, "all"); diff --git a/airtime_mvc/public/index.php b/airtime_mvc/public/index.php index 062e2aed2..78f94c489 100644 --- a/airtime_mvc/public/index.php +++ b/airtime_mvc/public/index.php @@ -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()); } -