You might want to post your UserController. Does it throw the error on the first request only? or does the error toggle back and forth when you keep pressing F5?
What do you mean?The controller is not always the same, but can be any one.
Hi,
I get a error message sporadicly which looks like this:
Invalid controller specified (user)#0 /opt/ZendFramework-1.8.3/library/Zend/Controller/Front.php(945): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 /opt/umcm/application/bootstrap.php(81): Zend_Controller_Front->dispatch() #2 /opt/umcm/public/index.php(8): unknown() #3 {main}
The controller is not always the same, but can be any one.
I was using version 1.7 of the framework and upgraded to 1.8. But i still have this issue.
I have also tried on different servers with the same result.
When i refresh the page, the error disapears.
Any advise?
You might want to post your UserController. Does it throw the error on the first request only? or does the error toggle back and forth when you keep pressing F5?
What do you mean?The controller is not always the same, but can be any one.
The error is only thrown in the first request.
It is happening in all controllers and not just one.
Try checking the request with something like Live HTTP Headers (firefox plugin) and see if there is a difference between the first request that is failing and the second which isn't. Might give some insight into the cause.
In my experience, if there is an inconsistency between two apparently identical requests it is usually something to do with cookies![]()
Brenton Alker
PHP Developer - Brisbane, Australia
blog.tekerson.com | twitter.com/tekerson | brenton.mp
That's a good point. I will do that. :-)
I just went through my controllers, and i forgot that the controllers are extending one of my own, which includes some login stuff.
Prehaps it's the session/cookie thing which fails.
[PHP]
<?php
require_once 'Zend/Controller/Action.php';
class Cbox_Controller_Action extends Zend_Controller_Action
{
protected $_isLoggedIn = false;
public function preDispatch()
{
try {
$storage = new Zend_Auth_Storage_Session();
$userdata = $storage->read();
if($userdata){
$this->_isLoggedIn = true;
$this->view->assign("userdata", $userdata);
}
} catch (Exception $e) {
echo $e->getMessage();
}
}
}
[/PHP]
I recorded the request when it failed, and there are a small diff between the working and non working request.
The first one failed and the second one is OK. The third one failed again.