Bug 1248077

Summary: PHP-FPM incorrectly defines the SCRIPT_NAME variable when using Apache
Product: Red Hat Enterprise Linux 7 Reporter: Ward <wpoely86>
Component: phpAssignee: Remi Collet <rcollet>
Status: CLOSED CURRENTRELEASE QA Contact: RHEL Stacks Subsystem QE <rhel-stacks-subsystem-qe>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.3CC: anshockm, dkutalek, jorton, rcollet
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-17 11:03:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1295396, 1473612    

Description Ward 2015-07-29 14:34:45 UTC
Description of problem:

When using Apache + PHP_FPM, the SCRIPT_NAME variable is incorrectly set. For 
example, accessing "http://127.0.0.1/sample/test.php/a/b/c", results in:

ORIG_SCRIPT_NAME: 
SCRIPT_NAME: /sample/test.php/a/b/c
ORIG_SCRIPT_FILENAME: //tmp/sample/test.php/a/b/c
SCRIPT_FILENAME: //tmp/sample/test.php
PATH_INFO: /a/b/c
ORIG_PATH_INFO: 

While when using mod_php, the values are:

SCRIPT_NAME: /sample/test.php
SCRIPT_FILENAME: /tmp/sample/test.php
PATH_INFO: /a/b/c

This is a PHP bug and is fixed in PHP 5.5.18: https://bugs.php.net/bug.php?id=65641
Please backport the fix. The popular package owncloud cannot be used with apache + php-fpm because of this issue: https://github.com/owncloud/core/issues/7719


Version-Release number of selected component (if applicable):
< PHP 5.5.18

How reproducible:
100%

Steps to Reproduce:
1. See example above: access "http://127.0.0.1/sample/test.php/a/b/c" with apache 2.4 and php-fpm.

Actual results:
ORIG_SCRIPT_NAME: 
SCRIPT_NAME: /sample/test.php/a/b/c
ORIG_SCRIPT_FILENAME: //tmp/sample/test.php/a/b/c
SCRIPT_FILENAME: //tmp/sample/test.php
PATH_INFO: /a/b/c
ORIG_PATH_INFO: 

Expected results:
SCRIPT_NAME: /sample/test.php
SCRIPT_FILENAME: /tmp/sample/test.php
PATH_INFO: /a/b/c

Comment 4 Remi Collet 2016-06-29 07:41:21 UTC
This look like a duplicate of bug #1138563

Comment 10 Joe Orton 2020-06-17 11:03:08 UTC
This issue is resolved in RHEL8.