Uh oh!
There was an error while loading. Please reload this page.
support sapi options php_ini_ignore, php_ini_ignore_cwd - #1391
Conversation
dunglas
commented
Feb 19, 2025
Could you give us more info about your use case? Apache+mod_php, which is more similar to FrankenPHP than FPM, seems to behave as FrankenPHP. I also find it convenient (and it was requested by users) to read a php.ini file in the current working directory. It's confusing for FPM because FPM is generally not started from the main app directory, but as FrankenPHP is a single binary starting a single process, it's quite expected. Generally speaking, we try to keep the number of options low and to make the tool defaults the most user-friendly possible. |
bashkarev
commented
Feb 19, 2025
We are trying to use FrankenPHP as a library to integrate Go and PHP applications. Since the application may run in uncontrolled environments, we want to completely disable php.ini discovery and explicitly define the configuration at startup. I was also working on changes to specify the ini explicitly, but I noticed that this functionality is already partially implemented in this PR. |
dunglas
commented
Feb 19, 2025
Ok that's a valid use case! |
bashkarev
commented
Feb 20, 2025
That’s probably possible. But disabling php.ini discovery would also be useful for static builds. |
This PR adds support for php_ini_ignore and php_ini_ignore_cwd while maintaining the current behavior.
However, I suggest changing the default value of php_ini_ignore_cwd to true, similar to how FPM handles it (reference).
This change would improve consistency with FPM and ensure that php.ini is not loaded based on the current working directory by default.