php-fpm clear_env yes does not clear environment
Nobody has claimed this yet.
- Dominant language
- XML
- Stars
- 596
- Forks
- 890
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 55
Description
Description
Description
The following code:
PHP-FPM
with clear_env = yes
<?php
var_dump( filter_input( INPUT_SERVER, 'REQUEST_TIME_FLOAT' ) );
var_dump( $_SERVER['REQUEST_TIME_FLOAT'] );
var_dump( filter_input( INPUT_SERVER, 'REQUEST_TIME' ) );
var_dump( $_SERVER['REQUEST_TIME'] );
Resulted in this output:
NULL
float(1737560728.0001)
NULL
int(1737560728)
But I expected this output instead:
NULL
NULL
NULL
NULL
These are the only 2 documented in https://www.php.net/manual/en/reserved.variables.server.php with that behavior
The same also happens for HOME and USER for example
It seems this is partially bc of https://github.com/php/php-src/issues/17543#issuecomment-2614521724
Since https://github.com/php/php-src/issues/17543 was marked not a bug, then this, which is the opposite case has to be a bug, otherwise it's completely arbitrary.
PHP Version
8.4
Operating System
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the PHP-FPM clear_env setting and the manual page for reserved server variables, then read the linked issue #17543 and its referenced comment. Compare the documented behavior with the reported PHP 8.4 results for REQUEST_TIME_FLOAT, REQUEST_TIME, HOME, and USER; done requires an agreed resolution for what the documentation should state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100