Make WordPress Core

Opened 18 years ago

Closed 17 years ago

#2367 closed defect (bug) (wontfix)

got_mod_rewrite crashes Apache 1.3.x on Windows

Reported by: twylite's profile Twylite Owned by: markjaquith's profile markjaquith
Milestone: Priority: normal
Severity: critical Version: 2.0
Component: Administration Keywords: mod_rewrite windows apache crash has-patch
Focuses: Cc:


There is a known bug with Apache 1.3.x on Windows in which calling apache_get_modules() will cause Apache to crash. See .

The problem can be reproduced in a WAMP environment by attempting to modify the Permalink options, which causes got_mod_rewrite in admin-functions.php to be called.

Suggested resolution:

The problem can be resolved by adding the following code into got_mod_rewrite in admin-functions.php:

if ( function_exists('apache_get_modules') ) {

  if (preg_match("/apache\/1\.3.*\(win/i", $_SERVER['SERVER_SOFTWARE'])) {
    // Running Apache 1.3.x on Windows -- 
    // see bug
    return true;

  if ( !in_array('mod_rewrite', apache_get_modules()) )
    return false;

This checks for Apache 1.3.x running on Windows, and assumes that mod_rewrite is present. If this check were to return false, then save_mod_rewrite_rules() will not write to .htaccess, and the permalink structure cannot be updated.

Attachments (1)

2367.diff (573 bytes) - added by Nazgul 18 years ago.

Download all attachments as: .zip

Change History (8)

#1 @davidhouse
18 years ago

  • Keywords bg|has-patch added

#2 @davidhouse
18 years ago

  • Keywords bg|commit added

#3 @markjaquith
18 years ago

  • Owner changed from anonymous to markjaquith
  • Status changed from new to assigned

#4 @foolswisdom
18 years ago

  • Keywords has-patch commit added; bg|has-patch bg|commit removed
  • Milestone changed from 2.0.1 to 2.1

18 years ago

#5 @Nazgul
18 years ago

  • Keywords commit removed

Created a patch based on the code in the ticket.

#6 @matt
18 years ago

  • Milestone changed from 2.1 to 2.2

#7 @rob1n
17 years ago

  • Milestone 2.2 deleted
  • Resolution set to wontfix
  • Status changed from assigned to closed

This was fixed in PHP CVS in April of 2006, and hasn't been a problem at all.

Note: See TracTickets for help on using tickets.