Browse Source

Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
  NEWS
  Fixed bug #65641 PHP-FPM incorrectly defines the SCRIPT_NAME variable when using Apache
pull/834/head
Remi Collet 12 years ago
parent
commit
47bc380ecf
  1. 11
      sapi/fpm/fpm/fpm_main.c

11
sapi/fpm/fpm/fpm_main.c

@ -1237,6 +1237,17 @@ static void init_request_info(TSRMLS_D)
SG(request_info).request_uri = orig_script_name;
}
path_info[0] = old;
} else if (apache_was_here && env_script_name) {
/* Using mod_proxy_fcgi and ProxyPass, apache cannot set PATH_INFO
* As we can extract PATH_INFO from PATH_TRANSLATED
* it is probably also in SCRIPT_NAME and need to be removed
*/
int snlen = strlen(env_script_name);
if (snlen>slen && !strcmp(env_script_name+snlen-slen, path_info)) {
_sapi_cgibin_putenv("ORIG_SCRIPT_NAME", orig_script_name TSRMLS_CC);
env_script_name[snlen-slen] = 0;
SG(request_info).request_uri = _sapi_cgibin_putenv("SCRIPT_NAME", env_script_name TSRMLS_CC);
}
}
env_path_info = _sapi_cgibin_putenv("PATH_INFO", path_info TSRMLS_CC);
}

Loading…
Cancel
Save