Heine

  • home
  • drupal
  • drupal core commits
  • about
Home

IIS

Drupal HEAD and HTTP 500 errors on IIS 7

Heine — Fri, 09/01/2009 - 12:41

If you use PHP via FastCGI on IIS 7 and installing Drupal HEAD (7.x-dev) results in an HTTP 500 error, you may need to increase a number of timeout settings. The PHP.ini ones are fairly straightforward, but setting the activityTimeout for the FastCGI module is not intuitive.

Open a Command prompt with Administrative rights and enter:

%windir%\system32\inetsrv\appcmd set config -section:system.webServer/fastCgi /[fullPath='C:\path_to_cgi\php-cgi.exe'].activityTimeout:600

The path to cgi should be replaced with the path of the PHP binary you registered with IIS. You must wrap the path in additional double quotes if it contains spaces. Example:

%windir%\system32\inetsrv\appcmd set config -section:system.webServer/fastCgi /[fullPath='"C:\Program Files (x86)\PHP\php-cgi.exe"'].activityTimeout:600

To get easier access to such settings, install the Administration Pack for IIS:

  • Administration Pack for IIS 7.0 CTP2 - x86
  • Administration Pack for IIS 7.0 CTP2 - x64
  • Drupal
  • IIS
  • Add new comment

Drupal clean URLs on IIS 7

Heine — Thu, 16/10/2008 - 09:57

To get Clean URLs working on IIS 7, install the new URL rewriter module (x86, x64) and add the following to the system.webServer section of the sites' web.config:

<rewrite>
  <rules>
    <rule name="Drupal clean URLs" enabled="true">
      <match url="^(.*)$" ignoreCase="false" />
      <conditions logicalGrouping="MatchAll">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />    
        <add input="{REQUEST_URI}" negate="true" pattern="/favicon.ico$" />
      </conditions>
      <action type="Rewrite" url="index.php?q={R:1}" appendQueryString="true" />
    </rule>
  </rules>
</rewrite>

You also need to install a hotfix to correct REQUEST_URI behaviour when using PHP via the FastCGI module. See KB954946 for more information. A symptom of this problem is when all form submissions get redirected to the frontpage of the site.

  • Drupal
  • IIS
  • 6 comments
  • Read more
Syndicate content

Recent posts

  • The Joomlafication of the Dutch-speaking community
  • Upgraded from 6.14 to 6.15, but Drupal still thinks it's 6.14?
  • Google Friendconnect Drupal module not recommended (yet)
  • The OpenID 2.0 Compliance Crusade - Part I
  • Using <embed> for XSS
more

Security reviews

  • Afraid custom code makes your site vulnerable?
  • You don't really trust that module you just downloaded from Drupal.org?

Sleep better after a security review.

Tags

Captcha CSRF DOH! Drupal embed Input Format modx OpenID Performance Planet Drupal Security Varnish
more tags
  • home
  • drupal
  • drupal core commits
  • about

Copyright © 2010 by Heine Deelstra. All rights reserved.