Make WordPress Core

Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#23533 closed defect (bug) (fixed)

WordPress doesn't recognize IIS 8.0 (Windows Server 2012) properly

Reported by: janr's profile JanR Owned by: nacin's profile nacin
Milestone: 3.6 Priority: normal
Severity: major Version: 3.4
Component: IIS Keywords: has-patch
Focuses: Cc:

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)

vars.diff (830 bytes) - added by hurtige 12 years ago.
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

Download all attachments as: .zip

Change History (9)

#1 @SergeyBiryukov
12 years 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

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.

#2 @SergeyBiryukov
12 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 3.6

@hurtige
12 years ago

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

#3 @hurtige
12 years ago

  • Cc hurtige added

#4 @hurtige
12 years ago

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.

#5 @SergeyBiryukov
12 years ago

  • Keywords has-patch added; needs-patch removed

#6 @nacin
11 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 24594:

Support IIS 8 and above.

props hurtige for initial patch.
fixes #23533.

#7 @nacin
11 years ago

I went with something a bit simpler in [24594]. We can maybe deprecate/rename $is_iis7 (and the related functions) in the future, but that was slowing down what is the clear, simple win: Let $is_iis7 mean 7+, and make WP work for IIS 8 out of the box (and eventually IIS 9, etc.).

#8 @hurtige
11 years ago

+1 to making is_iis7 meaning 7+ that already seems to be somewhat of a standard for modern IIS. Glad it's resolved.

Note: See TracTickets for help on using tickets.