php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #65641
Patch Another_fix_for_mod_proxy_fcgi_v2.patch revision 2014-09-15 09:13 UTC by remi@php.net
Patch Another_fix_for_mod_proxy_fcgi.patch revision 2014-09-05 13:14 UTC by remi@php.net
Patch fpm_main-script_name-v2.patch revision 2014-04-29 14:22 UTC by rainer dot jung at kippdata dot de
Patch fpm_main-script_name.patch revision 2014-04-29 14:12 UTC by rainer dot jung at kippdata dot de
Patch fix_script_name_in_fpm_with_apace_fixed revision 2014-03-16 17:03 UTC by ryotakatsuki at gmail dot com
Patch fix_script_name_in_fpm_with_apache revision 2013-09-09 09:13 UTC by ryotakatsuki at gmail dot com

Patch fpm_main-script_name.patch for FPM related Bug #65641

Patch version 2014-04-29 14:12 UTC

Return to Bug #65641 | Download this patch
This patch is obsolete

Obsoleted by patches:

Patch Revisions:

Developer: rainer.jung@kippdata.de

--- sapi/fpm/fpm/fpm_main.c	2013-02-19 02:35:36.000000000 +0100
+++ sapi/fpm/fpm/fpm_main.c	2014-04-29 16:02:23.038294000 +0200
@@ -1194,8 +1194,20 @@
 						char *path_info;
 						if (apache_was_here) {
 							/* recall that PATH_INFO won't exist */
+							int offset;
+							char *tmp_str;
 							path_info = script_path_translated + ptlen;
 							tflag = (slen != 0 && (!orig_path_info || strcmp(orig_path_info, path_info) != 0));
+							offset = strlen(env_script_name) - strlen(path_info);
+							if (strcmp(env_script_name + offset, path_info) == 0) {
+								tmp_str = (char *) emalloc(offset + 1);
+								memcpy(tmp_str, env_script_name, offset);
+								tmp_str[offset] = '\0';
+								if (!orig_script_name || !*orig_script_name) {
+									orig_script_name = env_script_name;
+								}
+								env_script_name = tmp_str;
+							}
 						} else {
 							path_info = env_path_info ? env_path_info + pilen - slen : NULL;
 							tflag = (orig_path_info != path_info);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 14:01:30 2024 UTC