database->adapter, $config->database->options->asArray()); $registry->database_connection = $database_connection; // SESSION Zend_Session::setOptions($config->session->asArray()); Zend_Session::start(); // AUTH $auth = Zend_Auth::getInstance(); $registry->auth = $auth; // MODEL (Table Gateway) ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . '../application/user/models/'); Zend_Db_Table::setDefaultAdapter($database_connection); // VIEW $view = new Zend_View(); $view->setScriptPath('../application/user/views/'); $registry->view = $view; // CONTROLLER $controller = Zend_Controller_Front::getInstance(); $controller->setControllerDirectory('../application/user/controllers') ->setParam('registry', $registry); } catch (Exception $e) { die( 'Setup Exception: ' . $e->getMessage() ); } $controller->returnResponse(true); $response = $controller->dispatch(); if ($response->isException()) { $exceptions = $response->getException(); echo 'Exception Found:
'; print_r($exceptions); } else { $response->sendHeaders(); $response->outputBody(); }