Receive a 500 error when accessing WordPress blog on IIS7


Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /homepages/13/d121821522/htdocs/mvt/wp-content/plugins/ultimate-google-analytics/ultimate_ga.php on line 524

Problem:  When trying to access files within a specific directory within a WordPress blog, I would receive a server side 500 error.  All other aspects of the blog were working fine.

Solution:  The problem had to do with the web.config file within that specific directory.  Somehow some other entries were inserted into it thus creating the error for every file.  I reverted back to the default web.config and all worked fine.  See below….

Default Web.Config:  

<?xml version=”1.0″ encoding=”UTF-8″?>
<configuration>
    <system.webServer>
        <defaultDocument>
            <files>
                <clear />
                <add value=”index.php” />
                <add value=”Default.htm” />
                <add value=”Default.asp” />
                <add value=”index.htm” />
                <add value=”index.html” />
                <add value=”iisstart.htm” />
                <add value=”default.aspx” />
            </files>
        </defaultDocument>
    </system.webServer>
</configuration>

Leave a comment

Your email address will not be published. Required fields are marked *