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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: korikulum at net dot hr
New email:
PHP Version: OS:

 

 [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: Tue Apr 23 15:01:32 2024 UTC