Additional checks and fixes of php settings in GI mode.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 18 Mar 2009 12:22:49 +0000 (12:22 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 18 Mar 2009 12:22:49 +0000 (12:22 +0000)
.htaccess
CHANGELOG.txt
install/index.php

index b923b02e3372d8c329c9ae9e204b063d653cc1de..de47e678e2ea8a40abe56ff6725addb1d3cf162e 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -2,8 +2,14 @@
 # Maybe you might have problems
 # with other scripts that needs
 # register_globals ON
-php_flag magic_quotes_gpc Off
-php_flag register_globals Off
+<IfModule mod_php4.c>
+       php_flag magic_quotes_gpc Off
+       php_flag register_globals Off
+</IfModule>
+<IfModule mod_php5.c>
+       php_flag magic_quotes_gpc Off
+       php_flag register_globals Off
+</IfModule>
 
 #Sometimes neccessary to add those
 #
index 560c7462f9ac5b60d65563bc269b43af08d30fb9..0d0ca15a742cfa7fe0f493b1e892dcae9f44d4ea 100644 (file)
@@ -24,6 +24,12 @@ $ -> Affected files
 ! Release 2.1
 $ config.php
 
+18-Mar-2009 Janusz Dobrowolski
+# Additional php.ini checks and fixes for php in CGI mode
+$ /.htaccess
+  /install.html
+  /install/index.php
+
 16-Mar-2009 Janusz Dobrowolski
 # Fixed redirection after order cancelation.
 $ /sales/sales_order_entry.php
index 1c78b5328cbf31ca490d5100396fd5ab74e177b3..99d810a1ce96e30f5b418d5fe742076075b3f68b 100644 (file)
@@ -131,6 +131,30 @@ function change_os(type) {
                                ?>
                        </td>
                </tr>
+               <?php if (substr(php_sapi_name(), 0, 3) == 'cgi') {     ?>
+               <tr>
+                       <td width="140" style="color: #666666;">Magic Quotes GPC</td>
+                       <td width="35">
+                               <?php
+                               if(ini_get('magic_quotes_gpc')) {
+                                       echo '<font class="bad">Enabled</font>';
+                               } else {
+                                       echo '<font class="good">Disabled</font>';
+                               }
+                               ?>
+                       </td>
+                       <td width="140" style="color: #666666;">Register Globals</td>
+                       <td width="35">
+                               <?php
+                               if (ini_get('register_globals')) {
+                                       echo '<font class="bad">Enabled</font>';
+                               } else {
+                                       echo '<font class="good">Disabled</font>';
+                               }
+                               ?>
+                       </td>
+               </tr>
+               <?php } ?>
                </table>
                <table cellpadding="3" cellspacing="0" width="100%" align="center">
                <tr>