PHP under IIS: Server Variables

July 25, 2004 at 3:16 pm Leave a comment

In my research thus far, I’ve found that PHP running under IIS isn’t quite the same as PHP under Apache. Most of the code you find on the internet is written to work with Apache, but the very same code may not work properly under IIS… In cases like this, you don’t really get error messages about problems… Things just don’t work like you expect! As you can imagine, this can be very frustrating.

One issue that I ran into rather quickly was the fact that $_SERVER[‘REQUEST_URI’] doesn’t work under IIS… In these cases, we have to build our own. To do so, I wrote iisCompat.php. Rename the file from .doc to .php after you’ve downloaded it.

Note that you may have to select a different line depending on if you are running in ISAPI or CGI mode.. I found that on a note about IIS compatibility issues and haven’t confirmed that independently, but thought I should make a note of it in my code in the event that I run into an issue in the future…


Entry filed under: PHP.

FAQ Project Where to begin

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


July 2004
    Aug »

Most Recent Posts

%d bloggers like this: