Internet Information Services
Note: You are currently viewing documentation for Moodle 2.5. Up-to-date documentation for the latest stable version of Moodle may be available here: Internet Information Services.
It is strongly recommended to use only the official Microsoft PHP installer from http://php.iis.net/, it automatically installs all necessary components and facilitates easy configuration with PHP manager. Manual installation attempts often fail or may not allow Moodle to function properly.
Fix UTF-8 file names
By default IIS is unable to handle unicode characters in files uploaded into moodle.
reg add HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\w3svc\Parameters /v FastCGIUtf8ServerVariables /t REG_MULTI_SZ /d REQUEST_URI\0PATH_INFO
URL rewriting workaround
If you can not modify registry as described above you may try manual configuration of rewrite rules, the PHP installation via Microsoft Web Platform Installer installs necessary URL Rewrite 2.0 module.
Add following rewrite rule to enable support for unicode file names in Moodle and to work around internal file length limitation breaking YUI file serving:
- Matches the Pattern - Regular Expressions -
- Action - Rewrite -
- Append query string - enabled
- Stop processing of subsequent rules - enabled
By default IIS is configured to stop execution of any PHP script after 5 minutes of activity, this interferes with long running Moodle scripts such as upgrade or cron. The timeout should be increased to at least one hour.
The default IIS account is IIS_IUSRS, make sure it has appropriate access right to Moodle dirroot (read only) and dataroot (read/write) directories.
By default, IIS contains custom error pages that intentionally hide error details on production sites. When diagnosing problems you may want to disable temporarily the IIS Error Pages so you can see Moodle specific error messages, alongside enabling debugging in Settings>Site administration>Development>Debugging. This blog post about IIS error messages explains how to get more useful error messages when using IIS.