php_ini_scanned_path, from --with-config-file-scan-dir option or
from PHP_INI_SCAN_DIR environment variable allow a single path.
In some case it could be useful to allow multiple.
In the proposed patch, multiple paths are allow, using syntax inspired
from Unix MANPATH (: separated list, empty string for builtin value).
For example, this allow to use:
PHP_INI_SCAN_DIR=/foo/php.d:/bar/php.d php
PHP_INI_SCAN_DIR=:/myproject/php.d php
PHP_INI_SCAN_DIR=/myproject/php.d: php
Real use case: in SCL for dependent collections where each collection
provides a separate tree for extensions, libraries and ini files.
While this issue is visible in mysqli_poll() functions, the cause
lays deeper in the stream to socket casting API. On Win x64 the
SOCKET datatype is a 64 or 32 bit unsigned, while on Linux/Unix-like
it's 32 bit signed integer. The game of casting 32 bit var to/from
64 bit pointer back and forth is the best way to break it.
Further more, while socket and file descriptors are always integers
on Linux, those are different things using different APIs on Windows.
Even though using integer instead of SOCKET might work on Windows, this
issue might need to be revamped more carefully later. By this time
this patch is tested well with phpt and apps and shows no regressions,
neither in mysqli_poll() nor in any other parts.
if a mode like "rn" was passed to fopen(), then
php_stream_parse_fopen_modes() would assign O_WRONLY to
flags, because O_NONBLOCK tainted flags for the r/w/+ check
Dereferencing addition_modules within php_module_startup would
point to a vector entirely on the stack (which is of course, wrong).
Use a specialized helper to keep BC with the current php_module_startup()
calling semantics.
Fixes 63159
Thanks to @a-j-k