Opened 3 months ago
Last modified 3 months ago
#23533 new defect (bug)
WordPress doesn't recognize IIS 8.0 (Windows Server 2012) properly
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.6 |
| Component: | IIS | Version: | 3.4 |
| Severity: | major | Keywords: | has-patch |
| Cc: | hurtige |
Description
WordPress 3.5.1 doesn't recognize IIS 8.0 due to an invalid check in wp-includes/vars.php.
line 99:
$is_iis7 = $is_IIS && (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/7.') !== false);
Now WordPress, hosted on IIS 8.0, can't write a web.config for rewrites.
The check should be extended to include IIS 8.0, and preferably future verions. One more extended check to include IIS 8.0 only, and to patch this bug is:
$is_iis7 = $is_IIS && (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/7.') || strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/8.') !== false);
Kind regards,
Jan
Attachments (1)
Change History (6)
comment:1
SergeyBiryukov — 3 months ago
- Keywords has-patch removed
- Summary changed from WordPress 3.5.1 doesn't recognize IIS 8.0 (Windows Server 2012) properly to WordPress doesn't recognize IIS 8.0 (Windows Server 2012) properly
- Version changed from 3.5.1 to 3.4
comment:2
SergeyBiryukov — 3 months ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 3.6
Added float $iis_version which solves forward compatability issues with using $is_iis7. Also changed $is_iis7 to also return true if running IIS 8 to fix current plugins and features
I think that moving to a numeric system of checking versions is a much more logical and flexible approach, even to the point at which depreciating $is_iis7 should be considered.
comment:5
SergeyBiryukov — 3 months ago
- Keywords has-patch added; needs-patch removed

Related: [11350] (for #8974).
Technically, the current code was introduced in 2.8, however IIS 8.0 was released in September 2012, so leaving the version at 3.4.