diff --git a/_install/index.php b/_install/index.php
index 64ea67d..c67e48c 100644
--- a/_install/index.php
+++ b/_install/index.php
@@ -307,17 +307,17 @@ function step1(){
$php_modules = (array) @apache_get_modules();
$l_modrewrite=(in_array('mod_rewrite',$php_modules)) ? 1:0;
- $class_alert['modrewrite']= ($l_modrewrite) ? 'install-ok' : 'install-alert';
- $alert_rewrite_na='';
}
// caso CGI
else{
$php_modules= array();
- $l_modrewrite='na';
- $class_alert['modrewrite']= 'install-na';
- $alert_rewrite_na=_('This information is not available, since it seems to be using PHP as CGI');
+ require_once("../inc/func.mod_rewrite.php");
+ $doc_root="http://".$_SERVER['HTTP_HOST'].str_replace("/_install/index.php",'',$_SERVER['PHP_SELF']);
+ $l_modrewrite=(check_mod_rewrite($doc_root)) ? 1:0;
}
+ $class_alert['modrewrite']= ($l_modrewrite) ? 'install-ok' : 'install-alert';
+ $alert_rewrite_na='';
$l_mysqli=(in_array('mysqli',$ext)) ? 1:0;
$l_mysql_old=(in_array('mysql',$ext)) ? 1:0;
diff --git a/admin/vfront.info.php b/admin/vfront.info.php
index 919c727..f376282 100644
--- a/admin/vfront.info.php
+++ b/admin/vfront.info.php
@@ -295,11 +295,24 @@
// IMPOSTAZIONI IMPORTANTI ---------------------------------------------------------------------------------------------------
$OUT.="
"._("Apache Modules")."
";
-$modules_apache=(array) @apache_get_modules();
-
-$flog.="ApacheLoadedModules: ".implode(",",$modules_apache)."\n";
+if(function_exists('apache_get_modules')){
+ $modules_apache=(array) @apache_get_modules();
+ $flog.="ApacheLoadedModules: ".implode(",",$modules_apache)."\n";
+ $apache_mod_rewrite=(in_array("mod_rewrite", $modules_apache)) ? ""._("YES")."" : ""._("NO")."";
+}
+else{
+ $flog.="ApacheLoadedModules: apache_get_modules() not available\n";
+ require_once("../inc/func.mod_rewrite.php");
+ if (check_mod_rewrite(FRONT_DOCROOT)) {
+ $flog.="mod_rewrite test succeeded\n";
+ $apache_mod_rewrite=""._("YES")."";
+ }
+ else{
+ $flog.="mod_rewrite test failed\n";
+ $apache_mod_rewrite=""._("NO")."";
+ }
+}
-$apache_mod_rewrite=(in_array("mod_rewrite", $modules_apache)) ? ""._("YES")."" : ""._("NO")."";
$OUT.=""._("Mod_rewrite:")." $apache_mod_rewrite\n";
$OUT.=""._("VFront requires the use of mod_rewrite for different functions, such as generating reports")."
\n";
diff --git a/inc/func.mod_rewrite.php b/inc/func.mod_rewrite.php
new file mode 100644
index 0000000..9afbd51
--- /dev/null
+++ b/inc/func.mod_rewrite.php
@@ -0,0 +1,8 @@
+
diff --git a/inc/mod_rewrite/.htaccess b/inc/mod_rewrite/.htaccess
new file mode 100644
index 0000000..3805d14
--- /dev/null
+++ b/inc/mod_rewrite/.htaccess
@@ -0,0 +1,4 @@
+
+RewriteEngine On
+RewriteRule ^test$ test.php
+
diff --git a/inc/mod_rewrite/test.php b/inc/mod_rewrite/test.php
new file mode 100644
index 0000000..0de2a9d
--- /dev/null
+++ b/inc/mod_rewrite/test.php
@@ -0,0 +1,2 @@
+