Ver 4.1.2 - Phalcon is trying to load subdirectory as Controller #15495
-
Hi, Installed phalcon 4.1.2 in windows using Uniform Server on PHP 7.4 . I am not able to get it work. For testing with "hello world" code , On loading "http://localhost/phalcon4" , I get following error: If I try same Hello world code on Phalcon 3.4 (installed on PHP 7.1) then it works. I see similar problem faced by someone here : https://forum.phalcon.io/discussion/20211/project-in-a-subdirectory and there was no solution and he was using some "WORKAROUND". In my case, since I have some experience with Phalcon in past (worked on 3.4 in on mid-sized project), all I can see is that Phalcon is thinking "subdirectory" from URL as controller and trying to find controller for it and hence error. Here is my www/phalcon4/.htaccess
Here is .htaccess for www/phalcon4/public
In public/index.php baseUri is set as following:
In past, I have worked on dev setup in subfolder many times, but that was with phalcon 3.x , tried 4.1.2 yesterday first time and still stuck in this problem. In short, my question is : How to make Phalcon 4 to work in subdirectory ? Just in case, phalcon is working on my PHP : |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
First of all, thank you for report.
Editing |
Beta Was this translation helpful? Give feedback.
First of all, thank you for report.
There are few ways to fix this, but as is see, you are using some custom server with built-in apache webserver.
phalcon4
part of request url in line i marked next:/phalcon4
part of request url inindex.php
: