Zend Framework Forum

Go Back   Zend Framework Forum > Zend Framework Components > Model-View-Controller (MVC)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-26-2009, 01:47 PM
Junior Member
 
Join Date: Mar 2009
Posts: 4
Default Invalid controller specified, disapear after F5

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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-26-2009, 05:51 PM
Member
 
Join Date: Oct 2008
Posts: 65
Default

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?

Quote:
The controller is not always the same, but can be any one.
What do you mean?
__________________
Mark Belanger
http://www.shoreboat.com | http://twitter.com/shoreboat
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-02-2009, 12:03 PM
Junior Member
 
Join Date: Mar 2009
Posts: 4
Default

The error is only thrown in the first request.
It is happening in all controllers and not just one.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-03-2009, 12:09 AM
Senior Member
 
Join Date: Jul 2008
Posts: 288
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-03-2009, 09:28 AM
Junior Member
 
Join Date: Mar 2009
Posts: 4
Default

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]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-03-2009, 10:54 AM
Junior Member
 
Join Date: Mar 2009
Posts: 4
Default

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.
Attached Files
File Type: txt livehttpheaders.txt (2.8 KB, 3 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT. The time now is 02:17 AM.


Designed by: Miner Skinz Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0