Skip to content

Commit 67ebb94

Browse files
author
Shane Caraveo
committed
http://bugs.php.net/bug.php?id=23800
change the default for those who cannot this was actually done a long time ago, but got reverted along the way
1 parent d9cf9e3 commit 67ebb94

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

php.ini-dist

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,14 @@ enable_dl = On
444444
; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
445445
; cgi.redirect_status_env = ;
446446

447+
; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's
448+
; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
449+
; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting
450+
; this to 1 will cause PHP CGI to fix it's paths to conform to the spec. A setting
451+
; of zero causes PHP to behave as before. Default is zero. You should fix your scripts
452+
; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
453+
; cgi.fix_pathinfo=0
454+
447455
; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
448456
; security tokens of the calling client. This allows IIS to define the
449457
; security context that the request runs under. mod_fastcgi under Apache

php.ini-recommended

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,14 @@ enable_dl = On
459459
; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
460460
; cgi.redirect_status_env = ;
461461

462+
; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's
463+
; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
464+
; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting
465+
; this to 1 will cause PHP CGI to fix it's paths to conform to the spec. A setting
466+
; of zero causes PHP to behave as before. Default is zero. You should fix your scripts
467+
; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
468+
; cgi.fix_pathinfo=1
469+
462470
; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
463471
; security tokens of the calling client. This allows IIS to define the
464472
; security context that the request runs under. mod_fastcgi under Apache

sapi/cgi/cgi_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ consult the installation file that came with this distribution, or visit \n\
10621062

10631063
#if ENABLE_PATHINFO_CHECK
10641064
if (cfg_get_long("cgi.fix_pathinfo", &fix_pathinfo) == FAILURE) {
1065-
fix_pathinfo = 1;
1065+
fix_pathinfo = 0;
10661066
}
10671067
#endif
10681068

0 commit comments

Comments
 (0)