FcgidFixPathinfo 1 breaks routing - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31) +--- Thread: FcgidFixPathinfo 1 breaks routing (/showthread.php?tid=88781) |
FcgidFixPathinfo 1 breaks routing - sk757a - 11-06-2023 Some time ago, I decided to play around with a fresh version of the framework. I ran into a problem when I tried to run the app on apache with mod_fcgid The application was deployed to a subdirectory using the Alias /ci4app/ "${SRVROOT}/htdocs/ci4app/public/", but even Home::index returned a strange error 404 Can't find a route for 'get: ci4app/'. The presence of a subdirectory name as a route indicated that the situation was far from normal. Setting any baseURL value didn't change anything. I got and compared dumps of $_SERVER and SiteURI state on the server with problem (Apache mod_fcgid Windows) and another one (Apache mod_proxy_fcgi php-fpm Linux) without. In addition to the predicted differences in SiteURI->routePath, the value of $_SERVER['SCRIPT_NAME'] caught my attention. Its value 'C:/ci4app/index.php' was completely incorrect. After that, I found the similar question on Stack Overflow and finally, a problematic setting FcgidFixPathinfo 1 in the configuration of mod_fcgid. Obviously, I set this parameter myself a long time ago. I hope this experience will help someone. |