php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #77475 Order in which conf files are searched for is incomplete
Submitted: 2019-01-16 23:21 UTC Modified: -
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: korikulum at net dot hr Assigned:
Status: Open Package: *Configuration Issues
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
22 - 4 = ?
Subscribe to this entry?

 
 [2019-01-16 23:21 UTC] korikulum at net dot hr
Description:
------------
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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 11:01:30 2024 UTC