Anonymous | Login | Signup for a new account | 2023-12-06 15:33 CST | ![]() |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Viewing Issue Advanced Details [ Jump to Notes ] [ Wiki ] | [ View Simple ] [ Issue History ] [ Print ] | ||||||
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 | Project Name | In-Portal CMS | ||
Assigned To | alex | Developer | |||||
Priority | normal | Resolution | fixed | Platform | |||
Status | resolved | OS | |||||
OS Version | |||||||
ETA | none | Fixed in Version | 5.2.1-B1 | Product Version | 5.2.0 | ||
Target Version | 5.2.1 | Product Build | |||||
Time Estimate | No estimate | ||||||
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. |
||||||
Steps To Reproduce | |||||||
Additional Information | |||||||
Tags | No tags attached. | ||||||
Reference | https://groups.google.com/d/topic/in-portal-bugs/Xw33wdGc3nI/discussion | ||||||
Change Log Message | Fixes mod-rewrite module detecting during installation/upgrade | ||||||
Estimate Points | 1 | ||||||
Attached Files |
![]() ![]() |
||||||
|
![]() |
|
![]() |
|
![]() erik (manager) 2012-11-07 06:41 |
Done. Patch attached. Needs testing |
![]() alex (manager) 2012-11-07 07:26 |
1. Mod-rewrite Apache module related directives in .htaccess file were not wrapped with IF statement as advised. 2. Code isn't properly formatted (use automatic formatting of IDE to prevent this error in future). |
![]() erik (manager) 2012-11-07 09:20 |
1. Changed to wrap directives 2. Changed code formatting Patch replaced with new version. Needs testing |
![]() alex (manager) 2012-11-07 10:48 |
Patch "mod_rewrite_detection_1427_v2.patch" has simplified code version and few empty lines removed. |
![]() alex (manager) 2012-11-07 10:48 |
OK |
![]() alex (manager) 2012-11-07 10:48 |
Fix committed to 5.2.x branch. Commit Message: Fixes 0001427: Mod-rewrite detection doesn't work when PHP is installed as CGI Commit on behalf of Erik |
![]() |
|||
In-Portal CMS: 5.2.x r15620 Timestamp: 2012-11-07 10:48:48 Author: alex [ Details ] [ Diff ] |
Fixes 0001427: Mod-rewrite detection doesn't work when PHP is installed as CGI Commit on behalf of Erik |
||
mod - /in-portal/branches/5.2.x/.htaccess | [ Diff ] [ File ] | ||
mod - /in-portal/branches/5.2.x/core/install/prerequisites.php | [ Diff ] [ File ] | ||
![]() |
|||
Date Modified | Username | Field | Change |
2012-11-07 10:48 | alex | Note Added: 0005285 | |
2012-11-07 10:48 | alex | Status | reviewed and tested => resolved |
2012-11-07 10:48 | alex | Fixed in Version | => 5.2.1-B1 |
2012-11-07 10:48 | alex | Resolution | open => fixed |
2012-11-07 10:48 | alex | Assigned To | !COMMUNITY => alex |
2012-11-07 10:48 | alex | Changeset attached | 5.2.x r15620 |
2012-11-07 10:48 | alex | Note Added: 0005284 | |
2012-11-07 10:48 | alex | Assigned To | alex => !COMMUNITY |
2012-11-07 10:48 | alex | Status | needs testing => reviewed and tested |
2012-11-07 10:48 | alex | Note Added: 0005283 | |
2012-11-07 10:47 | alex | File Added: mod_rewrite_detection_1427_v2.patch | |
2012-11-07 09:21 | erik | Status | needs work => needs testing |
2012-11-07 09:21 | erik | Status | needs testing => needs work |
2012-11-07 09:21 | erik | Assigned To | erik => alex |
2012-11-07 09:20 | erik | Note Added: 0005274 | |
2012-11-07 09:20 | erik | Status | needs work => needs testing |
2012-11-07 09:19 | erik | File Added: mod_rewrite_detection_1427.patch | |
2012-11-07 09:19 | erik | File Deleted: mod_rewrite_detection_1427.patch | |
2012-11-07 07:26 | alex | Note Added: 0005267 | |
2012-11-07 07:26 | alex | Assigned To | => erik |
2012-11-07 07:26 | alex | Status | needs testing => needs work |
2012-11-07 06:41 | erik | Note Added: 0005266 | |
2012-11-07 06:41 | erik | Developer | => erik |
2012-11-07 06:41 | erik | Status | active => needs testing |
2012-11-07 06:41 | erik | File Added: mod_rewrite_detection_1427.patch | |
2012-11-05 10:28 | alex | New Issue | |
2012-11-05 10:28 | alex | Reference | => https://groups.google.com/d/topic/in-portal-bugs/Xw33wdGc3nI/discussion |
2012-11-05 10:28 | alex | Change Log Message | => Fixes mod-rewrite module detecting during installation/upgrade |
2012-11-05 10:28 | alex | Estimate Points | => 1 |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Web Development by Intechnic![]() In-Portal Open Source CMS |