We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

IndexController handler class cannot be loaded

Excuse me, how to solve this problem


Show your index.php and IndexController.php. Also your directory structure.


if i am right, which i suspect i am. is your controller in a namespace?


it'd be nice if you can post your code so we can have more confidence to figure it out. Perhaps it's the acl create an infinite loop (if you're using acl).

Not sure if this was the same issue the above was having, But after registering my namespaces i missed the $di injection fo the namespaces.

$di->set('dispatcher', function () {
    $dispatcher = new Dispatcher();
    return $dispatcher;