[wp-hackers] Re: [wp-svn] [2744] trunk/wp-settings.php: Fixes #1488

Robert Deaton false.hopes at gmail.com
Wed Aug 3 10:47:36 GMT 2005


Reading around, PHP_SELF is set on all platforms but does not contain
the same information, specifically in regular cgi mode vs php-cgi
mode. If anybody has time to test various server setups to confirm.

On 8/3/05, Nikolay Bachiyski <nbachiyski at developer.bg> wrote:
> m at wordpress.org wrote:
> >  // Fix for IIS, which doesn't set REQUEST_URI
> > -if (! isset($_SERVER['REQUEST_URI'])) {
> > -     $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
> > +if ( empty( $_SERVER['REQUEST_URI'] ) ) {
> > +     $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME']; // Does this work under CGI?
> 
> It does not (or at least - not always). When php scripts are run in cgi
> environment (I have tested on Apache only) the SCRIPT_NAME variable is
> set to "/cgi-bin/php4-wrapper" or something equally unusable for our
> purposes. However the PHP_SELF variable always gives us the relative
> path to the current script.
> 
> Nikolay.
> 
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
> 


-- 
--Robert Deaton
http://somethingunpredictable.com


More information about the wp-hackers mailing list