php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #54636
Patch path_for_cgi_main.c revision 2011-04-30 21:35 UTC by me at paw-e-l dot net

Patch path_for_cgi_main.c for CGI/CLI related Bug #54636

Patch version 2011-04-30 21:35 UTC

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

Developer: me@paw-e-l.net

Index: cgi_main.c
===================================================================
--- cgi_main.c	(revision 310655)
+++ cgi_main.c	(working copy)
@@ -1136,7 +1136,7 @@
 
 			if (env_path_translated != NULL && env_redirect_url != NULL &&
  			    env_path_translated != script_path_translated &&
- 			    strcmp(env_path_translated, script_path_translated) != 0) {
+ 			    strcmp(env_path_translated, script_path_translated) != 0 && env_path_info != NULL && !strlen(env_path_info)) {
 				/*
 				 * pretty much apache specific.  If we have a redirect_url
 				 * then our script_filename and script_name point to the
@@ -1313,7 +1313,7 @@
 				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);
+					//	_sapi_cgibin_putenv("PATH_INFO", NULL TSRMLS_CC);
 					}
 					if (orig_path_translated) {
 						_sapi_cgibin_putenv("ORIG_PATH_TRANSLATED", orig_path_translated TSRMLS_CC);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 05:01:30 2024 UTC