Hi,
I have following error coming from $this->bootstrap('FrontController');
calls in Bootstrap.php.
Fatal error: Uncaught exception 'Zend_Application_Bootstrap_Exception' with
message 'Resource matching "frontcontroller" not found' in
/home/_library_unstable/Zend/Application/Bootstrap/Base.php:518 Stack trace:
#0 /home/_library_unstable/Zend/Application/Bootstrap/Base.php(460):
Zend_Application_Bootstrap_Base->_executeResource('FrontController') #1
/home/_library_unstable/Zend/Application/Bootstrap/Base.php(418):
Zend_Application_Bootstrap_Base->_bootstrap('FrontController') #2
/home/_applications/apumatti/Bootstrap.php(8):
Zend_Application_Bootstrap_Base->bootstrap('FrontController') #3
/home/_library_unstable/Zend/Application/Bootstrap/Base.php(503):
Bootstrap->_initControllers() #4
/home/_library_unstable/Zend/Application/Bootstrap/Base.php(453):
Zend_Application_Bootstrap_Base->_executeResource('controllers') #5
/home/_library_unstable/Zend/Application/Bootstrap/Base.php(418):
Zend_Application_Bootstrap_Base->_bootstrap(NULL) #6
/home/_library_unstable/Zend/Application.php(289):
Zend_Application_Bootstrap_Base->boot in
/home/_library_unstable/Zend/Application/Bootstrap/Base.php on line 518
My index.php:
----------------
ini_set("display_errors", 1);
error_reporting(E_ALL);
defined("APPLICATION_PATH") or define("APPLICATION_PATH",
"/home/_applications/myapp");
defined("APPLICATION_ENV") or define("APPLICATION_ENV", "development");
defined("LIBRARY_PATH") or define("LIBRARY_PATH",
"/home/_library_unstable");
defined("APPLICATION_ENV") or define("APPLICATION_ENV", "development");
set_include_path(get_include_path() . PATH_SEPARATOR . LIBRARY_PATH);
require_once "Zend/Application.php";
$app = new Zend_Application(APPLICATION_ENV, array(
"autoloaderNamespaces" => array(
"Zend_", "ZendX_", "ZendExt_"
),
"bootstrap" => APPLICATION_PATH . "/Bootstrap.php",
));
$app->bootstrap();
$app->run();
And my Bootstrap.php:
---------------------------
class Bootstrap extends Zend_Application_Bootstrap_Base
{
protected function _initControllers()
{
$this->bootstrap('FrontController'); // << Error
$this->frontController->addModuleDirectory(APPLICATION_PATH .
"/modules");
}
/*protected function _initRequest()
{
$this->bootstrap('FrontController'); // << Error
$this->request = new Zend_Controller_Request_Http;
$this->frontController->setRequest($this->request);
return $this;
} */
protected function _initHelpers(array $options = array())
{
Zend_Controller_Action_HelperBroker::addHelper(new
ZendExt_Controller_Action_Helper_ResourceLoader()); // Copy of Matthew's
pastebin resourceloader
}
protected function _initModules()
{
$this->bootstrapControllers();
$modules = $this->frontController->getControllerDirectory();
foreach ($modules as $module => $dir) {
if ('default' == $module) {
continue;
}
$bootstrapFile = dirname($dir) . '/Bootstrap.php';
$class = ucfirst($module) . '_Bootstrap';
if (Zend_Loader::loadFile('Bootstrap.php', dirname($dir))
&& class_exists($class)
) {
$bootstrap = new $class($this);
$bootstrap->bootstrap();
}
}
return $this;
}
public function run()
{
$this->frontController->dispatch();
}
}
And I have modular directory structure:
application
modules
default
controllers
views
modulex
controllers
models
views
etc...
Any clues?
br, Marko
--
View this message in context:
http://www.nabble.com/Zend_Application-FrontController-bootstrap-problem-tp22824433p22824433.html
Sent from the Zend Framework mailing list archive at Nabble.com.