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]> 

Attachment: pgpzAAuHmjiKu.pgp
Description: PGP signature

Reply via email to