Anonymous | Login | Signup for a new account | 2023-12-06 14:16 CST | ![]() |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Dependency Graph | [ View Issue ] [ Relation Graph ] [ Vertical ] | |||
|
||||
|
Viewing Issue Simple Details | |||||
ID | Category | Type | Reproducibility | Date Submitted | Last Update |
0001427 | [In-Portal CMS] Install / Upgrages | bug report | always | 2012-11-05 10:28 | 2012-11-07 10:48 |
Reporter | alex | View Status | public | ||
Assigned To | alex | ||||
Priority | normal | Resolution | fixed | ||
Status | resolved | ||||
Summary | 0001427: Mod-rewrite detection doesn't work when PHP is installed as CGI | ||||
Description |
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 http://christian.roy.name/blog/detecting-modrewrite-using-php 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. |
||||
Additional Information |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Web Development by Intechnic![]() In-Portal Open Source CMS |