Hi,
I noticed that php.ini-development now sets variables_order="GPCS" instead
of "EGPCS".
run-test.php uses $_ENV to read environment variables and will set those on
all the child processes it creates. However, if variables_order="GPCS",
$_ENV will be empty and the environment variables table on the child
process will be empty, at least on Windows, the only env variables the
child then gets are PATH and COMSPEC. Importantly, TEMP or TMP is not
available, which causes a problem for generating temporary file names, and
on Windows, that breaks OpCache.
Often, php.ini-development will just be renamed to php.ini. Since $_ENV
isn't preferred anymore, run-test.php shouldn't be dependent on it.
I can fix this myself, but would like to know the preferred solution.
I suggest any of these fixes:
- die if variables_order doesn't include "E"
- die if $_ENV is empty: lots of tests will be false fails if no env vars
are set, so prevent getting to that point. - use
getenv()
to read common environment variables(TEMP or TMP) at
least.getenv()
doesn't provide a list of environment variable names, and
ideally it would just copy all of them, so try to use $_ENV and only use
getenv()
if TEMP or TMP is not set. and then die if $_ENV is still empty.
Regards
-M