cphalcon: [BUG]: v4 Regression - localhost/project/ - trouble with Application->handle
Config
Windows 10 - Wamp - PHP 7.2.18
Description
With Phalcon V3, I can have multiple project at the root of the server like : http://localhost/project/ http://localhost/project2/ … With Phalcon V4, I get this error:
HelloWorld2Controller handler class cannot be loaded
#0 [internal function]: Phalcon\Mvc\Dispatcher->throwDispatchException('HelloWorld2Cont...', 2)
#1 [internal function]: Phalcon\Dispatcher\AbstractDispatcher->dispatch()
#2 E:\wamp64\www\hello_world2\public\index.php(45): Phalcon\Mvc\Application->handle('/hello_world2/')
#3 {main}
Little hack
To solve temporary this issue, I updated the file public/index.php:
echo $application->handle($_SERVER['REQUEST_URI'])->getContent();
to
echo $application->handle(str_replace('hello_world2/','',$_SERVER['REQUEST_URI']))->getContent();
But, It’s not very great.
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 19 (17 by maintainers)
I will discuss this with the team to decide if we need to allow null as well.
Good catch. I think we need to allow null on the handle. Let me double check and patch that.