Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: A PHP application that depends on the REQUEST_URI server variable may fail when a request whose URL contains UTF-8 characters is sent to IIS 7.5


View products that this article applies to.

Symptoms

Consider the following scenario:
  • You use the FastCGI module to host a PHP application on a server that is running Internet Information Services (IIS) 7.5.
  • The PHP application depends on the REQUEST_URI server variable.
  •  A client request whose URL contains UTF-8 characters is sent to the server running IIS. 
In this scenario, the PHP application may fail.

↑ Back to the top


Cause

This problem occurs because the FastCGI module in IIS 7.5 uses ASCII encoding when you set server variables. Therefore, the REQUEST_URI server variable is not set correctly when the URL contains UTF-8 characters.

↑ Back to the top


Resolution

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

To resolve this problem immediately, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

You must have IIS 7.5 and the FastCGI module installed to apply this hotfix.

Restart requirement

You must restart the IIS Admin service after you apply this hotfix.

Hotfix replacement information


This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
For all supported x86-based versions of IIS 7.5
File nameFile versionFile sizeDateTimePlatform
Cgi.dll7.5.7600.2075139,93609-Jul-201005:06x86
Iisfcgi.dll7.5.7600.2075173,72809-Jul-201005:07x86
For all supported x64-based versions of IIS 7.5
File nameFile versionFile sizeDateTimePlatform
Cgi.dll7.5.7600.2075144,54409-Jul-201005:43x64
Iisfcgi.dll7.5.7600.2075186,52809-Jul-201005:45x64
Cgi.dll7.5.7600.2075139,93609-Jul-201005:06x86
Iisfcgi.dll7.5.7600.2075173,72809-Jul-201005:07x86
For all supported IA-64-based versions of IIS 7.5
File nameFile versionFile sizeDateTimePlatform
Cgi.dll7.5.7600.20751103,42409-Jul-201004:32IA-64
Iisfcgi.dll7.5.7600.20751195,58409-Jul-201004:34IA-64
Cgi.dll7.5.7600.2075139,93609-Jul-201005:06x86
Iisfcgi.dll7.5.7600.2075173,72809-Jul-201005:07x86

Post-installation instructions

After you apply this hotfix, the FastCGI module can be configured to use UTF-8 encoding when you set server variables. To configure FastCGI to use UTF-8 encoding for a particular set of server variables, set the value of the following registry entry to a list of server variable names:

FastCGIUtf8ServerVariables
Notes
  • The data type of the registry entry is REG_MULTI_SZ.
  • If the registry entry does not exist, you must create it manually.
For example, click start, click run, and then type the following command: 

reg add HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\w3svc\Parameters /v FastCGIUtf8ServerVariables /t REG_MULTI_SZ /d REQUEST_URI\0PATH_INFO

This example configures the FastCGI module to use UTF-8 encoding when you set the REQUEST_URI and PATH_INFO server variables.


Warning Using UTF-8 encoding for server variables may affect how the PHP core and PHP applications work. Make sure that you verify that the PHP applications work as expected after the registry key is changed.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More Information

The FastCGI module also uses ASCII encoding when you set server variables in IIS 7.0. To support UTF-8 encoding for server variable values in IIS 7.0, apply the hotfix that is described in Microsoft Knowledge Base article 980363. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

980363   A hotfix is available that adds features to the FastCGI module in IIS 7.0
For more information about PHP on IIS 7.0 or IIS 7.5, visit the following website:For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.

↑ Back to the top


Keywords: kb, kbautohotfix, kbqfe, kbhotfixserver, kbfix, kbexpertiseadvanced, kbsurveynew

↑ Back to the top

Article Info
Article ID : 2277918
Revision : 2
Created on : 9/19/2018
Published on : 9/19/2018
Exists online : False
Views : 366