go to bug id or search bugs for
The documentation states the following:
php.ini is searched for in these locations (in order):
◦ Current working directory (except CLI).
This however seems to be incomplete.
According to the source code, all SAPIs that have php_ini_ignore_cwd set to 1 ignore the cwd https://github.com/php/php-src/blob/67e0138c0dfd966624223911a0821f6c294ad1c6/main/php_ini.c#L519
There are currently three SAPIs that have that:
1) CLI https://github.com/php/php-src/blob/cec091176cecd3f1efd553f4283fa7346184ad36/sapi/cli/php_cli.c#L1328
2) FPM https://github.com/php/php-src/blob/cec091176cecd3f1efd553f4283fa7346184ad36/sapi/fpm/fpm/fpm_main.c#L1594
3) phpdbg https://github.com/php/php-src/blob/68694c999796f9eec0f966f6d5181dcf5db68a99/sapi/phpdbg/phpdbg.c#L1612
Also, it might be good to explain what exactly is meant by "Current working directory", I wasn't really sure, that why I went to check the source code in the first place.
Add a Patch
Add a Pull Request