# [PATCH] #52045: FPM tries to open php.ini from the current dir

- Thread: https://externals.io/message/49496
- Original archive: https://news-web.php.net/php.internals/49496
- Started by jerome@loyet.net on 2010-08-24T18:03:56+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #49496 — jerome@loyet.net — 2010-08-24T18:03:56+00:00

URL: https://externals.io/message/49496#49496

hi,

when looking at the bug http://bugs.php.net/52045, I figure out that
the CLI sapi need to not check php.ini in the current directory (in
main/php_ini.c from line 436 to line 442). I need to change this file
to make FPM another exception by not adding cwd in the php.ini search
path.

When talking with johannes, he wondered  "we can make this a flag in
sapi_globals_struct. so sapi-related stuff can be done in the sapi
without touching main/. This might only be done in trunk.".

I attached a patch which do this on the bug report.

Do you think it's a good idea and I can commit it into trunk ?

Moreover, does the CGI sapi need the same correction ?

Thx
++ Jerome
