Disculpa la molesti GatorV, mis scripts que tengo son:
index.php
Código PHP:
<?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';
//$front = Zend_Controller_Front::getInstance();
//$front->setControllerDirectory('../application/controllers');
//$frontController->setBaseUrl('/localhost/noticias2');
//$front->throwExceptions(true);
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap()
->run();
y en el bootstrap.php tengo
Código PHP:
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
private $_acl = null;
protected function _initAutoload() {
$modelLoader = new Zend_Application_Module_Autoloader(array(
'namespace' => '',
'basePath' => APPLICATION_PATH.'/modules/default'));
if(Zend_Auth::getInstance()->hasIdentity()) {
Zend_Registry::set('level', Zend_Auth::getInstance()->getStorage()->read()->level);
} else {
Zend_Registry::set('level', 'guests');
}
$this->_acl = new Model_ControlAcl;
$this->_auth = Zend_Auth::getInstance();
$fc = Zend_Controller_Front::getInstance();
$fc->registerPlugin(new Plugin_AccessCheck($this->_acl));
return $modelLoader;
}
function _initViewHelpers() {
$this->bootstrap('layout');
$layout = $this->getResource('layout');
$view = $layout->getView();
$view->setHelperPath(APPLICATION_PATH.'/helpers', '');
$view->doctype('HTML4_STRICT');
$view->headMeta()->appendHttpEquiv('Content-type', 'text/html;charset=utf-8')
->appendName('description', 'Using view helpers in Zend_view');
$view->headTitle()->setSeparator(' - ')
->headTitle('Control Operativo v.0.4 - AVM Aduanera SAC');
$navContainerConfig = new Zend_Config_Xml(APPLICATION_PATH . '/configs/navigation.xml', 'nav');
$navContainer = new Zend_Navigation($navContainerConfig);
$view->navigation($navContainer)->setAcl($this->_acl)->setRole(Zend_Registry::get('level'));
$view = new Zend_View();
$view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
/*$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);*/
}
protected function _initLocale(){
$locale = new Zend_Locale();
$locale->setLocale('es_ES');
Zend_Registry::set('Zend_Locale', $locale); // la registramos para su futuro uso en el resto de la aplicación
}
protected function _initPlugins(){
$this->bootstrap('frontController');
$plugin = new My_LayoutPlugin();
$this->frontController->registerPlugin($plugin);
$this->frontController->throwExceptions(true);
}
}
es en este en donde puse lo q me señalaste(ultima linea de codigo):
Código PHP:
$this->frontController->throwExceptions(true);
Estara bien ahi??
con eso se resolverá el problema y retornará a la pantalla inicial es decir al login??
Espero tu ayuda gracias.