Skip to content

FPM: Always use script name in PHP_SELF if cgi.discard_path = 1 and cgi.fix_pathinfo = 0 #11025

@bukka

Description

@bukka

Description

Currently if PATH_INFO set, then it is used in PHP_SELF if cgi.fix_pathinfo is disabled. This makes sense if the executable is used from PATH_TRANSLATED which is default behaviour. However if cgi.discard_path is enabled, it uses SCRIPT_FILENAME executable instead. This however does not match the documentation which states that PHP_SELF is relative path to the executable because PATH_INFO has nothing to do with executable path.

This was first mentioned in https://bugs.php.net/bug.php?id=68053 and this issue is an extraction of that problem (the primary concern won't be fixed due to a significant BC break). Even though this could be considered as a bug, it is not that critical and it has some BC break concern. It means it should be treated more as a feature change to improve the current behaviour and should go only to master and be mentioned in UPGRADING.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions