Friday, January 21, 2011

How To Treat Any File As PHP In Windows IIS 7?

I want .any file (could be .this or .that etc.) to be treated as a .php file and parse .php code on my windows 2008 server running IIS 7.

How would I go about doing so?

  • It was a while since I did this, but the process last time was something like this:

    1. Start>control panel>administrative tools>Internet Information Service

    2. Choose the website you want to change (typically the default site) and then open the properties.

    3. Home Directory tab, make sure execute permissions are set to "Scripts and Executables" then go to Configuration

    4. Here you click add, then you add the extension for all request types. Give the path to php.exe.

    You might have to restart iis afterwards.

    darkAsPitch : Thanks pehrs , but as for number 2 - open properties? Do I right click? I don't see any "properties" value listed anywhere for any site - default or not ?
    darkAsPitch : Or 3? What do you mean by the home directory tab? I'm using IIS 7.
    pehrs : Oh, sorry, If you are on IIS 7 it's something like Features View panel, then Handler Mappings see http://technet.microsoft.com/en-us/library/cc771240%28WS.10%29.aspx
    From pehrs

0 comments:

Post a Comment