diff --git a/airtime_mvc/application/common/Database.php b/airtime_mvc/application/common/Database.php index 96e6e6770..9977278c0 100644 --- a/airtime_mvc/application/common/Database.php +++ b/airtime_mvc/application/common/Database.php @@ -1,6 +1,6 @@ prepare($sql); foreach ($paramValueMap as $param => $v) { diff --git a/airtime_mvc/public/index.php b/airtime_mvc/public/index.php index e496f133c..062e2aed2 100644 --- a/airtime_mvc/public/index.php +++ b/airtime_mvc/public/index.php @@ -27,7 +27,7 @@ set_include_path(APPLICATION_PATH . '/models' . PATH_SEPARATOR . get_include_pat set_include_path(APPLICATION_PATH . '/controllers/plugins' . PATH_SEPARATOR . get_include_path()); //Zend framework -if (file_exists('/usr/share/php/libzend-framework-php')){ +if (file_exists('/usr/share/php/libzend-framework-php')) { set_include_path('/usr/share/php/libzend-framework-php' . PATH_SEPARATOR . get_include_path()); } @@ -39,5 +39,14 @@ $application = new Zend_Application( APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini' ); -$application->bootstrap() + +$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(); +} + +