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

Phalcon 4 New Project error

I have created new phalcon project with the name of crudphalcon. But when I tried to test the new project, it gave me error message. CrudphalconController handler class cannot be loaded

0 [internal function]: Phalcon\Mvc\Dispatcher->throwDispatchException('CrudphalconCont...', 2)

1 [internal function]: Phalcon\Dispatcher\AbstractDispatcher->dispatch()

2 C:\xampp\htdocs\crudphalcon\public\index.php(43): Phalcon\Mvc\Application->handle('/crudphalcon/')

3 {main}

edited Jan '20

i don't know if this the best solution but it works for me

change this line in /public/index.php

echo $application->handle($_SERVER['REQUEST_URI'])->getContent();


echo $application->handle($_GET['_url'] ?? '/')->getContent();

also change baseUri in /app/config/config.php to

preg_replace('/public([\/\\\\])index.php$/', '', $_SERVER["PHP_SELF"])

or '/crudphalcon/'