[wp-trac] [WordPress Trac] #41578: Assure that $_SERVER['PATH_INFO'] is available
WordPress Trac
noreply at wordpress.org
Thu Aug 10 06:19:42 UTC 2017
#41578: Assure that $_SERVER['PATH_INFO'] is available
----------------------------+------------------------------
Reporter: glehner | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bootstrap/Load | Version: 4.8.1
Severity: normal | Resolution:
Keywords: | Focuses:
----------------------------+------------------------------
Comment (by glehner):
Replying to [ticket:41578 glehner]:
> I use the [http://www.fefe.de/gatling/ gatling] web server on one of my
servers (low ressorce consumption). gatling will not set the PATH_INFO
environment variable if no path info is available which causes the home
page of WP to enter an endless redirect loop.
>
> I managed to fix this by setting {{{$_SERVER['PATH_INFO']}}} to the
empty string in an unhandled condition in wp-includes/load.php.
----
I have been able to run WordPress unmodified by adding the REQUEST_URI
environment variable to the wrapper script which runs index.php as CGI or
feeds it to FCGI respectively.
The gatling web server only provides the RFC3875 environment variables.
SCRIPT_NAME and PATH_INFO allow to assemble REQUEST_URI like this (Bourne
shell):
{{{
REQUEST_URI="$SCRIPT_NAME"
if [ "$PATH_INFO" ]; then
REQUEST_URI="${REQUEST_URI}/${PATH_INFO}"
fi
if [ "$QUERY_STRING" ]; then
REQUEST_URI="${REQUEST_URI}?${QUERY_STRING}"
fi
}}}
Such a construction could be done by WordPress also, if REQUEST_URI is not
available.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41578#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list