+ Reply to Thread
Results 1 to 6 of 6

Thread: Invalid controller specified, disapear after F5

  1. #1
    cbox is offline Junior Member
    Join Date
    Mar 2009
    Posts
    5

    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?

  2. #2
    mark2331 is offline Senior Member
    Join Date
    Oct 2008
    Location
    Los Angeles, CA
    Posts
    109

    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?

    The controller is not always the same, but can be any one.
    What do you mean?

  3. #3
    cbox is offline Junior Member
    Join Date
    Mar 2009
    Posts
    5

    Default

    The error is only thrown in the first request.
    It is happening in all controllers and not just one.

  4. #4
    Tekerson is offline 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

  5. #5
    cbox is offline Junior Member
    Join Date
    Mar 2009
    Posts
    5

    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]

  6. #6
    cbox is offline Junior Member
    Join Date
    Mar 2009
    Posts
    5

    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

+ Reply to Thread

Similar Threads

  1. Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (ind
    By manaworqutub@yahoo.com in forum Model-View-Controller (MVC)
    Replies: 2
    Last Post: 06-07-2010, 05:56 AM
  2. Invalid Controller Problem
    By renzki in forum Model-View-Controller (MVC)
    Replies: 2
    Last Post: 11-29-2009, 05:50 PM
  3. Invalid controller specified (favicon.ico)
    By akizdetz in forum Model-View-Controller (MVC)
    Replies: 7
    Last Post: 11-17-2009, 02:56 PM
  4. Invalid controller specified, disapear after F5
    By cbox in forum Model-View-Controller (MVC)
    Replies: 0
    Last Post: 06-26-2009, 01:31 PM
  5. Zend_Controller_Dispatcher_Exception: Invalid controller specified (error)
    By jasonswett in forum Model-View-Controller (MVC)
    Replies: 1
    Last Post: 01-12-2009, 10:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts