Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php-fpm clear_env yes does not clear environment #4441

Open
kkmuffme opened this issue Feb 3, 2025 · 1 comment
Open

php-fpm clear_env yes does not clear environment #4441

kkmuffme opened this issue Feb 3, 2025 · 1 comment
Labels
bug Documentation contains incorrect information SAPI: FPM

Comments

@kkmuffme
Copy link

kkmuffme commented Feb 3, 2025

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 php/php-src#17543 (comment)

Since php/php-src#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

@kkmuffme kkmuffme added bug Documentation contains incorrect information Status: Needs Triage labels Feb 3, 2025
@bukka bukka transferred this issue from php/php-src Feb 5, 2025
@bukka
Copy link
Member

bukka commented Feb 5, 2025

This is a doc issue because clear_env is just for clearing external environment variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Documentation contains incorrect information SAPI: FPM
Projects
None yet
Development

No branches or pull requests

2 participants