0

I've added the Propel ORM to my Zend Framework project.
The following files are under my /application/configs folder:

  • application.ini
  • build.properties
  • classmap-gentsefeesten-conf.php
  • gentsefeesten-conf.php
  • runtime-conf.xml
  • schema.xml

Under /application/models I have:

  • gentsefeesten
    • map
    • om
      query's

I work with modules so I have a modules folder with two folders in it (my modules).

In my "index.php" file I've added the following: (third rule)

set_include_path(implode(PATH_SEPARATOR, array(
  realpath(APPLICATION_PATH . '/../library'),
  realpath(APPLICATION_PATH . '/models'),//propel
  get_include_path(),
)));

So the application gets my models in my models folder.

But I always get the following error :

Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (error)' in /Applications/MAMP/htdocs/GentseFeesten/library/Zend/Controller/Dispatcher/Standard.php:248 

Stack trace: 
#0 /Applications/MAMP/htdocs/GentseFeesten/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) 
#1 /Applications/MAMP/htdocs/GentseFeesten/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch() 
#2 /Applications/MAMP/htdocs/GentseFeesten/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run() 
#3 /Applications/MAMP/htdocs/GentseFeesten/public/index.php(27): Zend_Application->run() 
#4 {main} Next exception 'Zend_Controller_Exception' with message 'Invalid controller specified (error)

#0 /Applications/MAMP/htdocs/GentseFeesten/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Re in /Applications/MAMP/htdocs/GentseFeesten/library/Zend/Controller/Plugin/Broker.php on line 336
4

1 回答 1

1

It seems that you don't have access to the problem, because exceptions are catched by Zend_Controller_Plugin_ErrorHandler. You have this exception because you have no ErrorController, and the handler is trying to call it.

You may have the exception details in your error logs. In order to watch the error message., you can put this code in your bootstrap :

$front = Zend_Controller_Front::getInstance();
$front->throwExceptions( false );

or in the application.ini :

resources.frontController.throwexceptions = false

(very useful in developpement configuration)

However, if you use the errorHanlder, you should implement an ErrorController

于 2013-08-20T11:27:51.367 回答