Fixed bug #12436: Integrate checks concerning Suhosin/Hardened PHP in Install Tool...
authorRupert Germann <rupi@gmx.li>
Sat, 7 Nov 2009 18:37:39 +0000 (18:37 +0000)
committerRupert Germann <rupi@gmx.li>
Sat, 7 Nov 2009 18:37:39 +0000 (18:37 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6375 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/install/mod/class.tx_install.php

index 1b0826c..1ac1d6f 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2009-11-07  Rupert Germann  <rupi@gmx.li>
 
+       * Fixed bug #12436: Integrate checks concerning Suhosin/Hardened PHP in Install Tool (thanks to Oliver Hader)
        * Fixed bug #10792: Extensions cannot be looked up, when cache_extensions table is empty
        * Follow-up to bug #12499: re-added the removed function call and moved the deprecationLog call
 
index 8539092..f804e6a 100755 (executable)
@@ -1856,6 +1856,26 @@ From sub-directory:
                                }
                        }
                }
+
+                       // Suhosin/Hardened PHP:
+               $suhosinDescription = 'Suhosin limits the number of elements that can be submitted in forms to the server. ' .
+                       'This will affect for example the "All configuration" section in the Install Tool or Inline Relational ' .
+                       'Record Editing (IRRE) with many child records.';
+               if (extension_loaded('suhosin')) {
+                       $suhosinSuggestion = 'At least a value of 400 is suggested.';
+
+                       $suhosinRequestMaxVars = ini_get('suhosin.request.max_vars');
+                       $suhosinPostMaxVars = ini_get('suhosin.post.max_vars');
+                       $suhosinRequestMaxVarsType = ($suhosinRequestMaxVars < 400 ? 2 : -1);
+                       $suhosinPostMaxVarsType = ($suhosinPostMaxVars < 400 ? 2 : -1);
+                       $suhosinType = ($suhosinRequestMaxVars < 400 || $suhosinPostMaxVars < 400 ? 2 : -1);
+
+                       $this->message($ext, 'Suhosin/Hardened PHP is loaded', $suhosinDescription, $suhosinType);
+                       $this->message($ext, 'suhosin.request.max_vars: ' . $suhosinRequestMaxVars, $suhosinSuggestion, $suhosinRequestMaxVarsType);
+                       $this->message($ext, 'suhosin.post.max_vars: ' . $suhosinPostMaxVars, $suhosinSuggestion, $suhosinPostMaxVarsType);
+               } else {
+                       $this->message($ext, 'Suhosin/Hardened PHP is not loaded', $suhosinDescription, 0);
+               }
        }
 
        /**