Welcome Guest, Not a member yet? Register   Sign In
FcgidFixPathinfo 1 breaks routing
#1

(This post was last modified: 11-06-2023, 06:31 AM by sk757a.)

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.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB