Support Forum

Problems on IIS

MP Mr Papa
Mr Papa
Member

We have had a few issues with users on IIS.  I was helping a guy tonight with a TNG (genealogy program I use)  / WordPress integration.  He asked me how to do $_SERVER['REQUEST_URI'] on IIS since its not supported.  Of course, I did not know that.  A bit of searching and found it to be very true and a fix for the issue

  $_SERVER['REQUEST_URI'] = substr($_SERVER['PHP_SELF'],1 ); 
          if (isset($_SERVER['QUERY_STRING'])) { $_SERVER['REQUEST_URI'].='?'.$_SERVER['QUERY_STRING']; }

Now, we use the REQUEST_URI in several places in our code and I wonder if that is what causing some issues???  I have heard horror stories of WP and IIS but have also heard many stories of no issues.

Is this something we want to look into further?

4 Answers

New Answer

RA -Radio-
-Radio-
Member

It very well may be one of the root causes of incompatabilities.

Since you know the code much better than I do, a list of where this string is used in the code, what modules, would be a godsend for Trouble Shooting Issues.

It will stop this conversation:

I have x, y, and z broken, help…

hmm… are you on an IIS server?

uh, Yeah? is that important?…

RA -Radio-
-Radio-
Member

damn… hit the wrong button..

As I was saying before I so rudely interupted myself…

Finding other key differences in *nix v. IIS would also point out troubles, not just in SPF code, but possibly core problems and why you shouldn't run WP on IIS in the first place.

I am positive that this one string isn't the only reason.

MP Mr Papa
Mr Papa
Member

Oh, I agree entirely that this is not the panacea.  however, I continue to be amazed at the apparent randomness as to whether or not wp and spf work on IIS.  I have helped several with other things on IIS where wp and spf where working just fine.

YS Yellow Swordfish
Yellow Swordfish
Member

In answer to the question in post 1 then I would say yes – it's probaby worth at least changng and thus suporting what we know about even if we dont know it all.