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.

Controller handler class cannot be loaded en Phalcon 4

I created a project using the development tools named rema. When I enter the index

http://localhost/rema/

I get the error message

RemaController handler class cannot be loaded
#0 [internal function]: Phalcon\Mvc\Dispatcher->throwDispatchException('RemaController ...', 2)
#1 [internal function]: Phalcon\Dispatcher\AbstractDispatcher->dispatch()
#2 C:\xampp\htdocs\rema\public\index.php(43): Phalcon\Mvc\Application->handle('/rema/')
#3 {main}

But rema is the name of the project not a controller. In the version of Phalcon 3 I did not have this message. How can i correct it?

In v4, there were changes related to sub-directory detection. In index.php, you need to change value inside handle() method.



80.7k

THIS IS MY FILE <?php $router = $di->getRouter(); // Define your routes here $router->handle($_SERVER['REQUEST_URI']);



80.7k

THIS IS MY FILE



8.4k
Accepted
answer

your issue is because your phalcon project is not on root folder

you can find the solution here