Re: Best way to deal with $_SERVER['REQUEST_URI'] on IIS?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew Ballard wrote:
On Tue, Apr 21, 2009 at 4:04 PM, Mattias Thorslund <mattias@xxxxxxxxxxxx> wrote:
Hi all,

Apparently, $_SERVER['REQUEST_URI'] doesn't get set the same way when
running PHP on IIS as when running it on Apache. Specifically, it seems to
contain the script name only, and not the query string part.

I know I can rewrite my code to piece together a $_SERVER['REQUEST_URI']
from $_SERVER['SCRIPT_NAME'] and $_SERVER['QUERY_STRING'], but some
instances of $_SERVER['REQUEST_URI'] are in third party scripts which would
be a bit of a pain to fix every time they are updated.

It is a known problem since there are several mentions and workarounds to be
found on the Internet, but I'm wondering which is currently the "best" way
to deal with it. I don't personally run PHP with IIS, so I haven't
encountered this problem before...but now I have a user who does. I could
potentially have more users who encounter the same thing, so the easier the
instructions and the less tinkering, the better. Is there a php.ini setting,
for instance? What have you found that works for you?

Thanks,

Mattias

It works just fine on the servers where I work.

Andrew

Thanks Andrew. I just read that there is supposedly a fix for this in FastCGI:
http://ruslany.net/2008/08/update-for-iis-70-fastcgi-module/

You might have that update already. If this fix works, then it's obviously the best solution to the problem.

Cheers,

Mattias



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux