WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 21 months ago

Last modified 21 months ago

#23533 closed defect (bug) (fixed)

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

Reported by: JanR Owned by: 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 2 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)

comment:1 @SergeyBiryukov2 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.

comment:2 @SergeyBiryukov2 years ago

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

@hurtige2 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

comment:3 @hurtige2 years ago

  • Cc hurtige added

comment:4 @hurtige2 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.

comment:5 @SergeyBiryukov2 years ago

  • Keywords has-patch added; needs-patch removed

comment:6 @nacin21 months 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.

comment:7 @nacin21 months 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.).

comment:8 @hurtige21 months 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.