php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch Patch_for_PHP_5.3.28 for FPM related Bug #67541

Patch version 2014-07-21 08:39 UTC

Return to Bug #67541 | Download this patch
Patch Revisions:

Developer: reywob@php.net

From 70c0e453f42ad19380186c03a714fcd61c84391a Mon Sep 17 00:00:00 2001
From: Peter Bowyer <peter@mapledesign.co.uk>
Date: Sun, 20 Jul 2014 17:48:23 +0100
Subject: [PATCH] Apply David Zuelke's Apache 2.4.10/fpm patch

---
 sapi/fpm/fpm/fpm_main.c | 25 +------------------------
 1 file changed, 1 insertion(+), 24 deletions(-)

diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 7633272..a54e066 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -1143,19 +1143,6 @@ static void init_request_info(TSRMLS_D)
 				TRANSLATE_SLASHES(env_document_root);
 			}
 
-			if (env_path_translated != NULL && env_redirect_url != NULL &&
-			    env_path_translated != script_path_translated &&
-			    strcmp(env_path_translated, script_path_translated) != 0) {
-				/*
-				 * pretty much apache specific.  If we have a redirect_url
-				 * then our script_filename and script_name point to the
-				 * php executable
-				 */
-				script_path_translated = env_path_translated;
-				/* we correct SCRIPT_NAME now in case we don't have PATH_INFO */
-				env_script_name = env_redirect_url;
-			}
-
 #ifdef __riscos__
 			/* Convert path to unix format*/
 			__riscosify_control |= __RISCOSIFY_DONT_CHECK_DIR;
@@ -1324,7 +1311,7 @@ static void init_request_info(TSRMLS_D)
 					efree(pt);
 				}
 			} else {
-				/* make sure path_info/translated are empty */
+				/* make sure original values are remembered in ORIG_ copies if we've changed them */
 				if (!orig_script_filename ||
 					(script_path_translated != orig_script_filename &&
 					strcmp(script_path_translated, orig_script_filename) != 0)) {
@@ -1333,16 +1320,6 @@ static void init_request_info(TSRMLS_D)
 					}
 					script_path_translated = _sapi_cgibin_putenv("SCRIPT_FILENAME", script_path_translated TSRMLS_CC);
 				}
-				if (env_redirect_url) {
-					if (orig_path_info) {
-						_sapi_cgibin_putenv("ORIG_PATH_INFO", orig_path_info TSRMLS_CC);
-						_sapi_cgibin_putenv("PATH_INFO", NULL TSRMLS_CC);
-					}
-					if (orig_path_translated) {
-						_sapi_cgibin_putenv("ORIG_PATH_TRANSLATED", orig_path_translated TSRMLS_CC);
-						_sapi_cgibin_putenv("PATH_TRANSLATED", NULL TSRMLS_CC);
-					}
-				}
 				if (env_script_name != orig_script_name) {
 					if (orig_script_name) {
 						_sapi_cgibin_putenv("ORIG_SCRIPT_NAME", orig_script_name TSRMLS_CC);
-- 
1.8.2.1

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC