Question: I'm not sure which site this question is best suited to - it's possibly an IIS configuration issue.
I'm having problems running Wordpress on a brand new 2008R2 server running IIS7.5. I get an error stating that a required file cannot be found:

> 
> PHP Fatal error: require(): Failed opening required
>  './wp-blog-header.php' (include\_path='.;C:\php\pear') in
>  D:\path\to\my\site\blog\index.php on line 17
> 
> 
> 

Having looked around the web I can see that a lot of people have had this problem and fixed it by removing the './' part of the require statement. I've also seen suggestions that people use various PHP functions or set global variables to use before the require statement - however I don't feel this is a good solution. The same syntax is used all over Wordpress and needs to be replaced across many files. Additionally if I update the site, the problem will reoccur. I need a solution that doesn't involve editing anything in the Wordpress core.
I have this working with no problems on an R1 (IIS7) server and also on my local Win 7 machine - the first I've seen of this issue is here on the R2 server.

Can anyone give me any help to get './' relative paths working for Wordpress?

Thanks

Answer: 
This turned out to be a permissions issue.
It seems that in order for './your\_filename.php' to work, the user PHP is running as needs to have 'List folder contents' permissions on the folder - even though the file is directly specified.

In the end, the full solution involved turning Fast CGI impersonation off, getting PHP to run as the Application Pool identity and giving that more access to the wordpress folder.

There was some information on this in a question on SO - I can't seem to find it now but will link to it in my answer if I come across it again.
you can try using this web.conf

```
    <?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="WordPress Rule 1" stopProcessing="true">
                    <match url="^index\.php$" ignoreCase="false" />
                    <action type="None" />
                </rule>
                <rule name="WordPress Rule 2" stopProcessing="true">
                    <match url="^([_0-9a-zA-Z-]+/)?files/(.+)" ignoreCase="false" />
                    <action type="Rewrite" url="wp-includes/ms-files.php?file={R:2}" appendQueryString="false" />
                </rule>
                <rule name="WordPress Rule 3" stopProcessing="true">
                    <match url="^([_0-9a-zA-Z-]+/)?wp-admin$" ignoreCase="false" />
                    <action type="Redirect" url="{R:1}wp-admin/" redirectType="Permanent" />
                </rule>
                <rule name="WordPress Rule 4" stopProcessing="true">
                    <match url="^" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAny">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" />
                    </conditions>
                    <action type="None" />
                </rule>
                <rule name="WordPress Rule 5" stopProcessing="true">
                    <match url="^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*)" ignoreCase="false" />
                    <action type="Rewrite" url="{R:2}" />
                </rule>
                <rule name="WordPress Rule 6" stopProcessing="true">
                    <match url="^([_0-9a-zA-Z-]+/)?(.*\.php)$" ignoreCase="false" />
                    <action type="Rewrite" url="{R:2}" />
                </rule>
                <rule name="WordPress Rule 7" stopProcessing="true">
                    <match url="." ignoreCase="false" />
                    <action type="Rewrite" url="index.php" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

```