Hello
I have run into this same issue and am not sure what to do. I am using the
latest version from svn 2443.
*Fatal error*: Maximum execution time of 30 seconds exceeded in *
/home/mike/workspace/domain.com/Zend-6.0
/library/Zend/Controller/Dispatcher.php* on line *566
*The problem begins in the dispatch() method on this line:
$classLoaded = $this->loadClass($moduleClass,
$this->getDispatchDirectory());
A request for the homepage of domain.com results in the following call:
loadClass("_IndexController",
"/home/mike/workspace/domain.com/controllers");
My bootstrap looks like this.
$router = new Zend_Controller_RewriteRouter();
$request = new Zend_Controller_Request_Http();
$path = array (
'default' => dirname(__FILE__) . "/controllers",
'admin' => dirname(__FILE__) . "/controllers/admin",
);
$controller = Zend_Controller_Front::getInstance();
$controller->setControllerDirectory($path);
$controller->setParam('useModules', true);
$controller->setRequest($request);
$controller->setRouter($router);
try {
$controller->dispatch();
} catch( Zend_Exception $e ) {
echo "Could not dispatch.";
}
On 12/13/06, Paolo Casarini <[EMAIL PROTECTED]> wrote:
Hi Andries,
On Wednesday, December 13, 2006, 4:05:51 PM, Andries Seutens wrote:
> Paolo Casarini schreef:
>> Hi,
>>
>> I'm working with the 2282 revision of the framework and I'm trying
>> to use the RewriteRouter with the 'useModules' param set to true.
>>
>> My index.php is:
>> -----------------------
>> $config = Zend::registry('config');
>> $router = new Zend_Controller_RewriteRouter(array('useModules' =>
true));
>> $ctrl = Zend_Controller_Front::getInstance();
>> $ctrl->setRouter($router);
>> $ctrl->setControllerDirectory($config->zf->controllerDirectory);
>> $ctrl->setBaseUrl($config->webhost->baseurl);
>> $response = $ctrl->dispatch();
>> -----------------------
>>
>> My controllers dir is
>>
>> \Application
>> \Controllers
>> IndexController.php // echo "Welcome on IndexController"
>> \Main
>> IndexController.php // echo "Welcome on MainController"
>>
>>
>> With the URL http://my.space.com/ the output is 'Welcome on
>> IndexController'.
>>
>> With the URL http://my.space.com/main/index the output is
>> "Fatal error: Maximum execution time of 180 seconds exceeded in
>> /home/devel/enabu/library/Zend/Controller/Dispatcher.php on line 563"
>>
>> Where I'm wrong?
>>
>> Thanx,
>> Paolo.
>>
> Hello,
> Looking at your above code, it looks like you are only setting a single
> controller path:
$ctrl->setControllerDirectory($config->zf->controllerDirectory);
> If you work with the modular approach and your controllers are
> stored in multiple folders, you should provide an array with
> controllers, where the key is the name of the module.
> eg: $modules = array(
> 'front' => './application/controllers',
> 'back' => './application/controllers/back/'
> );
$Controller->$Controller->>setControllerDirectory($modules); // FIFO
> However, I don't understand why you are ending up with the fatal error?
I've changed my
$ctrl->setControllerDirectory($config->zf->controllerDirectory);
line with
$ctrl->>setControllerDirectory($config->zf->controllerDirectory);
$modules = array(
'front' => $config->zf->controllerDirectory,
'main' => $config->zf->controllerDirectory . "/Main"
);
$ctrl->setControllerDirectory($modules);
Now also http://my.space.com/ url results in a
"Fatal error: Maximum execution time of 180 seconds exceeded in
/home/devel/enabu/library/Zend/Controller/Dispatcher.php on line 563"
Paolo.
--
GPG key: 1024D/9C5AE886 2004-10-21 Paolo Casarini <[EMAIL PROTECTED]>
--
Michael DePetrillo
[EMAIL PROTECTED]
Mobile: (858) 761-1605
AIM: klassicd