2009/9/28 Sudheer Satyanarayana <[email protected]>:
> Hi,
>
> I am trying to boostrap the application from CLI.
>
> $application = new Zend_Application(
>            APPLICATION_ENV,
>            APPLICATION_PATH . '/configs/application.ini'
>        );
> $application->bootstrap(array('autoload', 'config', 'database'));
>
> The problem is, Zend_Application instantiates the front controller which in
> turn registers the FlashMessenger action helper. This throws the
> Zend_Session exception.
>
> Unit test enabling the session solves the problem.
>
> //require_once 'Zend/Session.php';
> Zend_Session::$_unitTestEnabled = true;
>
> However, it is a quick hack solution. This CLI script runs in the production
> environment. Therefore, I don't want the session to be unit test enabled.
>
> To overcome the problem, I tried to override the method
> _initFrontController(). It doesn't seem to be the correct method name.
>
> Is it possible to disable the front controller? If not, how do I instruct
> the front controller to not register the FlashMessenger action helper?

Your code does look correct, are you doing

$application->run();

If so you dont want that as it starts the dispatch...

If not this could be a bug, by doing boostrap('resource') etc Z_App
should only execute those resources!

>
>
> --
>
> With warm regards,
> Sudheer. S
> Business: http://binaryvibes.co.in, Tech stuff: http://techchorus.net,
> Personal: http://sudheer.net
>
>
>



-- 
----------------------------------------------------------------------
[MuTe]
----------------------------------------------------------------------

Reply via email to