-
Type: Bug Report
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 5.2.0
-
Fix Version/s: 5.2.1-B1
-
Component/s: Install / Upgrages
-
Labels:None
-
External issue URL:
-
Change Log Message:Fixes mod-rewrite module detecting during installation/upgrade
-
Story Points:1
-
External issue ID:1427
-
Copy Issue Key:
-
Patch Instructions:
When PHP is installed as CGI and not as "mod_php" into Apache, then system requirements step tells, that mod rewrite is not available.
But in fact mod rewrite works absolutely normally.
I propose to improve detection as advised by [url]http://christian.roy.name/blog/detecting-modrewrite-using-php[/url] article by setting custom environment variable in .htaccess file, like this:
<IfModule mod_rewrite.c>
// Tell PHP that the mod_rewrite module is ENABLED.
SetEnv HTTP_MOD_REWRITE On
</IfModule>
and checking it later inside PHP:
if ( function_exists('apache_get_modules') )
{ $modules = apache_get_modules(); $mod_rewrite = in_array('mod_rewrite', $modules); }else
{ $mod_rewrite = getenv('HTTP_MOD_REWRITE')=='On' ? true : false; }I also recommend wrapping whole rewrite-related code inside that IfModule statement since if mod-rewrite is really unavailable, then any directive from it (e.g. RewriteEngine) could cause "500 Internal Server Error" for whole website.
- mentioned in
-
Wiki Page Loading...