Opened 19 years ago
Closed 18 years ago
#2367 closed defect (bug) (wontfix)
got_mod_rewrite crashes Apache 1.3.x on Windows
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | critical | Version: | 2.0 |
Component: | Administration | Keywords: | mod_rewrite windows apache crash has-patch |
Focuses: | Cc: |
Description
There is a known bug with Apache 1.3.x on Windows in which calling apache_get_modules() will cause Apache to crash. See http://bugs.php.net/bug.php?id=33292 .
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 http://bugs.php.net/bug.php?id=33292 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)
Change History (8)
Note: See
TracTickets for help on using
tickets.
Created a patch based on the code in the ticket.