[FEATURE] Central system environment check 70/18870/11
authorChristian Kuhn <lolli@schwarzbu.ch>
Mon, 25 Feb 2013 20:50:02 +0000 (21:50 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 13 Mar 2013 21:47:24 +0000 (22:47 +0100)
This patch adds a new structure to the install tool to centralize
all system and especially PHP related system checks cluttered in
various modules and parts of the core at the moment.

The idea is to have a basic, standalone script to test for all
requirements TYPO3 CMS has in order to run smoothly. The script does
not use any TYPO3 core code and has no further dependencies. With
a later patch, the check will be integrated as the very first
step during install, to give a good indicator if the final
installed system will work well or if any system constraints are
not met.

Currently, the script is included as a new section in the install
tool, called "System environment", where all checks are performed
and each gives a status back. This will already help to support
questions on mailing lists and should be the first step every user
is guided to: "Do you have warnings or errors in the system
environment?". The install tool implementation should also help
already if moving an instance to a different server.

Furthermore, there is a simple integration in the reports module
that points to the install tool if issues are found.

The class structure is as simple as possible, it is very easy to
adapt single checks later on, the API is a single getStatus() method
that returns all check object of the specific tests. Due to the
nature of the script and the later usage in the installation
process, things like localization and so on are not done and
should also not be implemented later on.

Most current check code is fetched from existing install tool,
reports module and bootstrap code. This also make the main
Installer.php class of the install tool already a bit better
maintainable since 600 lines of code are removed from it.

Change-Id: I64387ca9aaa4b429ee4a909cdab4386180af0d45
Resolves: #46219
Releases: 6.1
Reviewed-on: https://review.typo3.org/18870
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
26 files changed:
typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php
typo3/sysext/core/Classes/Utility/PhpOptionsUtility.php
typo3/sysext/install/Classes/Exception.php [new file with mode: 0644]
typo3/sysext/install/Classes/Installer.php
typo3/sysext/install/Classes/Report/EnvironmentStatusReport.php [new file with mode: 0644]
typo3/sysext/install/Classes/Report/InstallStatusReport.php
typo3/sysext/install/Classes/Session.php
typo3/sysext/install/Classes/SystemEnvironment/AbstractStatus.php [new file with mode: 0644]
typo3/sysext/install/Classes/SystemEnvironment/Check.php [new file with mode: 0644]
typo3/sysext/install/Classes/SystemEnvironment/ErrorStatus.php [new file with mode: 0644]
typo3/sysext/install/Classes/SystemEnvironment/InfoStatus.php [new file with mode: 0644]
typo3/sysext/install/Classes/SystemEnvironment/NoticeStatus.php [new file with mode: 0644]
typo3/sysext/install/Classes/SystemEnvironment/OkStatus.php [new file with mode: 0644]
typo3/sysext/install/Classes/SystemEnvironment/StatusInterface.php [new file with mode: 0644]
typo3/sysext/install/Classes/SystemEnvironment/TestImages/jesus.gif [new file with mode: 0755]
typo3/sysext/install/Classes/SystemEnvironment/TestImages/jesus.png [new file with mode: 0755]
typo3/sysext/install/Classes/SystemEnvironment/WarningStatus.php [new file with mode: 0644]
typo3/sysext/install/Resources/Private/Language/Report/locallang.xlf [new file with mode: 0644]
typo3/sysext/install/Resources/Public/Images/menuSystemEnvironment.png [new file with mode: 0644]
typo3/sysext/install/Resources/Public/Stylesheets/general.css
typo3/sysext/install/ext_tables.php
typo3/sysext/install/mod/class.tx_install.php
typo3/sysext/install/report/class.tx_install_report_installstatus.php
typo3/sysext/install/requirements.php [deleted file]
typo3/sysext/reports/Classes/Report/Status/ConfigurationStatus.php
typo3/sysext/reports/Classes/Report/Status/SystemStatus.php

index 0d02b6a..3481a26 100644 (file)
@@ -57,8 +57,6 @@ class SystemEnvironmentBuilder {
         * @return void
         */
        static public function run($relativePathPart = '') {
-               self::ensureRequiredEnvironment();
-               self::checkGlobalsAreNotSetViaPostOrGet();
                self::defineBaseConstants();
                self::definePaths($relativePathPart);
                self::checkMainPathsExist();
@@ -72,42 +70,6 @@ class SystemEnvironmentBuilder {
        }
 
        /**
-        * Check php version requirement or exit script
-        *
-        * @return void
-        */
-       static protected function ensureRequiredEnvironment() {
-               if (version_compare(phpversion(), '5.3', '<')) {
-                       die('TYPO3 requires PHP 5.3.0 or higher.');
-               }
-               if (self::getPhpIniValueBoolean('register_globals')) {
-                       die('TYPO3 requires PHP setting "register_globals" set to Off. (Error: #1345284320)');
-               }
-       }
-
-       /**
-        * Cast a on/off php ini value to boolean
-        *
-        * @param string $configOption
-        * @return boolean TRUE if the given option is enabled, FALSE if disabled
-        * @see t3lib_utility_PhpOptions::getIniValueBoolean
-        */
-       static protected function getPhpIniValueBoolean($configOption) {
-               return filter_var(ini_get($configOption), FILTER_VALIDATE_BOOLEAN, array(FILTER_REQUIRE_SCALAR, FILTER_NULL_ON_FAILURE));
-       }
-
-       /**
-        * Exit script if globals are set via post or get
-        *
-        * @return void
-        */
-       static protected function checkGlobalsAreNotSetViaPostOrGet() {
-               if (isset($_POST['GLOBALS']) || isset($_GET['GLOBALS'])) {
-                       die('You cannot set the GLOBALS array from outside the script.');
-               }
-       }
-
-       /**
         * Define all simple constants that have no dependency to local configuration
         *
         * @return void
@@ -534,4 +496,4 @@ class SystemEnvironmentBuilder {
 }
 
 
-?>
+?>
\ No newline at end of file
index 27bd334..adf88ac 100644 (file)
@@ -37,8 +37,10 @@ class PhpOptionsUtility {
         * Check if php safe_mode is enabled
         *
         * @return boolean TRUE if safe_mode is enabled, FALSE if disabled
+        * @deprecated since 6.1, will be removed two versions later
         */
        static public function isSafeModeEnabled() {
+               GeneralUtility::logDeprecatedFunction();
                if (version_compare(phpversion(), '5.4', '<')) {
                        return self::getIniValueBoolean('safe_mode');
                }
@@ -49,8 +51,10 @@ class PhpOptionsUtility {
         * Check if php magic_quotes_gpc is enabled
         *
         * @return boolean TRUE if magic_quotes_gpc is enabled, FALSE if disabled
+        * @deprecated since 6.1, will be removed two versions later
         */
        static public function isMagicQuotesGpcEnabled() {
+               GeneralUtility::logDeprecatedFunction();
                if (version_compare(phpversion(), '5.4', '<')) {
                        return self::getIniValueBoolean('magic_quotes_gpc');
                }
diff --git a/typo3/sysext/install/Classes/Exception.php b/typo3/sysext/install/Classes/Exception.php
new file mode 100644 (file)
index 0000000..59d4619
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+namespace TYPO3\CMS\Install;
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Christian Kuhn <lolli@schwarzbu.ch>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * A generic install exception
+ */
+class Exception extends \Exception {
+
+}
+?>
\ No newline at end of file
index 5d29a90..f045669 100644 (file)
@@ -165,12 +165,6 @@ class Installer {
         */
        public $config_array = array(
                // Flags are set in this array if the options are available and checked ok.
-               'gd' => 0,
-               'gd_gif' => 0,
-               'gd_png' => 0,
-               'gd_jpg' => 0,
-               'freetype' => 0,
-               'safemode' => 0,
                'dir_typo3temp' => 0,
                'dir_temp' => 0,
                'im_versions' => array(),
@@ -204,6 +198,7 @@ class Installer {
         */
        public $menuitems = array(
                'config' => 'Basic Configuration',
+               'systemEnvironment' => 'System environment',
                'database' => 'Database Analyser',
                'update' => 'Upgrade Wizard',
                'images' => 'Image Processing',
@@ -215,22 +210,6 @@ class Installer {
                'logout' => 'Logout from Install Tool'
        );
 
-       // PHP modules which are required. Can be changed by hook in getMissingPhpModules()
-       protected $requiredPhpModules = array(
-               'fileinfo',
-               'filter',
-               'gd',
-               'json',
-               'mysql',
-               'pcre',
-               'session',
-               'SPL',
-               'standard',
-               'openssl',
-               'xml',
-               'zlib'
-       );
-
        /**
         * Backpath (used for icons etc.)
         *
@@ -316,6 +295,7 @@ class Installer {
                                'extConfig',
                                'cleanup',
                                'phpinfo',
+                               'systemEnvironment',
                                'typo3conf_edit',
                                'about',
                                'logout'
@@ -682,6 +662,10 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
                                $this->silent = 0;
                                $this->phpinformation();
                                break;
+                       case 'systemEnvironment':
+                               $this->silent = 0;
+                               $this->systemEnvironmentCheck();
+                               break;
                        case 'typo3conf_edit':
                                $this->silent = 0;
                                $this->typo3conf_edit();
@@ -1155,9 +1139,6 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
                }
                $paths = array_unique($paths);
                asort($paths);
-               if (\TYPO3\CMS\Core\Utility\PhpOptionsUtility::isSafeModeEnabled()) {
-                       $paths = array(ini_get('safe_mode_exec_dir'), '/usr/local/php/bin/');
-               }
                if ($this->INSTALL['checkIM']['lzw']) {
                        $this->checkIMlzw = 1;
                }
@@ -1333,6 +1314,69 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
        }
 
        /**
+        * Show system environment check
+        */
+       protected function systemEnvironmentCheck() {
+               /** @var $statusCheck \TYPO3\CMS\Install\SystemEnvironment\Check */
+               $statusCheck = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Install\\SystemEnvironment\\Check');
+               $statusObjects = $statusCheck->getStatus();
+
+               $orderedStatus = array(
+                       'ErrorStatus' => array(),
+                       'WarningStatus' => array(),
+                       'OkStatus' => array(),
+                       'InfoStatus' => array(),
+                       'NoticeStatus' => array(),
+               );
+
+               foreach ($statusObjects as $statusObject) {
+                       $className = get_class($statusObject);
+                       // Last part of class name
+                       $severityIdentifier = array_pop(explode('\\', $className));
+                       if (!is_array($orderedStatus[$severityIdentifier])) {
+                               throw new \TYPO3\CMS\Install\Exception('Unknown status severity type', 1362602559);
+                       }
+                       $orderedStatus[$severityIdentifier][] = $statusObject;
+               }
+
+               $severityToCssClass = array(
+                       'ErrorStatus' => 'error',
+                       'WarningStatus' => 'warning',
+                       'OkStatus' => 'ok',
+                       'InfoStatus' => 'information',
+                       'NoticeStatus' => 'notice',
+               );
+
+               $messageHtmlBoilerPlate =
+                       '<div class="typo3-message message-%1s" >' .
+                               '<div class="header-container" >' .
+                                       '<div class="message-header message-left" >%2s</div>' .
+                                       '<div class="message-header message-right" ></div>' .
+                               '</div >' .
+                               '<div class="message-body" >%3s</div>' .
+                       '</div >' .
+                       '<p></p>';
+
+               $html = '<h3>System environment check</h3>';
+               foreach ($orderedStatus as $severity) {
+                       foreach ($severity as $status) {
+                               /** @var $status \TYPO3\CMS\Install\SystemEnvironment\AbstractStatus */
+                               $className = get_class($status);
+                               // Last part of class name
+                               $severityIdentifier = array_pop(explode('\\', $className));
+                               $html .= sprintf(
+                                       $messageHtmlBoilerPlate,
+                                       $severityToCssClass[$severityIdentifier],
+                                       $status->getTitle(),
+                                       $status->getMessage()
+                               );
+                       }
+               }
+
+               $this->output($this->outputWrapper($html));
+       }
+
+       /**
         * Outputs system information
         *
         * @return void
@@ -1355,7 +1399,6 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
                $sVar['imagejpeg()'] = function_exists('imagejpeg');
                $sVar['imagettftext()'] = function_exists('imagettftext');
                $sVar['OTHER: IMAGE_TYPES'] = function_exists('imagetypes') ? imagetypes() : 0;
-               $sVar['OTHER: memory_limit'] = ini_get('memory_limit');
                $gE_keys = explode(',', 'SERVER_PORT,SERVER_SOFTWARE,GATEWAY_INTERFACE,SCRIPT_NAME,PATH_TRANSLATED');
                foreach ($gE_keys as $k) {
                        $sVar['SERVER: ' . $k] = $_SERVER[$k];
@@ -1880,415 +1923,12 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
         * @todo Define visibility
         */
        public function checkConfiguration() {
-               $ext = 'php.ini configuration checked';
+               $ext = 'php.ini configuration tests';
                $this->message($ext);
-               // *****************
-               // Incoming values:
-               // *****************
-               // Includepath
-               $incPaths = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(TYPO3_OS == 'WIN' ? ';' : ':', ini_get('include_path'));
-               if (!in_array('.', $incPaths)) {
-                       $this->message($ext, 'Current directory (./) is not in include path!', '
-                               <p>
-                                       <em>include_path=' . ini_get('include_path') . '</em>
-                                       <br />
-                                       Normally the current path, \'.\', is included in the
-                                       include_path of PHP. Although TYPO3 does not rely on this,
-                                       it is an unusual setting that may introduce problems for
-                                       some extensions.
-                               </p>
-                       ', 1);
-               } else {
-                       $this->message($ext, 'Current directory in include path', '', -1);
-               }
-               // *****************
-               // File uploads
-               // *****************
-               if (!ini_get('file_uploads')) {
-                       $this->message($ext, 'File uploads not allowed', '
-                               <p>
-                                       <em>file_uploads=' . ini_get('file_uploads') . '</em>
-                                       <br />
-                                       TYPO3 uses the ability to upload files from the browser in
-                                       various cases.
-                                       <br />
-                                       As long as this flag is disabled, you\'ll not be able to
-                                       upload files.
-                                       <br />
-                                       But it doesn\'t end here, because not only are files not
-                                       accepted by the server - ALL content in the forms are
-                                       discarded and therefore nothing at all will be editable
-                                       if you don\'t set this flag!
-                                       <br />
-                                       However if you cannot enable fileupload for some reason
-                                       alternatively you change the default form encoding value
-                                       with \\$TYPO3_CONF_VARS[SYS][form_enctype].
-                               </p>
-                       ', 3);
-               } else {
-                       $this->message($ext, 'File uploads allowed', '', -1);
-               }
-               $upload_max_filesize = \TYPO3\CMS\Core\Utility\GeneralUtility::getBytesFromSizeMeasurement(ini_get('upload_max_filesize'));
-               $post_max_size = \TYPO3\CMS\Core\Utility\GeneralUtility::getBytesFromSizeMeasurement(ini_get('post_max_size'));
-               if ($upload_max_filesize < 1024 * 1024 * 10) {
-                       $this->message($ext, 'Maximum upload filesize too small?', '
-                               <p>
-                                       <em>upload_max_filesize=' . ini_get('upload_max_filesize') . '</em>
-                                       <br />
-                                       By default TYPO3 supports uploading, copying and moving
-                                       files of sizes up to 10MB (You can alter the TYPO3 defaults
-                                       by the config option TYPO3_CONF_VARS[BE][maxFileSize]).
-                                       <br />
-                                       Your current value is below this, so at this point, PHP sets
-                                       the limits for uploaded filesizes and not TYPO3.
-                                       <br />
-                                       <strong>Notice:</strong> The limits for filesizes attached
-                                       to database records are set in the configuration
-                                       files (\\$TCA) for each group/file field. You may override
-                                       these values in the local configuration or by page TSconfig settings.
-                               </p>
-                       ', 1);
-               }
-               if ($upload_max_filesize > $post_max_size) {
-                       $this->message($ext, 'Maximum size for POST requests is smaller than max. upload filesize', '
-                               <p>
-                                       <em>upload_max_filesize=' . ini_get('upload_max_filesize') . '
-                                       , post_max_size=' . ini_get('post_max_size') . '</em>
-                                       <br />
-                                       You have defined a maximum size for file uploads which
-                                       exceeds the allowed size for POST requests. Therefore the
-                                       file uploads can not be larger than ' . ini_get('post_max_size') . '
-                               </p>
-                       ', 1);
-               }
-               // *****************
-               // Memory and functions
-               // *****************
-               $memory_limit_value = \TYPO3\CMS\Core\Utility\GeneralUtility::getBytesFromSizeMeasurement(ini_get('memory_limit'));
-               if ($memory_limit_value <= 0) {
-                       $this->message($ext, 'Unlimited memory limit!', '<p>Your webserver is configured to not limit PHP memory usage at all. This is a risk
-                               and should be avoided in production setup. In general it\'s best practice to limit this
-                               in the configuration of your webserver. To be safe, ask the system administrator of the
-                               webserver to raise the limit to something over ' . TYPO3_REQUIREMENTS_MINIMUM_PHP_MEMORY_LIMIT . '.</p>', 2);
-               } elseif ($memory_limit_value < \TYPO3\CMS\Core\Utility\GeneralUtility::getBytesFromSizeMeasurement(TYPO3_REQUIREMENTS_MINIMUM_PHP_MEMORY_LIMIT)) {
-                       $this->message($ext, 'Memory limit below ' . TYPO3_REQUIREMENTS_MINIMUM_PHP_MEMORY_LIMIT, '
-                               <p>
-                                       <em>memory_limit=' . ini_get('memory_limit') . '</em>
-                                       <br />
-                                       Your system is configured to enforce a memory limit of PHP
-                                       scripts lower than ' . TYPO3_REQUIREMENTS_MINIMUM_PHP_MEMORY_LIMIT . '.
-                                       The Extension Manager needs to include more PHP-classes than
-                                       will fit into this memory space. There is nothing else to do
-                                       than raise the limit. To be safe, ask the system
-                                       administrator of the webserver to raise the limit to over
-                                       ' . TYPO3_REQUIREMENTS_MINIMUM_PHP_MEMORY_LIMIT . '.
-                               </p>
-                       ', 3);
-               } else {
-                       $this->message($ext, 'Memory limit: ' . ini_get('memory_limit'), '', -1);
-               }
-               if (ini_get('max_execution_time') < 30) {
-                       $this->message($ext, 'Maximum execution time below 30 seconds', '
-                               <p>
-                                       <em>max_execution_time=' . ini_get('max_execution_time') . '</em>
-                                       <br />
-                                       May impose problems if too low.
-                               </p>
-                       ', 1);
-               } else {
-                       $this->message($ext, 'Maximum execution time: ' . ini_get('max_execution_time') . ' seconds', '', -1);
-               }
-               if (ini_get('disable_functions')) {
-                       $this->message($ext, 'Functions disabled!', '
-                               <p>
-                                       <em>disable_functions=' . ini_get('disable_functions') . '</em>
-                                       <br />
-                                       The above list of functions are disabled. If TYPO3 use any
-                                       of these there might be trouble.
-                                       <br />
-                                       TYPO3 is designed to use the default set of PHP4.3.0+
-                                       functions plus the functions of GDLib.
-                                       <br />
-                                       Possibly these functions are disabled due to security risks
-                                       and most likely the list would include a function like
-                                       <em>exec()</em> which is use by TYPO3 to access ImageMagick.
-                               </p>
-                       ', 2);
-               } else {
-                       $this->message($ext, 'Functions disabled: none', '', -1);
-               }
-               // Mail tests
-               if (TYPO3_OS == 'WIN') {
-                       $smtp = ini_get('SMTP');
-                       $bad_smtp = FALSE;
-                       if (!\TYPO3\CMS\Core\Utility\GeneralUtility::validIP($smtp)) {
-                               $smtp_addr = @gethostbyname($smtp);
-                               $bad_smtp = $smtp_addr == $smtp;
-                       } else {
-                               $smtp_addr = $smtp;
-                       }
-                       if (!$smtp || $bad_smtp || !\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger(ini_get('smtp_port'))) {
-                               $this->message($ext, 'Mail configuration is not set correctly', '
-                                       <p>
-                                               Mail configuration is not set
-                                               <br />
-                                               PHP mail() function requires SMTP and smtp_port to have
-                                               correct values on Windows.
-                                       </p>
-                               ', 2);
-                       } else {
-                               if (($smtp_addr == '127.0.0.1' || $smtp_addr == '::1') && ($_SERVER['SERVER_ADDR'] == '127.0.0.1' || $_SERVER['SERVER_ADDR'] == '::1')) {
-                                       $this->message($ext, 'Mail is configured (potential problem exists!)', '
-                                               <p>
-                                                       <em>SMTP=' . $smtp . '</em> - <strong>Note:</strong>
-                                                       this server! Are you sure it runs SMTP server?
-                                                       <br />
-                                                       <em>smtp_port=' . ini_get('smtp_port') . '</em>
-                                               </p>' . $this->check_mail('get_form') . '
-                                       ', 1);
-                               } else {
-                                       $this->message($ext, 'Mail is configured', '
-                                               <p>
-                                                       <em>SMTP=' . $smtp . '</em>
-                                                       <br />
-                                                       <em>smtp_port=' . ini_get('smtp_port') . '</em>
-                                               </p>' . $this->check_mail('get_form') . '
-                                       ', -1);
-                               }
-                       }
-               } elseif (!ini_get('sendmail_path')) {
-                       $this->message($ext, 'Sendmail path not defined!', '
-                               <p>
-                                       This may be critical to TYPO3\'s use of the mail() function.
-                                       Please be sure that the mail() function in your
-                                       php-installation works!
-                               </p>' . $this->check_mail('get_form') . '
-                       ', 1);
-               } else {
-                       list($prg) = explode(' ', ini_get('sendmail_path'));
-                       if (!@is_executable($prg)) {
-                               $this->message($ext, 'Sendmail program not found or not executable?', '
-                                       <p>
-                                               <em>sendmail_path=' . ini_get('sendmail_path') . '</em>
-                                               <br />
-                                               This may be critical to TYPO3\'s use of the mail()
-                                               function. Please be sure that the mail() function in
-                                               your php-installation works!
-                                       </p>' . $this->check_mail('get_form') . '
-                               ', 1);
-                       } else {
-                               $this->message($ext, 'Sendmail OK', '
-                                       <p>
-                                               <em>sendmail_path=' . ini_get('sendmail_path') . '</em>
-                                       </p>' . $this->check_mail('get_form') . '
-                               ', -1);
-                       }
-               }
-               // *****************
-               // Safe mode related
-               // *****************
-               if (\TYPO3\CMS\Core\Utility\PhpOptionsUtility::isSafeModeEnabled()) {
-                       $this->message($ext, 'Safe mode turned on', '
-                               <p>
-                                       <em>safe_mode=' . ini_get('safe_mode') . '</em>
-                                       <br />
-                                       In safe_mode PHP is restricted in several ways. This is a
-                                       good thing because it adds protection to your (and others)
-                                       scripts. But it may also introduce problems. In TYPO3 this
-                                       <em>may be</em> a problem in two areas: File administration
-                                       and execution of external programs, in particular
-                                       ImageMagick.
-                                       <br />
-                                       If you just ignore this warning, you\'ll most likely find,
-                                       that TYPO3 seems to work except from the image-generation.
-                                       The problem in that case is that the external ImageMagick
-                                       programs are not allowed to be executed from the regular
-                                       paths like "/usr/bin/" or "/usr/X11R6/bin/".
-                                       <br />
-                                       If you use safe_mode with TYPO3, you should disable use of
-                                       external programs ([BE][disable_exec_function]=1).
-                                       <br />
-                                       In safe mode you must ensure that all the php-scripts and
-                                       upload folders are owned by the same user.
-                               </p>
-                               <p>
-                                       <em>safe_mode_exec_dir=' . ini_get('safe_mode_exec_dir') . '</em>
-                                       <br />
-                                       If the ImageMagick utilities are located in this directory,
-                                       everything is fine. Below on this page, you can see if
-                                       ImageMagick is found here. If not, ask you ISP to put the
-                                       three ImageMagick programs, \'convert\',
-                                       \'combine\'/\'composite\' and \'identify\' there (eg. with
-                                       symlinks if Unix server)
-                               </p>
-                               <p>
-                                       <strong>Example of safe_mode settings:</strong>
-                                       <br />
-                                       Set this in the php.ini file:
-                               </p>
-                               <p>
-                                       ; Safe Mode
-                                       <br />
-                                       safe_mode = On
-                                       <br />
-                                       safe_mode_exec_dir = /usr/bin/
-                               </p>
-                               <p>
-                                       ...and the ImageMagick \'/usr/bin/convert\' will be
-                                       executable.
-                                       <br />
-                                       The last slash is important (..../) and you can only specify
-                                       one directory.
-                               </p>
-                               <p>
-                                       <strong>Notice: </strong>
-                                       <br />
-                                       ImageMagick 6 or GraphicsMagick is recommended and the binaries are
-                                       normally installed in /usr/bin.
-                                       <br />
-                                       Paths to ImageMagick are defined in local configuration and may be
-                                       something else than /usr/bin/, but this is default for
-                                       ImageMagick 6+
-                               </p>
-                       ', 2);
-                       if (ini_get('doc_root')) {
-                               $this->message($ext, 'doc_root set', '
-                                       <p>
-                                               <em>doc_root=' . ini_get('doc_root') . '</em>
-                                               <br />
-                                               PHP cannot execute scripts outside this directory. If
-                                               that is a problem is please correct it.
-                                       </p>
-                               ', 1);
-                       }
-                       $this->config_array['safemode'] = 1;
-               } else {
-                       $this->message($ext, 'safe_mode: off', '', -1);
-               }
+               $this->message($ext, 'Mail test', $this->check_mail('get_form'), -1);
+
                if (\TYPO3\CMS\Core\Utility\PhpOptionsUtility::isSqlSafeModeEnabled()) {
-                       $this->message($ext, 'sql.safe_mode is enabled', '
-                               <p>
-                                       <em>sql.safe_mode=' . ini_get('sql.safe_mode') . '</em>
-                                       <br />
-                                       This means that you can only connect to the database with a
-                                       username corresponding to the user of the webserver process
-                                       or fileowner. Consult your ISP for information about this.
-                                       Also see <a href="http://www.wrox.com/Consumer/Store/Books/2963/29632002.htm">
-                                       http://www.wrox.com/Consumer/Store/Books/2963/29632002.htm</a>
-                                       <br />
-                                       The owner of the current file is:
-                                       <strong>' . get_current_user() . '</strong>
-                               </p>
-                       ', 1);
                        $this->config_array['sql.safe_mode_user'] = get_current_user();
-               } else {
-                       $this->message($ext, 'sql.safe_mode: off', '', -1);
-               }
-               if (ini_get('open_basedir')) {
-                       $this->message($ext, 'open_basedir set', '
-                               <p>
-                                       <em>open_basedir=' . ini_get('open_basedir') . '</em>
-                                       <br />
-                                       This restricts TYPO3 to open and include files only in this
-                                       path. Please make sure that this does not prevent TYPO3 from
-                                       running.
-                                       <br />
-                                       <strong>Notice (UNIX):</strong> Before checking a path
-                                       according to open_basedir, PHP resolves all symbolic links.
-                               </p>
-                       ', 1);
-               } else {
-                       $this->message($ext, 'open_basedir: off', '', -1);
-               }
-               // Check availability of PHP session support
-               if (extension_loaded('session')) {
-                       $this->message($ext, 'PHP sessions available', '
-                               <p>
-                                       <em>PHP Sessions available</em>
-                                       <br />
-                                       PHP is compiled with session support and session support is
-                                       available.
-                               </p>
-                       ', -1);
-               } else {
-                       $this->message($ext, 'PHP Sessions not available', '
-                               <p>
-                                       PHP is not compiled with session support, or session support
-                                       is disabled in php.ini.
-                                       <br />
-                                       TYPO3 needs session support.
-                               </p>
-                       ', 3);
-               }
-               // Suhosin/Hardened PHP:
-               $suhosinDescription = '
-                       <p>
-                               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.
-                       </p>';
-               if (extension_loaded('suhosin')) {
-                       $suhosinSuggestion = '
-                               <p>
-                                       At least a value of 400 is suggested.
-                               </p>
-                       ';
-                       $suhosinSuggestionGetMaxValueLength = '
-                               <p>
-                                       At least a value of 2000 is suggested.
-                               </p>
-                       ';
-                       $suhosinRequestMaxVars = ini_get('suhosin.request.max_vars');
-                       $suhosinPostMaxVars = ini_get('suhosin.post.max_vars');
-                       $suhosinGetMaxValueLength = ini_get('suhosin.get.max_value_length');
-                       $suhosinRequestMaxVarsType = $suhosinRequestMaxVars < 400 ? 2 : -1;
-                       $suhosinPostMaxVarsType = $suhosinPostMaxVars < 400 ? 2 : -1;
-                       $suhosinGetMaxValueLengthType = $suhosinGetMaxValueLength < 2000 ? 2 : -1;
-                       $suhosinType = $suhosinRequestMaxVars < 400 || $suhosinPostMaxVars < 400 || $suhosinGetMaxValueLength < 2000 ? 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);
-                       $this->message($ext, 'suhosin.get.max_value_length: ' . $suhosinGetMaxValueLength, $suhosinSuggestionGetMaxValueLength, $suhosinGetMaxValueLengthType);
-               } else {
-                       $this->message($ext, 'Suhosin/Hardened PHP is not loaded', $suhosinDescription, 0);
-               }
-               // Check for stripped PHPdoc comments that are required to evaluate annotations:
-               $method = new \ReflectionMethod('TYPO3\\CMS\\Install\\Installer', 'check_mail');
-               if (strlen($method->getDocComment()) === 0) {
-                       $description = '
-                               <p>
-                                       The system extension Extbase evaluates annotations in PHPdoc
-                                       comments and thus requires eAccelerator not to strip away
-                                       these parts. However, this is currently the only part in the
-                                       TYPO3 Core (beside deprecation log and unit tests). If
-                                       Extbase is not used, recompiling eAccelerator is not
-                                       required at all.
-                                       <br/>
-                                       <br/>
-                                       If you do not want comments to be stripped by eAccelerator,
-                                       please recompile with the following configuration setting
-                                       (<a href="http://eaccelerator.net/ticket/229" target="_blank">
-                                       more details</a>):
-                                       <br />
-                                       <em>--with-eaccelerator-doc-comment-inclusion</em>
-                               </p>
-                       ';
-                       $this->message($ext, 'PHPdoc comments are stripped', $description, 2);
-               }
-               // ThreadStackSize on Windows systems with Apache
-               $threadStackSizeDescription = '
-                       <p>
-                               Fluid uses complex regular expressions which require a lot of stack space during the first processing.
-                               On Windows the default stack size for Apache is a lot smaller than on unix.
-                               You can increase the size to 8MB (default on unix) by adding to the httpd.conf:
-                               <br /><br />&lt;IfModule mpm_winnt_module&gt;
-                               <br />ThreadStackSize 8388608
-                               <br />&lt;/IfModule&gt;
-                               <br /><br />Restart Apache after this change.
-                       </p>';
-               if (TYPO3_OS === 'WIN' && substr($_SERVER['SERVER_SOFTWARE'], 0, 6) === 'Apache') {
-                       $this->message($ext, 'ThreadStackSize', $threadStackSizeDescription, 2);
                }
        }
 
@@ -2351,119 +1991,20 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
         * @todo Define visibility
         */
        public function checkExtensions() {
+               if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('testingTrueTypeSupport')) {
+                       $this->checkTrueTypeSupport();
+               }
                $ext = 'GDLib';
                $this->message($ext);
-               $software_info = 1;
-               if (extension_loaded('gd') && $this->isGD()) {
-                       $this->config_array['gd'] = 1;
-                       $this->message($ext, 'GDLib found', '', -1);
-                       if ($this->isPNG()) {
-                               $this->config_array['gd_png'] = 1;
-                               $this->message($ext, 'PNG supported', '', -1);
-                       }
-                       if ($this->isGIF()) {
-                               $this->config_array['gd_gif'] = 1;
-                               $this->message($ext, 'GIF supported', '', -1);
-                       }
-                       if ($this->isJPG()) {
-                               $this->config_array['gd_jpg'] = 1;
-                               $this->message($ext, 'JPG supported (not used by TYPO3)', '');
-                       }
-                       if (!$this->config_array['gd_gif'] && !$this->config_array['gd_png']) {
-                               $this->message($ext, 'PNG or GIF not supported', '
-                                       <p>
-                                               Your GDLib supports either GIF nor PNG. It must support
-                                               either one of them.
-                                       </p>
-                               ', 2);
-                       } else {
-                               $msg = array();
-                               if ($this->config_array['gd_gif'] && $this->config_array['gd_png']) {
-                                       $msg[] = '
-                                               <p>
-                                                       You can choose between generating GIF or PNG files,
-                                                       as your GDLib supports both.
-                                               </p>
-                                       ';
-                               }
-                               if ($this->config_array['gd_gif']) {
-                                       $msg[] = '
-                                               <p>
-                                                       You should watch out for the generated size of the
-                                                       GIF-files because some versions of the GD library do
-                                                       not compress them with LZW, but RLE and ImageMagick
-                                                       is subsequently used to compress with LZW. But in
-                                                       the case of ImageMagick failing this task (eg. not
-                                                       being compiled with LZW which is the case with some
-                                                       versions) you\'ll end up with GIF-filesizes all too
-                                                       big!
-                                                       <br />
-                                                       This Install Tool tests what kinds of GIF
-                                                       compression are available in the ImageMagick
-                                                       installations by a physical test. You can also check
-                                                       it manually by opening a TYPO3 generated gif-file
-                                                       with Photoshop and save it in a new file. If the
-                                                       file sizes of the original and the new file are
-                                                       almost the same, you\'re having LZW compression and
-                                                       everything is fine.
-                                               </p>
-                                       ';
-                               }
-                               if ($this->config_array['gd_png']) {
-                                       $msg[] = '
-                                               <p>
-                                                       TYPO3 prefers the use of GIF-files and most likely
-                                                       your visitors on your website does too as not all
-                                                       browsers support PNG yet.
-                                               </p>
-                                       ';
-                               }
-                               $this->message($ext, 'GIF / PNG issues', implode(LF, $msg), 1);
-                       }
-                       if (!$this->isTTF()) {
-                               $this->message($ext, 'FreeType is apparently not installed', '
-                                       <p>
-                                               It looks like the FreeType library is not compiled into
-                                               GDLib. This is required when TYPO3 uses GDLib and
-                                               you\'ll most likely get errors like \'ImageTTFBBox is
-                                               not a function\' or \'ImageTTFText is not a function\'.
-                                       </p>
-                               ', 2);
-                       } else {
-                               $this->message($ext, 'FreeType quick-test (' . ($this->isGIF() ? 'as GIF' : 'as PNG') . ')', '
-                                       <p>
-                                               <img src="' . htmlspecialchars((\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI') . '&testingTrueTypeSupport=1')) . '" alt="" />
-                                               <br />
-                                               (If the text is exceeding the image borders you are
-                                               using Freetype 2 and need to set
-                                               TYPO3_CONF_VARS[GFX][TTFdpi]=96.
-                                               <br />
-                                               If there is no image at all Freetype is most likely NOT
-                                               available and you can just as well disable GDlib for
-                                               TYPO3...)
-                                       </p>
-                               ', -1);
-                               $this->config_array['freetype'] = 1;
-                       }
-               } else {
-                       $this->message($ext, 'GDLib2 not found', '
-                               <p>
-                                       GDLib2 is required if you want to use the GIFBUILDER object
-                                       in TypoScript. GIFBUILDER is in charge of all advanced image
-                                       generation in TypoScript, including graphical menuitems.
-                                       <br />
-                                       GDLib2 is also used in the TYPO3 Backend (TBE) to generate
-                                       record icons and new module tabs.
-                                       <br />
-                                       It\'s highly recommended to install this library. Remember
-                                       to compile GD with FreeType which is also required.
-                                       <br />
-                                       If you choose not to install GDLib, you can disable it in
-                                       the configuration with [GFX][gdlib]=0;.
-                               </p>
-                       ', 2);
-               }
-               $this->message($ext, 'GDLib software information', $this->getGDSoftwareInfo());
+               $this->message($ext, 'FreeType quick-test (as GIF)', '
+                       <p>
+                               <img src="' . htmlspecialchars((\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI') . '&testingTrueTypeSupport=1')) . '" alt="" />
+                               <br />
+                               If the text is exceeding the image borders you are
+                               using Freetype 2 and need to set
+                               TYPO3_CONF_VARS[GFX][TTFdpi]=96.
+                       </p>
+               ', -1);
        }
 
        /**
@@ -3449,16 +2990,11 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
        }
 
        /**
-        * Calculates the suggested setup that should be written to localconf.php
-        *
-        * If safe_mode
-        * - disable_exec_function = 1
-        * - im = 0
+        * Calculates the suggested setup that should be written to typo3conf/LocalConfiguration.php
         *
         * if PNG/GIF/GD
         * - disable gdlib if nothing
         * - select png/gif if only one of them is available, else PNG/GIF selector, defaulting to GIF
-        * - (safe_mode is on)
         * - im_path (default to 4.2.9, preferable with LZW)            im_ver5-flag is set based on im_path being 4.2.9 or 5+
         * - im_path_lzw (default to LZW version, pref. 4.2.9)
         *
@@ -3473,20 +3009,7 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
                $formArray['im_version_5'] = array('');
                $formArray['im'] = array(1);
                $formArray['gdlib'] = array(1);
-               if ($this->config_array['gd'] && ($this->config_array['gd_gif'] || $this->config_array['gd_png'])) {
-                       if ($this->config_array['gd_gif'] && !$this->config_array['gd_png']) {
-                               $formArray['gdlib_png'] = array(0);
-                       } elseif (!$this->config_array['gd_gif'] && $this->config_array['gd_png']) {
-                               $formArray['gdlib_png'] = array(1);
-                       } else {
-                               $formArray['gdlib_png'] = array(0, 1);
-                       }
-               } else {
-                       $formArray['gdlib'] = array(0);
-               }
-               if ($this->config_array['safemode']) {
-                       $formArray['disable_exec_function'] = array(1);
-               }
+               $formArray['gdlib_png'] = array(0, 1);
                if ($this->config_array['im']) {
                        $formArray['im'] = array(1);
                        $found = ($LZW_found = 0);
@@ -3544,49 +3067,43 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
        /**
         * Returns TRUE if TTF lib is installed.
         *
-        * @return boolean TRUE if TrueType support
-        * @todo Define visibility
+        * @return void
         */
-       public function isTTF() {
-               // Return right away if imageTTFtext does not exist.
-               if (!function_exists('imagettftext')) {
-                       return 0;
-               }
-               // try, print truetype font:
+       public function checkTrueTypeSupport() {
                $im = @imagecreate(300, 50);
                $background_color = imagecolorallocate($im, 255, 255, 55);
                $text_color = imagecolorallocate($im, 233, 14, 91);
-               $test = @imagettftext($im, \TYPO3\CMS\Core\Utility\GeneralUtility::freetypeDpiComp(20), 0, 10, 20, $text_color, (PATH_t3lib . '/fonts/vera.ttf'), 'Testing Truetype support');
-               if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('testingTrueTypeSupport')) {
-                       if ($this->isGIF()) {
-                               header('Content-type: image/gif');
-                               imagegif($im);
-                       } else {
-                               header('Content-type: image/png');
-                               imagepng($im);
-                       }
-                       die;
-               }
-               return is_array($test) ? 1 : 0;
+               @imagettftext(
+                       $im,
+                       \TYPO3\CMS\Core\Utility\GeneralUtility::freetypeDpiComp(20),
+                       0,
+                       10,
+                       20,
+                       $text_color,
+                       (PATH_t3lib . '/fonts/vera.ttf'),
+                       'Testing Truetype support'
+               );
+               header('Content-type: image/gif');
+               imagegif($im);
+               die;
        }
 
        /**
-        * Checks if the essential PHP modules are loaded
+        * Checks if extensions need further PHP modules
         *
         * @return array list of modules which are missing
         */
        protected function getMissingPhpModules() {
-               // Hook to adjust the required PHP modules in the 1-2-3 installer
-               $modules = $this->requiredPhpModules;
+               // Hook to add additional required PHP modules in the 1-2-3 installer
+               $modules = array();
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install/mod/class.tx_install.php']['requiredPhpModules'])) {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install/mod/class.tx_install.php']['requiredPhpModules'] as $classData) {
                                $hookObject = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classData);
                                $modules = $hookObject->setRequiredPhpModules($modules, $this);
                        }
                }
-               $this->requiredPhpModules = $modules;
                $result = array();
-               foreach ($this->requiredPhpModules as $module) {
+               foreach ($modules as $module) {
                        if (is_array($module)) {
                                $detectedSubmodules = FALSE;
                                foreach ($module as $submodule) {
@@ -3606,99 +3123,6 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
                return $result;
        }
 
-       /*****************************************
-        *
-        * ABOUT the isXXX functions.
-        *
-        * I had a very real experience that these checks DID NOT fail eg PNG support if it didn't exist!
-        * So first (1) we check if the functions are there. If they ARE we are going to make further investigations (2) by creating an actual image.
-        * And if THAT succeeds also, then we can be certain of the support!
-        */
-       /**
-        * Check if GD module is available by checking the function imagecreate
-        *
-        * @return boolean TRUE if GD is available
-        * @todo Define visibility
-        */
-       public function isGD() {
-               if (function_exists('imagecreatetruecolor')) {
-                       if (@imagecreatetruecolor(50, 100)) {
-                               return 1;
-                       }
-               }
-               return 0;
-       }
-
-       /**
-        * Check if GIF functions are available
-        *
-        * @return boolean TRUE if GIF functions are available
-        * @todo Define visibility
-        */
-       public function isGIF() {
-               // If GIF-functions exists, also do a real test of them:
-               if (function_exists('imagecreatefromgif') && function_exists('imagegif') && $this->ImageTypes() & IMG_GIF) {
-                       $im = @imagecreatefromgif((\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('install') . 'imgs/jesus.gif'));
-                       return $im ? 1 : 0;
-               }
-       }
-
-       /**
-        * Check if JPG functions are available
-        *
-        * @return boolean TRUE if JPEG functions are available
-        * @todo Define visibility
-        */
-       public function isJPG() {
-               if (function_exists('imagecreatefromjpeg') && function_exists('imagejpeg') && $this->ImageTypes() & IMG_JPG) {
-                       return 1;
-               }
-       }
-
-       /**
-        * Check if PNG functions are available
-        *
-        * @return boolean TRUE if PNG functions are available
-        * @todo Define visibility
-        */
-       public function isPNG() {
-               if (function_exists('imagecreatefrompng') && function_exists('imagepng') && $this->ImageTypes() & IMG_PNG) {
-                       $im = imagecreatefrompng(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('install') . 'imgs/jesus.png');
-                       return $im ? 1 : 0;
-               }
-       }
-
-       /**
-        * Return the image types supported by this PHP build
-        *
-        * @return integer A bit-field corresponding to the image formats supported by the version of GD linked into PHP. The following bits are returned, IMG_GIF | IMG_JPG | IMG_PNG | IMG_WBMP | IMG_XPM.
-        * @todo Define visibility
-        */
-       public function ImageTypes() {
-               return imagetypes();
-       }
-
-       /**
-        * Returns general information about GDlib
-        *
-        * @return string HTML with GD lib information
-        * @todo Define visibility
-        */
-       public function getGDSoftwareInfo() {
-               return '
-                       <p>
-                               You can get GDLib in the PNG version from
-                               <a href="http://www.libgd.org/">http://www.libgd.org/</a>
-                               <br />
-                               FreeType is for download at
-                               <a href="http://www.freetype.org/">http://www.freetype.org/</a>
-                               <br />
-                               Generally, TYPO3 packages are listed at
-                               <a href="' . TYPO3_URL_DOWNLOAD . '">' . TYPO3_URL_DOWNLOAD . '</a>
-                       </p>
-               ';
-       }
-
        /**
         * Returns general information about configuration of TYPO3.
         *
@@ -3745,11 +3169,6 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
         * Imagemagick
         * - Read formats
         * - Write png, gif, jpg
-        *
-        * Problems may arise from the use of safe_mode (eg. png)
-        * In safemode you will automatically execute the program convert in the safe_mode_exec_path no matter what other path you specify
-        * check fileexist before anything...
-        *
         * - compare gif size
         * - scaling (by stdgraphic)
         * - combining (by stdgraphic)
@@ -3800,11 +3219,9 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
                                by setting [GFX][im_version_5] to \'gm\'. This is recommended and
                                enabled by default.
                                <br />
-                               Because ImageMagick and Graphicsmagick are external programs, two
-                               requirements must be met: 1) The programs must be installed on the
-                               server and working and 2) if safe_mode is enabled, the programs must
-                               be located in the folder defined by the php.ini setting,
-                               <em>safe_mode_exec_dir</em> (else they are not executed).
+                               Because ImageMagick and Graphicsmagick are external programs, a
+                               requirement must be met: The programs must be installed on the
+                               server and working.
                                <br />
                                ImageMagick is available for both Windows and Unix. The current
                                version is 6+.
@@ -3819,13 +3236,11 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
                                TypoScript GIFBUILDER object is based on GDlib, but extensively
                                utilizing ImageMagick to process intermediate results.
                                <br />
-                               GDLib is accessed through internal functions in PHP, so in this
-                               case, you have no safe_mode problems, but you\'ll need a version
+                               GDLib is accessed through internal functions in PHP, you\'ll need a version
                                of PHP with GDLib compiled in. Also in order to use TrueType
                                fonts with GDLib you\'ll need FreeType compiled in as well.
                                <br />
                        </p>
-                       ' . $this->getGDSoftwareInfo() . '
                        <p>
                                You can disable all image processing options in TYPO3
                                ([GFX][image_processing]=0), but that would seriously disable
@@ -4008,13 +3423,9 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
                // Very temporary!!!
                $imageProc->dontUnlinkTempFiles = 0;
                $imActive = $this->config_array['im'] && $im_path;
-               $gdActive = $this->config_array['gd'] && $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib'];
+               $gdActive = $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib'];
                switch ($this->INSTALL['images_type']) {
                case 'read':
-                       $refParseTime = '5600';
-                       // 4.2.9
-                       $refParseTime = '3300';
-                       // 5.2.3
                        $headCode = 'Reading and converting images';
                        $this->message($headCode, 'Supported file formats', '
                                        <p>
@@ -4081,7 +3492,6 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
                        }
                        break;
                case 'write':
-                       $refParseTime = '300';
                        // Writingformats - writing JPG
                        $headCode = 'Writing images';
                        $this->message($headCode, 'Writing GIF and PNG', '
@@ -4134,7 +3544,6 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
                        }
                        break;
                case 'scaling':
-                       $refParseTime = '650';
                        // Scaling
                        $headCode = 'Scaling images';
                        $this->message($headCode, 'Scaling transparent images', '
@@ -4195,10 +3604,6 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
                        }
                        break;
                case 'combining':
-                       $refParseTime = '150';
-                       // 4.2.9
-                       $refParseTime = '250';
-                       // 5.2.3
                        // Combine
                        $headCode = 'Combining images';
                        $this->message($headCode, 'Combining images', '
@@ -4263,12 +3668,6 @@ REMOTE_ADDR was \'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE
                        }
                        break;
                case 'gdlib':
-                       // GIF / 4.2.9 / LZW (5.2.3)
-                       $refParseTime = '1800';
-                       // PNG / 4.2.9 / LZW (5.2.3)
-                       $refParseTime = '2700';
-                       // GIF / 5.2.3 / LZW (5.2.3)
-                       $refParseTime = '1600';
                        // GDLibrary
                        $headCode = 'GDLib';
                        $this->message($headCode, 'Testing GDLib', '
diff --git a/typo3/sysext/install/Classes/Report/EnvironmentStatusReport.php b/typo3/sysext/install/Classes/Report/EnvironmentStatusReport.php
new file mode 100644 (file)
index 0000000..df6cb69
--- /dev/null
@@ -0,0 +1,85 @@
+<?php
+namespace TYPO3\CMS\Install\Report;
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Christian Kuhn <lolli@schwarzbu.ch>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Provides an environment status report
+ *
+ * @author Christian Kuhn <lolli@schwarzbu.ch>
+ */
+class EnvironmentStatusReport implements \TYPO3\CMS\Reports\StatusProviderInterface {
+
+       /**
+        * Compile environment status report
+        *
+        * @throws \TYPO3\CMS\Install\Exception
+        * @return array<\TYPO3\CMS\Reports\Status>
+        */
+       public function getStatus() {
+               /** @var $statusCheck \TYPO3\CMS\Install\SystemEnvironment\Check */
+               $statusCheck = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Install\\SystemEnvironment\\Check');
+               $statusObjects = $statusCheck->getStatus();
+
+               $reportStatusTypes = array(
+                       'ERROR' => array(),
+                       'WARNING' => array(),
+                       'OK' => array(),
+                       'INFO' => array(),
+                       'NOTICE' => array(),
+               );
+
+               foreach ($statusObjects as $statusObject) {
+                       $className = get_class($statusObject);
+                       // Uppercase last part of class name, without last 6 chars:
+                       // TYPO3\CMS\Install\SystemEnvironment\ErrorStatus -> ERROR
+                       $severityIdentifier = strtoupper(substr(array_pop(explode('\\', $className)), 0, -6));
+                       if (!is_array($reportStatusTypes[$severityIdentifier])) {
+                               throw new \TYPO3\CMS\Install\Exception('Unknown reports severity type', 1362602560);
+                       }
+                       $reportStatusTypes[$severityIdentifier][] = $statusObject;
+               }
+
+               $statusArray = array();
+               foreach ($reportStatusTypes as $type => $statusObjects) {
+                       $value = count($statusObjects);
+                       if ($value > 0) {
+                               $pathToXliff = 'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf';
+                               $message = $GLOBALS['LANG']->sL($pathToXliff . ':environment.status.message.warning');
+                               $severity = constant('\TYPO3\CMS\Reports\Status::' . $type);
+                               $statusArray[] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
+                                       'TYPO3\\CMS\\Reports\\Status',
+                                       $GLOBALS['LANG']->sL($pathToXliff . ':environment.status.title'),
+                                       sprintf($GLOBALS['LANG']->sL($pathToXliff . ':environment.status.value'), $value),
+                                       $message,
+                                       $severity
+                               );
+                       }
+               }
+
+               return $statusArray;
+       }
+}
+
+?>
\ No newline at end of file
index 209ad58..45338e8 100644 (file)
@@ -13,8 +13,7 @@ class InstallStatusReport implements \TYPO3\CMS\Reports\StatusProviderInterface
        /**
         * Compiles a collection of system status checks as a status report.
         *
-        * @return      array   List of statuses
-        * @see typo3/sysext/reports/interfaces/tx_reports_StatusProvider::getStatus()
+        * @return array<\TYPO3\CMS\Reports\Status>
         */
        public function getStatus() {
                $reports = array();
@@ -28,7 +27,7 @@ class InstallStatusReport implements \TYPO3\CMS\Reports\StatusProviderInterface
        /**
         * Checks for several directories being writable.
         *
-        * @return tx_reports_reports_status_Status     An tx_reports_reports_status_Status object indicating the status of the file system
+        * @return \TYPO3\CMS\Reports\Status Indicates status of the file system
         */
        protected function getFileSystemStatus() {
                $value = $GLOBALS['LANG']->sL('LLL:EXT:install/report/locallang.xml:status_writable');
@@ -104,7 +103,7 @@ class InstallStatusReport implements \TYPO3\CMS\Reports\StatusProviderInterface
        /**
         * Checks if there are still updates to perform
         *
-        * @return      tx_reports_reports_status_Status        An tx_reports_reports_status_Status object representing whether the installation is not completely updated yet
+        * @return \TYPO3\CMS\Reports\Status Represents whether the installation is completely updated yet
         */
        protected function getRemainingUpdatesStatus() {
                $value = $GLOBALS['LANG']->getLL('status_updateComplete');
index ee0fa06..84d5ba7 100644 (file)
@@ -95,9 +95,6 @@ class Session {
                ini_set('session.gc_probability', 100);
                ini_set('session.gc_divisor', 100);
                ini_set('session.gc_maxlifetime', $this->expireTimeInMinutes * 2 * 60);
-               if (version_compare(phpversion(), '5.2', '<')) {
-                       ini_set('session.cookie_httponly', TRUE);
-               }
                if (\TYPO3\CMS\Core\Utility\PhpOptionsUtility::isSessionAutoStartEnabled()) {
                        $sessionCreationError = 'Error: session.auto-start is enabled.<br />';
                        $sessionCreationError .= 'The PHP option session.auto-start is enabled. Disable this option in php.ini or .htaccess:<br />';
@@ -165,17 +162,10 @@ class Session {
        /**
         * Generates a new session ID and sends it to the client.
         *
-        * Also moves session information from the old session to the new one
-        * (in PHP 5.1 or later)
-        *
         * @return string the new session ID
         */
        private function renewSession() {
-               if (version_compare(phpversion(), '5.1', '<')) {
-                       session_regenerate_id(TRUE);
-               } else {
-                       session_regenerate_id();
-               }
+               session_regenerate_id();
                return session_id();
        }
 
diff --git a/typo3/sysext/install/Classes/SystemEnvironment/AbstractStatus.php b/typo3/sysext/install/Classes/SystemEnvironment/AbstractStatus.php
new file mode 100644 (file)
index 0000000..69b3116
--- /dev/null
@@ -0,0 +1,80 @@
+<?php
+namespace TYPO3\CMS\Install\SystemEnvironment;
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Christian Kuhn <lolli@schwarzbu.ch>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Abstract status
+ *
+ * @author Christian Kuhn <lolli@schwarzbu.ch>
+ */
+class AbstractStatus implements StatusInterface {
+
+       /**
+        * @var string Title
+        */
+       protected $title;
+
+       /**
+        * @var string Status message
+        */
+       protected $message;
+
+       /**
+        * @return string The title
+        */
+       public function getTitle() {
+               return $this->title;
+       }
+
+       /**
+        * Set title
+        *
+        * @param string $title The title
+        * @return void
+        */
+       public function setTitle($title) {
+               $this->title = $title;
+       }
+
+       /**
+        * Get status message
+        *
+        * @return string Status message
+        */
+       public function getMessage() {
+               return $this->message;
+       }
+
+       /**
+        * Set status message
+        *
+        * @param string $message Status message
+        * @return void
+        */
+       public function setMessage($message) {
+               $this->message = $message;
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/install/Classes/SystemEnvironment/Check.php b/typo3/sysext/install/Classes/SystemEnvironment/Check.php
new file mode 100644 (file)
index 0000000..0fc5010
--- /dev/null
@@ -0,0 +1,1126 @@
+<?php
+namespace TYPO3\CMS\Install\SystemEnvironment;
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Christian Kuhn <lolli@schwarzbu.ch>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Check system environment status
+ *
+ * This class is a hardcoded requirement check of the underlying
+ * server and PHP system.
+ *
+ * The class *must not* check for any TYPO3 specific things like
+ * specific configuration values or directories. It should not fail
+ * if there is no TYPO3 at all.
+ *
+ * This class is instantiated as the *very first* class during
+ * installation. It is meant to be *standalone* und must not have
+ * any requirements, except the status classes. It must be possible
+ * to run this script separated from the rest of the core, without
+ * dependencies.
+ *
+ * This means especially:
+ * * No hooks or anything like that
+ * * No usage of *any* TYPO3 code like GeneralUtility
+ * * No require of anything but the status classes
+ * * No localization
+ *
+ * The status messages and title *must not* include HTML, use plain
+ * text only. The return values of this class are not bound to HTML
+ * and can be used in different scopes (eg. as json array).
+ *
+ * @author Christian Kuhn <lolli@schwarzbu.ch>
+ */
+class Check {
+
+       /**
+        * @var array List of required PHP extensions
+        */
+       protected $requiredPhpExtensions = array(
+               'fileinfo',
+               'filter',
+               'gd',
+               'hash',
+               'json',
+               'mysql',
+               'openssl',
+               'pcre',
+               'session',
+               'soap',
+               'SPL',
+               'standard',
+               'xml',
+               'zip',
+               'zlib'
+       );
+
+       /**
+        * Constructor to load further classes
+        */
+       public function __construct() {
+               require(__DIR__ . '/StatusInterface.php');
+               require(__DIR__ . '/AbstractStatus.php');
+               require(__DIR__ . '/NoticeStatus.php');
+               require(__DIR__ . '/InfoStatus.php');
+               require(__DIR__ . '/OkStatus.php');
+               require(__DIR__ . '/WarningStatus.php');
+               require(__DIR__ . '/ErrorStatus.php');
+       }
+
+       /**
+        * Get all status information as array with status objects
+        *
+        * @return array<\TYPO3\CMS\Install\SystemEnvironment\StatusInterface>
+        */
+       public function getStatus() {
+               $statusArray = array();
+               $statusArray[] = $this->checkCurrentDirectoryIsInIncludePath();
+               $statusArray[] = $this->checkFileUploadEnabled();
+               $statusArray[] = $this->checkMaximumFileUploadSize();
+               $statusArray[] = $this->checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize();
+               $statusArray[] = $this->checkMemorySettings();
+               $statusArray[] = $this->checkPhpVersion();
+               $statusArray[] = $this->checkMaxExecutionTime();
+               $statusArray[] = $this->checkDisableFunctions();
+               $statusArray[] = $this->checkSafeMode();
+               $statusArray[] = $this->checkDocRoot();
+               $statusArray[] = $this->checkSqlSafeMode();
+               $statusArray[] = $this->checkOpenBaseDir();
+               $statusArray[] = $this->checkSuhosinLoaded();
+               $statusArray[] = $this->checkSuhosinRequestMaxVars();
+               $statusArray[] = $this->checkSuhosinPostMaxVars();
+               $statusArray[] = $this->checkSuhosinGetMaxValueLength();
+               $statusArray[] = $this->checkSuhosinExecutorIncludeWhitelistContainsPhar();
+               $statusArray[] = $this->checkSuhosinExecutorIncludeWhitelistContainsVfs();
+               $statusArray[] = $this->checkSomePhpOpcodeCacheIsLoaded();
+               $statusArray[] = $this->checkReflectionDocComment();
+               $statusArray[] = $this->checkWindowsApacheThreadStackSize();
+               foreach ($this->requiredPhpExtensions as $extension) {
+                       $statusArray[] = $this->checkRequiredPhpExtension($extension);
+               }
+               $statusArray[] = $this->checkMailCapabilities();
+               $statusArray[] = $this->checkGdLibTrueColorSupport();
+               $statusArray[] = $this->checkGdLibGifSupport();
+               $statusArray[] = $this->checkGdLibJpgSupport();
+               $statusArray[] = $this->checkGdLibPngSupport();
+               $statusArray[] = $this->checkGdLibFreeTypeSupport();
+               $statusArray[] = $this->checkPhpMagicQuotes();
+               $statusArray[] = $this->checkRegisterGlobals();
+               return $statusArray;
+       }
+
+       /**
+        * Checks if current directory (.) is in PHP include path
+        *
+        * @return WarningStatus|OkStatus
+        */
+       protected function checkCurrentDirectoryIsInIncludePath() {
+               $includePath = ini_get('include_path');
+               $delimiter = $this->isWindowsOs() ? ';' : ':';
+               $pathArray = $this->trimExplode($delimiter, $includePath);
+               if (!in_array('.', $pathArray)) {
+                       $status = new WarningStatus();
+                       $status->setTitle('Current directory (./) is not in include path');
+                       $status->setMessage(
+                               'include_path = ' . implode(' ', $pathArray) .
+                               ' Normally the current path, \'.\', is included in the' .
+                               ' include_path of PHP. Although TYPO3 does not rely on this,' .
+                               ' it is an unusual setting that may introduce problems for' .
+                               ' some extensions.'
+                       );
+               } else {
+                       $status = new OkStatus();
+                       $status->setTitle('Current directory (./) is in include path.');
+               }
+               return $status;
+       }
+
+       /**
+        * Check if file uploads are enabled in PHP
+        *
+        * @return ErrorStatus|OkStatus
+        */
+       protected function checkFileUploadEnabled() {
+               if (!ini_get('file_uploads')) {
+                       $status = new ErrorStatus();
+                       $status->setTitle('File uploads not allowed');
+                       $status->setMessage(
+                               'file_uploads=' . ini_get('file_uploads') .
+                               ' TYPO3 uses the ability to upload files from the browser in various cases.' .
+                               ' As long as this flag is disabled, you\'ll not be able to upload files.' .
+                               ' But it doesn\'t end here, because not only are files not accepted by' .
+                               ' the server - ALL content in the forms are discarded and therefore' .
+                               ' nothing at all will be editable if you don\'t set this flag!' .
+                               ' However if you cannot enable fileupload for some reason alternatively' .
+                               ' you change the default form encoding value with \\$TYPO3_CONF_VARS[SYS][form_enctype].'
+                       );
+               } else {
+                       $status = new OkStatus();
+                       $status->setTitle('File uploads allowed');
+               }
+               return $status;
+       }
+
+       /**
+        * Check maximum file upload size against default value of 10MB
+        *
+        * @return ErrorStatus|OkStatus
+        */
+       protected function checkMaximumFileUploadSize() {
+               $maximumUploadFilesize = $this->getBytesFromSizeMeasurement(ini_get('upload_max_filesize'));
+               if ($maximumUploadFilesize < 1024 * 1024 * 10) {
+                       $status = new ErrorStatus();
+                       $status->setTitle('Maximum upload filesize too small');
+                       $status->setMessage(
+                               'upload_max_filesize=' . ini_get('upload_max_filesize') .
+                               ' By default TYPO3 supports uploading, copying and moving' .
+                               ' files of sizes up to 10MB (You can alter the TYPO3 defaults' .
+                               ' by the config option TYPO3_CONF_VARS[BE][maxFileSize]).' .
+                               ' Your current value is below this, so at this point, PHP sets' .
+                               ' the limits for uploaded filesizes and not TYPO3.'
+                       );
+               } else {
+                       $status = new OkStatus();
+                       $status->setTitle('Maximum file upload size is higher or equal to 10MB');
+               }
+               return $status;
+       }
+
+       /**
+        * Check maximum post upload size correlates with maximum file upload
+        *
+        * @return ErrorStatus|OkStatus
+        */
+       protected function checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize() {
+               $maximumUploadFilesize = $this->getBytesFromSizeMeasurement(ini_get('upload_max_filesize'));
+               $maximumPostSize = $this->getBytesFromSizeMeasurement(ini_get('post_max_size'));
+               if ($maximumPostSize < $maximumUploadFilesize) {
+                       $status = new ErrorStatus();
+                       $status->setTitle('Maximum size for POST requests is smaller than max. upload filesize');
+                       $status->setMessage(
+                               'upload_max_filesize=' . ini_get('upload_max_filesize') .
+                               ', post_max_size=' . ini_get('post_max_size') .
+                               ' You have defined a maximum size for file uploads which' .
+                               ' exceeds the allowed size for POST requests. Therefore the' .
+                               ' file uploads can not be larger than ' . ini_get('post_max_size')
+                       );
+               } else {
+                       $status = new OkStatus();
+                       $status->setTitle('Maximum post upload size correlates with maximum upload file size');
+               }
+               return $status;
+       }
+
+       /**
+        * Check memory settings
+        *
+        * @return ErrorStatus|WarningStatus|OkStatus
+        */
+       protected function checkMemorySettings() {
+               $memoryLimit = $this->getBytesFromSizeMeasurement(ini_get('memory_limit'));
+               if ($memoryLimit <= 0) {
+                       $status = new WarningStatus();
+                       $status->setTitle('Unlimited memory limit!');
+                       $status->setMessage(
+                               'Your webserver is configured to not limit PHP memory usage at all. This is a risk' .
+                               ' and should be avoided in production setup. In general it\'s best practice to limit this' .
+                               ' in the configuration of your webserver. To be safe, ask the system administrator of the' .
+                               ' webserver to raise the limit to something over 64MB'
+                       );
+               } elseif ($memoryLimit < 1024 * 1024 * 32) {
+                       $status = new ErrorStatus();
+                       $status->setTitle('Memory limit below 32MB');
+                       $status->setMessage(
+                               'memory_limit=' . ini_get('memory_limit') .
+                               ' Your system is configured to enforce a memory limit of PHP scripts lower than 32MB.' .
+                               ' There is nothing else to do than raise the limit. To be safe, ask the system' .
+                               ' administrator of the webserver to raise the limit to 64MB.'
+                       );
+               } elseif ($memoryLimit < 1024 * 1024 * 64) {
+                       $status = new WarningStatus();
+                       $status->setTitle('Memory limit below 64MB');
+                       $status->setMessage(
+                               'memory_limit=' . ini_get('memory_limit') .
+                               ' Your system is configured to enforce a memory limit of PHP scripts lower than 64MB.' .
+                               ' A slim TYPO3 instance without many extensions will probably work, but you should ' .
+                               ' monitor your system for exhausted messages, especially if using the backend. ' .
+                               ' To be on the safe side, it would be better to raise the PHP memory limit to 64MB or more.'
+                       );
+               } else {
+                       $status = new OkStatus();
+                       $status->setTitle('Memory limit equal 64MB or more');
+               }
+               return $status;
+       }
+
+       /**
+        * Check minimum PHP version
+        *
+        * @return ErrorStatus|OkStatus
+        */
+       protected function checkPhpVersion() {
+               $minimumPhpVersion = '5.3.0';
+               $recommendedPhpVersion = '5.3.7';
+               $currentPhpVersion = phpversion();
+               if (version_compare($currentPhpVersion, $minimumPhpVersion) < 0) {
+                       $status = new ErrorStatus();
+                       $status->setTitle('PHP version too low');
+                       $status->setMessage(
+                               'Your PHP version ' . $currentPhpVersion . ' is too old. TYPO3 CMS does not run' .
+                               ' with this version. Update to at least PHP ' . $recommendedPhpVersion
+                       );
+               } elseif (version_compare($currentPhpVersion, $recommendedPhpVersion) < 0) {
+                       $status = new WarningStatus();
+                       $status->setTitle('PHP version below recommended version');
+                       $status->setMessage(
+                               'Your PHP version ' . $currentPhpVersion . ' is below the recommended version' .
+                               ' ' . $recommendedPhpVersion . '. TYPO3 CMS will mostly run with your PHP' .
+                               ' version, but it is not officially supported. Expect some problems,' .
+                               ' and a performance penalty, monitor your system for errors and watch' .
+                               ' out for an upgrade, soon.'
+                       );
+               } else {
+                       $status = new OkStatus();
+                       $status->setTitle('PHP version is fine');
+               }
+               return $status;
+       }
+
+       /**
+        * Check maximum execution time
+        *
+        * @return ErrorStatus|WarningStatus|OkStatus
+        */
+       protected function checkMaxExecutionTime() {
+               $minimumMaximumExecutionTime = 30;
+               $recommendedMaximumExecutionTime = 240;
+               $currentMaximumExecutionTime = ini_get('max_execution_time');
+               if ($currentMaximumExecutionTime == 0 && PHP_SAPI !== 'cli') {
+                       $status = new WarningStatus();
+                       $status->setTitle('Infinite PHP script execution time');
+                       $status->setMessage(
+                               'Your max_execution_time is set to 0 (infinite). While TYPO3 is fine' .
+                               ' with this, you risk a denial-of-service of you system if for whatever' .
+                               ' reason some script hangs in an infinite loop. You are usually on safe side ' .
+                               ' if max_execution_time is reduced to ' . $recommendedMaximumExecutionTime
+                       );
+               } elseif ($currentMaximumExecutionTime < $minimumMaximumExecutionTime) {
+                       $status = new ErrorStatus();
+                       $status->setTitle('Low PHP script execution time');
+                       $status->setMessage(
+                               'Your max_execution_time is set to ' . $currentMaximumExecutionTime .
+                               '. Some expensive operation in TYPO3 can take longer than that. It is advised' .
+                               ' to raise max_execution_time to ' . $recommendedMaximumExecutionTime
+                       );
+               } elseif ($currentMaximumExecutionTime < $recommendedMaximumExecutionTime) {
+                       $status = new WarningStatus();
+                       $status->setTitle('Low PHP script execution time');
+                       $status->setMessage(
+                               'Your max_execution_time is set to ' . $currentMaximumExecutionTime .
+                               '. While TYPO3 often runs without problems with ' . $minimumMaximumExecutionTime .
+                               ' it still may happen that script execution is stopped before finishing' .
+                               ' calculations. You should monitor the system for messages in this area' .
+                               ' and maybe raise the limit to ' . $recommendedMaximumExecutionTime . '.'
+                       );
+               } else {
+                       $status = new OkStatus();
+                       $status->setTitle('Maximum PHP script execution equals ' . $recommendedMaximumExecutionTime . ' or more');
+               }
+               return $status;
+       }
+
+       /**
+        * Check for disabled functions
+        *
+        * @return ErrorStatus|OkStatus
+        */
+       protected function checkDisableFunctions() {
+               $disabledFunctions = trim(ini_get('disable_functions'));
+               if (strlen($disabledFunctions) > 0) {
+                       $status = new ErrorStatus();
+                       $status->setTitle('Some PHP functions disabled');
+                       $status->setMessage(
+                               'disable_functions=' . implode(' ', explode(',', $disabledFunctions)) . '. These function(s)' .
+                               'are disabled. If TYPO3 uses any of these there might be trouble. TYPO3 is designed to use the default' .
+                               ' set of PHP functions plus some common extensions. Possibly these functions are disabled' .
+                               ' due to security considerations and most likely the list would include a function like' .
+                               ' exec() which is used by TYPO3 at various places. Depending on which exact functions' .
+                               ' are disabled, some parts of the system may just break without further notice.'
+                       );
+               } else {
+                       $status  = new OkStatus();
+                       $status->setTitle('No disabled PHP functions');
+               }
+               return $status;
+       }
+
+       /**
+        * Check if safe mode is enabled
+        *
+        * @return ErrorStatus|OkStatus
+        */
+       protected function checkSafeMode() {
+               $safeModeEnabled = FALSE;
+               if (version_compare(phpversion(), '5.4', '<')) {
+                       $safeModeEnabled = filter_var(
+                               ini_get('safe_mode'),
+                               FILTER_VALIDATE_BOOLEAN,
+                               array(FILTER_REQUIRE_SCALAR, FILTER_NULL_ON_FAILURE)
+                       );
+               }
+               if ($safeModeEnabled) {
+                       $status = new ErrorStatus();
+                       $status->setTitle('PHP safe mode on');
+                       $status->setMessage(
+                               'safe_mode enabled. This is unsupported by TYPO3 CMS, it must be turned off.'
+                       );
+               } else {
+                       $status = new OkStatus();
+                       $status->setTitle('PHP safe mode off');
+               }
+               return $status;
+       }
+
+       /**
+        * Check for doc_root ini setting
+        *
+        * @return NoticeStatus|OkStatus
+        */
+       protected function checkDocRoot() {
+               $docRootSetting = trim(ini_get('doc_root'));
+               if (strlen($docRootSetting) > 0) {
+                       $status = new NoticeStatus();
+                       $status->setTitle('doc_root is set');
+                       $status->setMessage(
+                               'doc_root=' . $docRootSetting . ' PHP cannot execute scripts' .
+                               ' outside this directory. This setting is used seldom and must correlate' .
+                               ' with your actual document root. You might be in trouble if your' .
+                               ' TYPO3 CMS core code is linked to some different location.' .
+                               ' If that is a problem, the setting must be adapted.'
+                       );
+               } else {
+                       $status = new OkStatus();
+                       $status->setTitle('PHP doc_root is not set');
+               }
+               return $status;
+       }
+
+       /**
+        * Check sql.safe_mode
+        *
+        * @return OkStatus|WarningStatus
+        */
+       protected function checkSqlSafeMode() {
+               $sqlSafeModeEnabled = FALSE;
+               if (version_compare(phpversion(), '5.4', '<')) {
+                       $sqlSafeModeEnabled = filter_var(
+                               ini_get('sql.safe_mode'),
+                               FILTER_VALIDATE_BOOLEAN,
+                               array(FILTER_REQUIRE_SCALAR, FILTER_NULL_ON_FAILURE)
+                       );
+               }
+               if ($sqlSafeModeEnabled) {
+                       $status = new WarningStatus();
+                       $status->setTitle('sql.safe_mode is enabled');
+                       $status->setMessage(
+                               'This means that you can only connect to the database with a' .
+                               ' username corresponding to the user of the webserver process' .
+                               ' or file owner. Consult your ISP for information about this.' .
+                               ' The owner of the current file is: ' . get_current_user()
+                       );
+               } else {
+                       $status = new OkStatus();
+                       $status->setTitle('PHP sql.safe_mode is off');
+               }
+               return $status;
+       }
+
+       /**
+        * Check open_basedir
+        *
+        * @return NoticeStatus|OkStatus
+        */
+       protected function checkOpenBaseDir() {
+               $openBaseDirSetting = trim(ini_get('open_basedir'));
+               if (strlen($openBaseDirSetting) > 0) {
+                       $status = new NoticeStatus();
+                       $status->setTitle('open_basedir set');
+                       $status->setMessage(
+                               'open_basedir = ' . ini_get('open_basedir') .
+                               ' This restricts TYPO3 to open and include files only in this' .
+                               ' path. Please make sure that this does not prevent TYPO3 from running,' .
+                               ' if for example your TYPO3 CMS core is linked to a different directory' .
+                               ' not included in this path.'
+                       );
+               } else {
+                       $status = new OkStatus();
+                       $status->setTitle('PHP open_basedir is off');
+               }
+               return $status;
+       }
+
+       /**
+        * Check enabled suhosin
+        *
+        * @return NoticeStatus|OkStatus
+        */
+       protected function checkSuhosinLoaded() {
+               if ($this->isSuhosinLoaded()) {
+                       $status = new OkStatus();
+                       $status->setTitle('PHP suhosin extension loaded');
+               } else {
+                       $status = new NoticeStatus();
+                       $status->setTitle('PHP suhosin extension not loaded');
+                       $status->setMessage(
+                               'suhosin is an extension to harden the PHP environment. In general, it is' .
+                               ' good to have it from a security point of view. While TYPO3 CMS works' .
+                               ' fine with suhosin, it has some requirements different from default settings' .
+                               ' to be set if enabled.'
+                       );
+               }
+               return $status;
+       }
+
+       /**
+        * Check suhosin.request.max_vars
+        *
+        * @return ErrorStatus|InfoStatus|OkStatus
+        */
+       protected function checkSuhosinRequestMaxVars() {
+               $recommendedRequestMaxVars = 400;
+               if ($this->isSuhosinLoaded()) {
+                       $currentRequestMaxVars = ini_get('suhosin.request.max_vars');
+                       if ($currentRequestMaxVars < $recommendedRequestMaxVars) {
+                               $status = new ErrorStatus();
+                               $status->setTitle('PHP suhosin.request.max_vars not high enough');
+                               $status->setMessage(
+                                       'suhosin.request.max_vars=' . $currentRequestMaxVars . '. This setting' .
+                                       ' can lead to lost information if submitting big forms in TYPO3 CMS like' .
+                                       ' it is done in the install tool. It is heavily recommended to raise this' .
+                                       ' to at least ' . $recommendedRequestMaxVars
+                               );
+                       } else {
+                               $status = new OkStatus();
+                               $status->setTitle('PHP suhosin.request.max_vars ok');
+                       }
+               } else {
+                       $status = new InfoStatus();
+                       $status->setTitle('Suhosin not loaded');
+                       $status->setMessage(
+                               'If enabling suhosin, suhosin.request.max_vars' .
+                               ' should be set to at least ' . $recommendedRequestMaxVars
+                       );
+               }
+               return $status;
+       }
+
+       /**
+        * Check suhosin.post.max_vars
+        *
+        * @return ErrorStatus|InfoStatus|OkStatus
+        */
+       protected function checkSuhosinPostMaxVars() {
+               $recommendedPostMaxVars = 400;
+               if ($this->isSuhosinLoaded()) {
+                       $currentPostMaxVars = ini_get('suhosin.post.max_vars');
+                       if ($currentPostMaxVars < $recommendedPostMaxVars) {
+                               $status = new ErrorStatus();
+                               $status->setTitle('PHP suhosin.post.max_vars not high enough');
+                               $status->setMessage(
+                                       'suhosin.post.max_vars=' . $currentPostMaxVars . '. This setting' .
+                                       ' can lead to lost information if submitting big forms in TYPO3 CMS like' .
+                                       ' it is done in the install tool. It is heavily recommended to raise this' .
+                                       ' to at least ' . $recommendedPostMaxVars
+                               );
+                       } else {
+                               $status = new OkStatus();
+                               $status->setTitle('PHP suhosin.post.max_vars ok');
+                       }
+               } else {
+                       $status = new InfoStatus();
+                       $status->setTitle('Suhosin not loaded');
+                       $status->setMessage(
+                               'If enabling suhosin, suhosin.post.max_vars' .
+                               ' should be set to at least ' . $recommendedPostMaxVars
+                       );
+               }
+               return $status;
+       }
+
+       /**
+        * Check suhosin.get.max_value_length
+        *
+        * @return ErrorStatus|InfoStatus|OkStatus
+        */
+       protected function checkSuhosinGetMaxValueLength() {
+               $recommendedGetMaxValueLength = 2000;
+               if ($this->isSuhosinLoaded()) {
+                       $currentGetMaxValueLength = ini_get('suhosin.get.max_value_length');
+                       if ($currentGetMaxValueLength < $recommendedGetMaxValueLength) {
+                               $status = new ErrorStatus();
+                               $status->setTitle('PHP suhosin.get.max_value_length not high enough');
+                               $status->setMessage(
+                                       'suhosin.get.max_value_length=' . $currentGetMaxValueLength . '. This setting' .
+                                       ' can lead to lost information if submitting big forms in TYPO3 CMS like' .
+                                       ' it is done in the install tool. It is heavily recommended to raise this' .
+                                       ' to at least ' . $recommendedGetMaxValueLength
+                               );
+                       } else {
+                               $status = new OkStatus();
+                               $status->setTitle('PHP suhosin.get.max_value_length ok');
+                       }
+               } else {
+                       $status = new InfoStatus();
+                       $status->setTitle('Suhosin not loaded');
+                       $status->setMessage(
+                               'If enabling suhosin, suhosin.get.max_value_length' .
+                               ' should be set to at least ' . $recommendedGetMaxValueLength
+                       );
+               }
+               return $status;
+       }
+
+       /**
+        * Check suhosin.executor.include.whitelist contains phar
+        *
+        * @return NoticeStatus|InfoStatus|OkStatus
+        */
+       protected function checkSuhosinExecutorIncludeWhiteListContainsPhar() {
+               if ($this->isSuhosinLoaded()) {
+                       $currentWhiteListArray = $this->trimExplode(' ', ini_get('suhosin.executor.include.whitelist'));
+                       if (!in_array('phar', $currentWhiteListArray)) {
+                               $status = new NoticeStatus();
+                               $status->setTitle('PHP suhosin.executor.include.whitelist does not contain phar');
+                               $status->setMessage(
+                                       'suhosin.executor.include.whitelist= ' . implode(' ', $currentWhiteListArray) . '. phar' .
+                                       ' is currently not a hard requirement of TYPO3 CMS but is nice to have and a possible requirement' .
+                                       ' in future versions. A useful setting is "suhosin.executor.include.whitelist = phar vfs"'
+                               );
+                       } else {
+                               $status = new OkStatus();
+                               $status->setTitle('PHP suhosin.executor.include.whitelist contains phar');
+                       }
+               } else {
+                       $status = new InfoStatus();
+                       $status->setTitle('Suhosin not loaded');
+                       $status->setMessage(
+                               'If enabling suhosin, a useful setting is "suhosin.executor.include.whitelist = phar vfs"'
+                       );
+               }
+               return $status;
+       }
+
+       /**
+        * Check suhosin.executor.include.whitelist contains vfs
+        *
+        * @return NoticeStatus|InfoStatus|OkStatus
+        */
+       protected function checkSuhosinExecutorIncludeWhiteListContainsVfs() {
+               if ($this->isSuhosinLoaded()) {
+                       $currentWhiteListArray = $this->trimExplode(' ', ini_get('suhosin.executor.include.whitelist'));
+                       if (!in_array('vfs', $currentWhiteListArray)) {
+                               $status = new WarningStatus();
+                               $status->setTitle('PHP suhosin.executor.include.whitelist does not contain vfs');
+                               $status->setMessage(
+                                       'suhosin.executor.include.whitelist= ' . implode(' ', $currentWhiteListArray) . '. vfs' .
+                                       ' is currently not a hard requirement of TYPO3 CMS but tons of unit tests rely on it.' .
+                                       ' Furthermore, vfs is likely a base for an additional compatibilyt layer in the future.' .
+                                       ' A useful setting is "suhosin.executor.include.whitelist = phar vfs"'
+                               );
+                       } else {
+                               $status = new OkStatus();
+                               $status->setTitle('PHP suhosin.executor.include.whitelist contains vfs');
+                       }
+               } else {
+                       $status = new InfoStatus();
+                       $status->setTitle('Suhosin not loaded');
+                       $status->setMessage(
+                               'If enabling suhosin, a useful setting is "suhosin.executor.include.whitelist = phar vfs"'
+                       );
+               }
+               return $status;
+       }
+
+       /**
+        * Check apt, xcache or eaccelerator is loaded
+        *
+        * @return WarningStatus|OkStatus
+        */
+       protected function checkSomePhpOpcodeCacheIsLoaded() {
+               $eAcceleratorLoaded = extension_loaded('eaccelerator');
+               $xCacheLoaded = extension_loaded('xcache');
+               $apcLoaded = extension_loaded('apc');
+               if ($eAcceleratorLoaded || $xCacheLoaded || $apcLoaded) {
+                       $status = new OkStatus();
+                       $status->setTitle('A PHP opcode cache is loaded');
+               } else {
+                       $status = new WarningStatus();
+                       $status->setTitle('No PHP opcode cache loaded');
+                       $status->setMessage(
+                               'PHP opcode caches hold a compiled version of executed PHP scripts in' .
+                               ' memory and do not require to recompile any script on each access.' .
+                               ' This can be a massive performance improvement and can put load off a' .
+                               ' server in general, a parse time reduction by factor three for full cached' .
+                               ' pages can be achieved easily if using some opcode cache.' .
+                               ' If in doubt choosing one, apc is officially supported by PHP and can be' .
+                               ' used as data cache layer in TYPO3 CMS as additional feature.'
+                       );
+               }
+               return $status;
+       }
+
+       /**
+        * Check doc comments can be fetched by reflection
+        *
+        * @return ErrorStatus|OkStatus
+        */
+       protected function checkReflectionDocComment() {
+               $testReflection = new \ReflectionMethod(get_class($this), __FUNCTION__);
+               if (strlen($testReflection->getDocComment()) === 0) {
+                       $status = new ErrorStatus();
+                       $status->setTitle('Doc comment reflection broken');
+                       $status->setMessage(
+                               'TYPO3 CMS core extensions like extbase and fluid heavily rely on method' .
+                               ' comment parsing to fetch annotations and add magic according to them.' .
+                               ' This does not work in the current environment and will lead to a lot of' .
+                               ' broken extensions. The PHP extension eaccelerator is known to break this if' .
+                               ' it is compiled without --with-eaccelerator-doc-comment-inclusion flag.' .
+                               ' This compile flag must be given, otherwise TYPO3 CMS is no fun.'
+                       );
+               } else {
+                       $status = new OkStatus();
+                       $status->setTitle('Document comment reflection works');
+               }
+               return $status;
+       }
+
+       /**
+        * Checks thread stack size if on windows with apache
+        *
+        * @return WarningStatus|OkStatus
+        */
+       protected function checkWindowsApacheThreadStackSize() {
+               if (
+                       $this->isWindowsOs()
+                       && substr($_SERVER['SERVER_SOFTWARE'], 0, 6) === 'Apache'
+               ) {
+                       $status = new WarningStatus();
+                       $status->setTitle('Windows apache thread stack size');
+                       $status->setMessage(
+                               'This current value can not be checked by the system, so please ignore this warning if it' .
+                               ' is already taken care off: Fluid uses complex regular expressions which require a lot' .
+                               ' of stack space during the first processing.' .
+                               ' On Windows the default stack size for Apache is a lot smaller than on unix.' .
+                               ' You can increase the size to 8MB (default on unix) by adding to the httpd.conf:' .
+                               ' ThreadStackSize 8388608. Restart Apache after this change.'
+                       );
+               } else {
+                       $status = new OkStatus();
+                       $status->setTitle('ThreadStackSize is not an issue on unix systems');
+               }
+               return $status;
+       }
+
+       /**
+        * Check if a specific required PHP extension is loaded
+        *
+        * @param string $extension
+        * @return ErrorStatus|OkStatus
+        */
+       protected function checkRequiredPhpExtension($extension) {
+               if (!extension_loaded($extension)) {
+                       $status = new ErrorStatus();
+                       $status->setTitle('PHP extension ' . $extension . ' not loaded');
+                       $status->setMessage(
+                               'TYPO3 CMS uses PHP extension ' . $extension . ' but it is not loaded' .
+                               ' in your environment. Change your environment to provide this extension.'
+                       );
+               } else {
+                       $status = new OkStatus();
+                       $status->setTitle('PHP extension ' . $extension . ' loaded');
+               }
+               return $status;
+       }
+
+       /**
+        * Check smtp settings
+        *
+        * @return ErrorStatus|OkStatus|WarningStatus
+        */
+       protected function checkMailCapabilities() {
+               if ($this->isWindowsOs()) {
+                       $smtpIni = ini_get('SMTP');
+                       $brokenSmtp = FALSE;
+                       $smtpIpAddress = '';
+                       if (!$this->isValidIp($smtpIni)) {
+                               if (!$this->isValidIp(@gethostbyname($smtpIni))) {
+                                       $brokenSmtp = TRUE;
+                               } else {
+                                       $smtpIpAddress = @gethostbyname($smtpIni);
+                               }
+                       } else {
+                               $smtpIpAddress = $smtpIni;
+                       }
+
+                       $smtpPortIni =  intval(ini_get('smtp_port'));
+                       $brokenSmtpPort = FALSE;
+                       if (intval($smtpPortIni) < 1 || intval($smtpPortIni) > 65535) {
+                               $brokenSmtpPort = TRUE;
+                       }
+
+                       if ($brokenSmtp || $brokenSmtpPort) {
+                               $status = new ErrorStatus();
+                               $status->setTitle('Mail configuration is not set correctly');
+                               $status->setMessage(
+                                       'PHP mail() function requires SMTP and smtp_port to have' .
+                                       ' correct values on Windows. If installation is completed,' .
+                                       ' the mail system can be tested in the install tool.'
+                               );
+                       } elseif ($smtpIpAddress === '127.0.0.1' || $smtpIpAddress === '::1') {
+                               $status = new WarningStatus();
+                               $status->setTitle('Mail is configured, potential problem exists');
+                               $status->setMessage(
+                                       'smtp=' . $smtpIni . ' - This server! Are you sure it runs SMTP server?' .
+                                       ' If installation is completed, the mail system can be tested in the install tool.'
+                               );
+                       } else {
+                               $status = new OkStatus();
+                               $status->setTitle('Mail is configured');
+                               $status->setMessage(
+                                       'smtp=' . $smtpIni . ', smtp_port=' . ini_get('smtp_port') . '.' .
+                                       ' Values for mail setup look ok. If installation is completed,' .
+                                       ' the mail system can be tested in the install tool. '
+                               );
+                       }
+               } elseif (!ini_get('sendmail_path')) {
+                       $status = new WarningStatus();
+                       $status->setTitle('PHP sendmail_path not defined');
+                       $status->setMessage(
+                               'This may be critical to TYPO3\'s use of the mail() function.' .
+                               ' Your setup is rather uncommon. If installation is completed, the' .
+                               ' mail system can be tested in the install tool.'
+                       );
+               } else {
+                       list($mailBinary) = explode(' ', ini_get('sendmail_path'));
+                       if (!@is_executable($mailBinary)) {
+                               $status = new ErrorStatus();
+                               $status->setTitle('Mail program not found or not executable');
+                               $status->setMessage(
+                                       'sendmail_path = ' . ini_get('sendmail_path') .
+                                       ' This may be critical to TYPO3\'s use of the mail() function. Please' .
+                                       ' be sure that the mail() function in your php-installation works.  If' .
+                                       ' installation is completed, the mail system can be tested in the install tool.'
+                               );
+                       } else {
+                               $status = new OkStatus();
+                               $status->setTitle('PHP sendmail path given');
+                               $status->setMessage(
+                                       'sendmail_path = ' . ini_get('sendmail_path') . '.' .
+                                       ' This setting is crucial for TYPO3\'s use of the mail() function. The' .
+                                       ' current value looks fine. The mail system can be tested in the' .
+                                       ' install tool if the installation is completed'
+                               );
+                       }
+               }
+               return $status;
+       }
+
+       /**
+        * Check imagecreatetruecolor to verify gdlib works as expected
+        *
+        * @return ErrorStatus|OkStatus
+        */
+       protected function checkGdLibTrueColorSupport() {
+               if (function_exists('imagecreatetruecolor')) {
+                       $imageResource = @imagecreatetruecolor(50, 100);
+                       if (is_resource($imageResource)) {
+                               imagedestroy($imageResource);
+                               $status = new OkStatus();
+                               $status->setTitle('PHP GD library true color works');
+                       } else {
+                               $status = new ErrorStatus();
+                               $status->setTitle('PHP GD library true color support broken');
+                               $status->setMessage(
+                                       'GD is loaded, but calling a imagecreatetruecolor returned an error.' .
+                                       ' This must be fixed, TYPO3 CMS won\'t work well otherwise'
+                               );
+                       }
+               } else {
+                       $status = new ErrorStatus();
+                       $status->setTitle('PHP GD library true color support missing');
+                       $status->setMessage(
+                               'Gdlib is essential for TYPO3 CMS to work properly.'
+                       );
+               }
+               return $status;
+       }
+
+       /**
+        * Check gif support of GD library
+        *
+        * @return ErrorStatus|OkStatus
+        */
+       protected function checkGdLibGifSupport() {
+               if (
+                       function_exists('imagecreatefromgif')
+                       && function_exists('imagegif')
+                       && (imagetypes() & IMG_GIF)
+               ) {
+                       $imageResource = @imagecreatefromgif(__DIR__ . '/TestImages/jesus.gif');
+                       if (is_resource($imageResource)) {
+                               imagedestroy($imageResource);
+                               $status = new OkStatus();
+                               $status->setTitle('PHP GD library has gif support');
+                       } else {
+                               $status = new ErrorStatus();
+                               $status->setTitle('PHP GD library gif support broken');
+                               $status->setMessage(
+                                       'GD is loaded, but calling a gif related message gives errors.' .
+                                       ' This must be fixed, TYPO3 CMS won\'t work well otherwise'
+                               );
+                       }
+               } else {
+                       $status = new ErrorStatus();
+                       $status->setTitle('PHP GD library gif support missing');
+                       $status->setMessage(
+                               'GD must be compiled with gif support. This is essential for' .
+                               ' TYPO3 CMS to work properly.'
+                       );
+               }
+               return $status;
+       }
+
+       /**
+        * Check jgp support of GD library
+        *
+        * @return ErrorStatus|OkStatus
+        */
+       protected function checkGdLibJpgSupport() {
+               if (
+                       function_exists('imagecreatefromjpeg')
+                       && function_exists('imagejpeg')
+                       && (imagetypes() & IMG_JPG)
+               ) {
+                       $status = new OkStatus();
+                       $status->setTitle('PHP GD library has jpg support');
+               } else {
+                       $status= new ErrorStatus();
+                       $status->setTitle('PHP GD library jpg support missing');
+                       $status->setMessage(
+                               'GD must be compiled with jpg support. This is essential for' .
+                               ' TYPO3 CMS to work properly.'
+                       );
+               }
+               return $status;
+       }
+
+       /**
+        * Check png support of GD library
+        *
+        * @return ErrorStatus|OkStatus
+        */
+       protected function checkGdLibPngSupport() {
+               if (
+                       function_exists('imagecreatefrompng')
+                       && function_exists('imagepng')
+                       && (imagetypes() & IMG_PNG)
+               ) {
+                       $imageResource = @imagecreatefrompng(__DIR__ . '/TestImages/jesus.png');
+                       if (is_resource($imageResource)) {
+                               imagedestroy($imageResource);
+                               $status = new OkStatus();
+                               $status->setTitle('PHP GD library has png support');
+                       } else {
+                               $status = new ErrorStatus();
+                               $status->setTitle('PHP GD library png support broken');
+                               $status->setMessage(
+                                       'GD is compiled with png support, but a test call fails.' .
+                                       ' Check your environment and fix it, png in GD lib is important' .
+                                       ' for TYPO3 CMS to work properly.'
+                               );
+                       }
+               } else {
+                       $status = new ErrorStatus();
+                       $status->setTitle('PHP GD library png support missing');
+                       $status->setMessage(
+                               'GD must be compiled with png support. This is essential for' .
+                               ' TYPO3 CMS to work properly'
+                       );
+               }
+               return $status;
+       }
+
+       /**
+        * Check gdlib supports freetype
+        *
+        * @return ErrorStatus|OkStatus
+        */
+       protected function checkGdLibFreeTypeSupport() {
+               if (function_exists('imagettftext')) {
+                       $status = new OkStatus();
+                       $status->setTitle('PHP GD library has freettype font support');
+                       $status->setMessage(
+                               'There is a difference between the font size setting the GD' .
+                               ' library should be feeded with. If installation is completed' .
+                               ' a test in the install tool helps to find out the value you need'
+                       );
+               } else {
+                       $status = new ErrorStatus();
+                       $status->setTitle('PHP GD library freetype support missing');
+                       $status->setMessage(
+                               'Some core functionality and extension rely on the GD' .
+                               ' to render fonts on images. This support is missing' .
+                               ' in your environment. Install it.'
+                       );
+               }
+               return $status;
+       }
+
+       /**
+        * Check php magic quotes
+        *
+        * @return OkStatus|WarningStatus
+        */
+       protected function checkPhpMagicQuotes() {
+               if (get_magic_quotes_gpc()) {
+                       $status = new WarningStatus();
+                       $status->setTitle('PHP magic quotes on');
+                       $status->setMessage(
+                               'PHP ini setting magic_quotes_gpc in on. The setting is deprecated since PHP 5.3.' .
+                               ' You are advised to set it to "Off" until it gets completely removed.'
+                       );
+               } else {
+                       $status = new OkStatus();
+                       $status->setTitle('PHP magic quotes off');
+               }
+               return $status;
+       }
+
+       /**
+        * Check register globals
+        *
+        * @return ErrorStatus|OkStatus
+        */
+       protected function checkRegisterGlobals() {
+               $registerGlobalsEnabled = filter_var(
+                       ini_get('register_globals'),
+                       FILTER_VALIDATE_BOOLEAN,
+                       array(FILTER_REQUIRE_SCALAR, FILTER_NULL_ON_FAILURE)
+               );
+               if ($registerGlobalsEnabled === TRUE) {
+                       $status = new ErrorStatus();
+                       $status->setTitle('PHP register globals on');
+                       $status->setMessage(
+                               'TYPO3 requires PHP setting "register_globals" set to off.' .
+                               ' This ancient PHP setting is a big security problem and should' .
+                               ' never be enabled.'
+                       );
+               } else {
+                       $status = new OkStatus();
+                       $status->setTitle('PHP register globals off');
+               }
+               return $status;
+       }
+
+       /**
+        * Helper methods
+        */
+
+       /**
+        * Validate a given IP address.
+        *
+        * @param string $ip IP address to be tested
+        * @return boolean
+        */
+       protected function isValidIp($ip) {
+               return filter_var($ip, FILTER_VALIDATE_IP) !== FALSE;
+       }
+
+       /**
+        * Test if this instance runs on windows OS
+        *
+        * @return boolean TRUE if operating system is windows
+        */
+       protected function isWindowsOs() {
+               $windowsOs = FALSE;
+               if (stristr(PHP_OS, 'darwin') && stristr(PHP_OS, 'win')) {
+                       $windowsOs = TRUE;
+               }
+               return $windowsOs;
+       }
+
+       /**
+        * Helper method to find out if suhosin extension is loaded
+        *
+        * @return boolean TRUE if suhosin PHP extension is loaded
+        */
+       protected function isSuhosinLoaded() {
+               $suhosinLoaded = FALSE;
+               if (extension_loaded('suhosin')) {
+                       $suhosinLoaded = TRUE;
+               }
+               return $suhosinLoaded;
+       }
+
+       /**
+        * Helper method to explode a string by delimeter and throw away empty values.
+        * Removes empty values from result array.
+        *
+        * @param string $delimiter Delimiter string to explode with
+        * @param string $string The string to explode
+        * @return array Exploded values
+        */
+       protected function trimExplode($delimiter, $string) {
+               $explodedValues = explode($delimiter, $string);
+               $resultWithPossibleEmptyValues = array_map('trim', $explodedValues);
+               $result = array();
+               foreach ($resultWithPossibleEmptyValues as $value) {
+                       if ($value !== '') {
+                               $result[] = $value;
+                       }
+               }
+               return $result;
+       }
+
+       /**
+        * Helper method to get the bytes value from a measurement string like "100k".
+        *
+        * @param string $measurement The measurement (e.g. "100k")
+        * @return integer The bytes value (e.g. 102400)
+        */
+       protected function getBytesFromSizeMeasurement($measurement) {
+               $bytes = doubleval($measurement);
+               if (stripos($measurement, 'G')) {
+                       $bytes *= 1024 * 1024 * 1024;
+               } elseif (stripos($measurement, 'M')) {
+                       $bytes *= 1024 * 1024;
+               } elseif (stripos($measurement, 'K')) {
+                       $bytes *= 1024;
+               }
+               return $bytes;
+       }
+
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/install/Classes/SystemEnvironment/ErrorStatus.php b/typo3/sysext/install/Classes/SystemEnvironment/ErrorStatus.php
new file mode 100644 (file)
index 0000000..9899e6c
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+namespace TYPO3\CMS\Install\SystemEnvironment;
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Christian Kuhn <lolli@schwarzbu.ch>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Error level status
+ *
+ * @author Christian Kuhn <lolli@schwarzbu.ch>
+ */
+class ErrorStatus extends AbstractStatus implements StatusInterface {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/install/Classes/SystemEnvironment/InfoStatus.php b/typo3/sysext/install/Classes/SystemEnvironment/InfoStatus.php
new file mode 100644 (file)
index 0000000..330f584
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+namespace TYPO3\CMS\Install\SystemEnvironment;
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Christian Kuhn <lolli@schwarzbu.ch>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Info level status
+ *
+ * @author Christian Kuhn <lolli@schwarzbu.ch>
+ */
+class InfoStatus extends AbstractStatus implements StatusInterface {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/install/Classes/SystemEnvironment/NoticeStatus.php b/typo3/sysext/install/Classes/SystemEnvironment/NoticeStatus.php
new file mode 100644 (file)
index 0000000..2a5389e
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+namespace TYPO3\CMS\Install\SystemEnvironment;
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Christian Kuhn <lolli@schwarzbu.ch>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Notice level status
+ *
+ * @author Christian Kuhn <lolli@schwarzbu.ch>
+ */
+class NoticeStatus extends AbstractStatus implements StatusInterface {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/install/Classes/SystemEnvironment/OkStatus.php b/typo3/sysext/install/Classes/SystemEnvironment/OkStatus.php
new file mode 100644 (file)
index 0000000..a63d122
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+namespace TYPO3\CMS\Install\SystemEnvironment;
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Christian Kuhn <lolli@schwarzbu.ch>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Ok level status
+ *
+ * @author Christian Kuhn <lolli@schwarzbu.ch>
+ */
+class OkStatus extends AbstractStatus implements StatusInterface {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/install/Classes/SystemEnvironment/StatusInterface.php b/typo3/sysext/install/Classes/SystemEnvironment/StatusInterface.php
new file mode 100644 (file)
index 0000000..dbec649
--- /dev/null
@@ -0,0 +1,62 @@
+<?php
+namespace TYPO3\CMS\Install\SystemEnvironment;
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Christian Kuhn <lolli@schwarzbu.ch>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Interface for SystemEnvironment status
+ *
+ * @author Christian Kuhn <lolli@schwarzbu.ch>
+ */
+interface StatusInterface {
+
+       /**
+        * @return string The title
+        */
+       public function getTitle();
+
+       /**
+        * Set title
+        *
+        * @param string $title The title
+        * @return void
+        */
+       public function setTitle($title);
+
+       /**
+        * Get status message
+        *
+        * @return string Status message
+        */
+       public function getMessage();
+
+       /**
+        * Set status message
+        *
+        * @param string $message Status message
+        * @return void
+        */
+       public function setMessage($message);
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/install/Classes/SystemEnvironment/TestImages/jesus.gif b/typo3/sysext/install/Classes/SystemEnvironment/TestImages/jesus.gif
new file mode 100755 (executable)
index 0000000..8aa99ca
Binary files /dev/null and b/typo3/sysext/install/Classes/SystemEnvironment/TestImages/jesus.gif differ
diff --git a/typo3/sysext/install/Classes/SystemEnvironment/TestImages/jesus.png b/typo3/sysext/install/Classes/SystemEnvironment/TestImages/jesus.png
new file mode 100755 (executable)
index 0000000..3aa8547
Binary files /dev/null and b/typo3/sysext/install/Classes/SystemEnvironment/TestImages/jesus.png differ
diff --git a/typo3/sysext/install/Classes/SystemEnvironment/WarningStatus.php b/typo3/sysext/install/Classes/SystemEnvironment/WarningStatus.php
new file mode 100644 (file)
index 0000000..fc24c82
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+namespace TYPO3\CMS\Install\SystemEnvironment;
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Christian Kuhn <lolli@schwarzbu.ch>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Warning level status
+ *
+ * @author Christian Kuhn <lolli@schwarzbu.ch>
+ */
+class WarningStatus extends AbstractStatus implements StatusInterface {
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/install/Resources/Private/Language/Report/locallang.xlf b/typo3/sysext/install/Resources/Private/Language/Report/locallang.xlf
new file mode 100644 (file)
index 0000000..bb38f86
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xliff version="1.0">
+       <file source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:33Z" product-name="install">
+               <header/>
+               <body>
+                       <trans-unit id="environment.status.title" xml:space="preserve">
+                               <source>System environment check</source>
+                       </trans-unit>
+                       <trans-unit id="environment.status.value" xml:space="preserve">
+                               <source>%1s Test(s)</source>
+                       </trans-unit>
+                       <trans-unit id="environment.status.message.error" xml:space="preserve">
+                               <source>The system environment check returned errors. Those errors will affect the functionality and stability of your TYPO3 CMS instance. Please check the install tool "System environment" for all details.</source>
+                       </trans-unit>
+                       <trans-unit id="environment.status.message.warning" xml:space="preserve">
+                               <source>The system environment check returned warnings. Those errors might have a negative affect to the functionality and stability of your TYPO3 CMS instance. Please check the install tool "System environment" for all details.</source>
+                       </trans-unit>
+                       <trans-unit id="environment.status.message.notice" xml:space="preserve">
+                               <source>The system environment check returned notices. Those should not affect the functionality and stability of your TYPO3 CMS instance. Please check the install tool "System environment" for all details.</source>
+                       </trans-unit>
+                       <trans-unit id="environment.status.message.ok" xml:space="preserve">
+                               <source />
+                       </trans-unit>
+                       <trans-unit id="environment.status.message.info" xml:space="preserve">
+                               <source />
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
diff --git a/typo3/sysext/install/Resources/Public/Images/menuSystemEnvironment.png b/typo3/sysext/install/Resources/Public/Images/menuSystemEnvironment.png
new file mode 100644 (file)
index 0000000..b3141e1
Binary files /dev/null and b/typo3/sysext/install/Resources/Public/Images/menuSystemEnvironment.png differ
index 281ebb7..ddbda49 100644 (file)
@@ -259,6 +259,10 @@ button span.t3-install-form-button-icon-positive {
        background-image: url('../Images/menuConfig.png');
 }
 
+#t3-install-menu #t3-install-menu-systemEnvironment {
+       background-image: url('../Images/menuSystemEnvironment.png');
+}
+
 #t3-install-menu #t3-install-menu-database {
        background-image: url('../Images/menuDatabase.png');
 }
index b52ff83..31a1ceb 100755 (executable)
@@ -6,5 +6,6 @@ if (TYPO3_MODE === 'BE') {
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath('tools_install', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod/');
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('tools', 'install', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod/');
        $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['typo3'][] = 'TYPO3\\CMS\\Install\\Report\\InstallStatusReport';
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['system'][] = 'TYPO3\\CMS\\Install\\Report\\EnvironmentStatusReport';
 }
 ?>
\ No newline at end of file
index 41c7d6b..0d88876 100644 (file)
@@ -30,8 +30,6 @@
  * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
  * @author     Ingmar Schlecht <ingmar@typo3.org>
  */
-// include requirements definition:
-require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('install') . 'requirements.php';
 // include session handling
 require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('install') . 'mod/class.tx_install_session.php';
 // include update classes
@@ -57,4 +55,4 @@ require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('instal
  * typo3/sysext/install/Classes/Installer.php
  */
 require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('install') . 'Classes/Installer.php';
-?>
\ No newline at end of file
+?>
index fc14bb5..2cf36ef 100644 (file)
@@ -21,7 +21,6 @@
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
-require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('install', 'requirements.php');
 /*
  * @deprecated since 6.0, the classname tx_install_report_InstallStatus and this file is obsolete
  * and will be removed with 6.2. The class was renamed and is now located at:
diff --git a/typo3/sysext/install/requirements.php b/typo3/sysext/install/requirements.php
deleted file mode 100644 (file)
index e88a50b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-define('TYPO3_REQUIREMENTS_MINIMUM_PHP', '5.2.0');
-define('TYPO3_REQUIREMENTS_MINIMUM_PHP_MEMORY_LIMIT', '32M');
-define('TYPO3_REQUIREMENTS_RECOMMENDED_PHP_MEMORY_LIMIT', '64M');
-?>
\ No newline at end of file
index 9df6775..e77808b 100644 (file)
@@ -63,11 +63,6 @@ class ConfigurationStatus implements \TYPO3\CMS\Reports\StatusProviderInterface
                        'emptyReferenceIndex' => $this->getReferenceIndexStatus(),
                        'deprecationLog' => $this->getDeprecationLogStatus()
                );
-               // Do not show status about non-existent features
-               if (version_compare(phpversion(), '5.4', '<')) {
-                       $statuses['safeModeEnabled'] = $this->getPhpSafeModeStatus();
-                       $statuses['magicQuotesGpcEnabled'] = $this->getPhpMagicQuotesGpcStatus();
-               }
                if ($this->isMemcachedUsed()) {
                        $statuses['memcachedConnection'] = $this->getMemcachedConnectionStatus();
                }
@@ -100,40 +95,6 @@ class ConfigurationStatus implements \TYPO3\CMS\Reports\StatusProviderInterface
        }
 
        /**
-        * Checks if PHP safe_mode is enabled.
-        *
-        * @return \TYPO3\CMS\Reports\Status A tx_reports_reports_status_Status object representing whether the safe_mode is enabled or not
-        */
-       protected function getPhpSafeModeStatus() {
-               $value = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:disabled');
-               $message = '';
-               $severity = \TYPO3\CMS\Reports\Status::OK;
-               if (\TYPO3\CMS\Core\Utility\PhpOptionsUtility::isSafeModeEnabled()) {
-                       $value = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:enabled');
-                       $severity = \TYPO3\CMS\Reports\Status::WARNING;
-                       $message = $GLOBALS['LANG']->getLL('status_configuration_PhpSafeModeEnabled');
-               }
-               return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Reports\\Status', $GLOBALS['LANG']->getLL('status_PhpSafeMode'), $value, $message, $severity);
-       }
-
-       /**
-        * Checks if PHP magic_quotes_gpc is enabled.
-        *
-        * @return \TYPO3\CMS\Reports\Status A tx_reports_reports_status_Status object representing whether the magic_quote_gpc is enabled or not
-        */
-       protected function getPhpMagicQuotesGpcStatus() {
-               $value = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:disabled');
-               $message = '';
-               $severity = \TYPO3\CMS\Reports\Status::OK;
-               if (\TYPO3\CMS\Core\Utility\PhpOptionsUtility::isMagicQuotesGpcEnabled()) {
-                       $value = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:enabled');
-                       $severity = \TYPO3\CMS\Reports\Status::WARNING;
-                       $message = $GLOBALS['LANG']->getLL('status_configuration_PhpMagicQuotesGpcEnabled');
-               }
-               return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Reports\\Status', $GLOBALS['LANG']->getLL('status_PhpMagicQuotesGpc'), $value, $message, $severity);
-       }
-
-       /**
         * Checks whether memcached is configured, if that's the case we asume it's also used.
         *
         * @return boolean TRUE if memcached is used, FALSE otherwise.
index 19887cf..f9e802f 100644 (file)
@@ -31,28 +31,6 @@ namespace TYPO3\CMS\Reports\Report\Status;
 class SystemStatus implements \TYPO3\CMS\Reports\StatusProviderInterface {
 
        /**
-        * PHP modules which are required. Can be changed by hook in getMissingPhpModules()
-        *
-        * @var array
-        */
-       protected $requiredPhpModules = array(
-               'fileinfo',
-               'filter',
-               'gd',
-               'json',
-               'mysql',
-               'pcre',
-               'session',
-               'SPL',
-               'standard',
-               'openssl',
-               'xml',
-               'zlib',
-               'soap',
-               'zip'
-       );
-
-       /**
         * Determines the Install Tool's status, mainly concerning its protection.
         *
         * @return array List of statuses
@@ -61,61 +39,13 @@ class SystemStatus implements \TYPO3\CMS\Reports\StatusProviderInterface {
        public function getStatus() {
                $this->executeAdminCommand();
                $statuses = array(
-                       'Php' => $this->getPhpStatus(),
-                       'PhpMemoryLimit' => $this->getPhpMemoryLimitStatus(),
                        'PhpPeakMemory' => $this->getPhpPeakMemoryStatus(),
-                       'Webserver' => $this->getWebserverStatus(),
-                       'PhpModules' => $this->getMissingPhpModules()
+                       'PhpModules' => $this->getMissingPhpModulesOfExtensions()
                );
                return $statuses;
        }
 
        /**
-        * Checks the current PHP version against a minimum required version.
-        *
-        * @return \TYPO3\CMS\Reports\Status A status of whether a minimum PHP version requirement is met
-        */
-       protected function getPhpStatus() {
-               $message = '';
-               $severity = \TYPO3\CMS\Reports\Status::OK;
-               if (version_compare(phpversion(), TYPO3_REQUIREMENTS_MINIMUM_PHP) < 0) {
-                       $message = $GLOBALS['LANG']->getLL('status_phpTooOld');
-                       $severity = \TYPO3\CMS\Reports\Status::ERROR;
-               }
-               return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Reports\\Status', $GLOBALS['LANG']->getLL('status_phpVersion'), phpversion(), $message, $severity);
-       }
-
-       /**
-        * Checks the current memory limit against a minimum required version.
-        *
-        * @return \TYPO3\CMS\Reports\Status A status of whether a minimum memory limit requirement is met
-        */
-       protected function getPhpMemoryLimitStatus() {
-               $memoryLimit = ini_get('memory_limit');
-               $memoryLimitBytes = \TYPO3\CMS\Core\Utility\GeneralUtility::getBytesFromSizeMeasurement($memoryLimit);
-               $message = '';
-               $severity = \TYPO3\CMS\Reports\Status::OK;
-               if ($memoryLimitBytes > 0) {
-                       if ($memoryLimitBytes < \TYPO3\CMS\Core\Utility\GeneralUtility::getBytesFromSizeMeasurement(TYPO3_REQUIREMENTS_RECOMMENDED_PHP_MEMORY_LIMIT)) {
-                               $message = sprintf($GLOBALS['LANG']->getLL('status_phpMemoryRecommendation'), $memoryLimit, TYPO3_REQUIREMENTS_RECOMMENDED_PHP_MEMORY_LIMIT);
-                               $severity = \TYPO3\CMS\Reports\Status::WARNING;
-                       }
-                       if ($memoryLimitBytes < \TYPO3\CMS\Core\Utility\GeneralUtility::getBytesFromSizeMeasurement(TYPO3_REQUIREMENTS_MINIMUM_PHP_MEMORY_LIMIT)) {
-                               $message = sprintf($GLOBALS['LANG']->getLL('status_phpMemoryRequirement'), $memoryLimit, TYPO3_REQUIREMENTS_MINIMUM_PHP_MEMORY_LIMIT);
-                               $severity = \TYPO3\CMS\Reports\Status::ERROR;
-                       }
-                       if ($severity > \TYPO3\CMS\Reports\Status::OK) {
-                               if ($php_ini_path = get_cfg_var('cfg_file_path')) {
-                                       $message .= ' ' . sprintf($GLOBALS['LANG']->getLL('status_phpMemoryEditLimit'), $php_ini_path);
-                               } else {
-                                       $message .= ' ' . $GLOBALS['LANG']->getLL('status_phpMemoryContactAdmin');
-                               }
-                       }
-               }
-               return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Reports\\Status', $GLOBALS['LANG']->getLL('status_phpMemory'), $memoryLimitBytes > 0 ? $memoryLimit : $GLOBALS['LANG']->getLL('status_phpMemoryUnlimited'), $message, $severity);
-       }
-
-       /**
         * Executes commands like clearing the memory status flag
         *
         * @return void
@@ -134,7 +64,7 @@ class SystemStatus implements \TYPO3\CMS\Reports\StatusProviderInterface {
        /**
         * Checks if there was a request in the past which approached the memory limit
         *
-        * @return tx_reports_reports_status_Status     A status of whether the memory limit was approached by one of the requests
+        * @return \TYPO3\CMS\Reports\Status A status of whether the memory limit was approached by one of the requests
         */
        protected function getPhpPeakMemoryStatus() {
                /** @var $registry \TYPO3\CMS\Core\Registry */
@@ -159,30 +89,12 @@ class SystemStatus implements \TYPO3\CMS\Reports\StatusProviderInterface {
        }
 
        /**
-        * Reports the webserver TYPO3 is running on.
-        *
-        * @return \TYPO3\CMS\Reports\Status The server software as a status
-        */
-       protected function getWebserverStatus() {
-               $value = $_SERVER['SERVER_SOFTWARE'];
-               $message = '';
-               // The additional information are only important on a Windows system with Apache running.
-               // Even with lowest Apache ServerTokens (Prod[uctOnly]) the name is returned.
-               if (TYPO3_OS === 'WIN' && substr($value, 0, 6) === 'Apache') {
-                       $message .= '<p>' . $GLOBALS['LANG']->getLL('status_webServer_infoText') . '</p>';
-                       $message .= '<div class="typo3-message message-warning">' . $GLOBALS['LANG']->getLL('status_webServer_threadStackSize') . '</div>';
-               }
-               return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Reports\\Status', $GLOBALS['LANG']->getLL('status_webServer'), $value, $message);
-       }
-
-       /**
-        * Reports whether any of the required PHP modules are missing
+        * Reports whether extensions need additional PHP modules different from standard core requirements
         *
         * @return \TYPO3\CMS\Reports\Status A status of missing PHP modules
         */
-       protected function getMissingPhpModules() {
-               // Hook to adjust the required PHP modules
-               $modules = $this->requiredPhpModules;
+       protected function getMissingPhpModulesOfExtensions() {
+               $modules = array();
                if (is_array(${$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install/mod/class.tx_install.php']['requiredPhpModules']})) {
                        foreach (${$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install/mod/class.tx_install.php']['requiredPhpModules']} as $classData) {
                                $hookObject = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classData);