[wp-hackers] PHP as cgi, SCRIPT_NAME errors

Carthik Sharma carthik at gmail.com
Fri May 13 17:53:58 GMT 2005


On 5/13/05, Owen Winkler <ringmaster at midnightcircus.com> wrote:
> Carthik Sharma wrote:
> > http://wordpress.org/support/topic/33564 is an example of the problem
> > produced when php is running as cgi. In this case, it appears that
> > $_SERVER['SCRIPT_NAME'] returns the cgi path rather than the required
> > file.
> >
> > What's the best way to solve this, a search lead to beleive that using
> > $_SERVER['PHP_SELF'] should fix it, but I cannot begin to work out
> > where all this will have to be changed :)
> >
> > Could something be done about this in the source, like in
> > wp-settings.php or something?
> 
> The opposite is often true on IIS.  Fixes for this for IIS begin in
> wp-settings.php line 6, and it's centralized there by using the
> reassigned $_SERVER['REQUEST_URI'] throughout the source.
> 

Yes, Owen, I knew and noticed that, which is why I ask if something
similar needs to be done to wp-settings.php to deal with this cgi
problem.

Carthik.


More information about the wp-hackers mailing list