In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Dependency Graph View Issue ] Relation Graph ] Vertical ]
related to child of duplicate of

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 article by setting custom environment variable in .htaccess file, like this:

<IfModule mod_rewrite.c>
    // Tell PHP that the mod_rewrite module is ENABLED.

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

Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker