TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Install\SystemEnvironment\Check Class Reference

Public Member Functions

 getStatus ()
 

Protected Member Functions

 checkCurrentDirectoryIsInIncludePath ()
 
 checkTrustedHostPattern ()
 
 checkFileUploadEnabled ()
 
 checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize ()
 
 checkMemorySettings ()
 
 checkPhpVersion ()
 
 checkPcreVersion ()
 
 checkMaxExecutionTime ()
 
 checkDisableFunctions ()
 
 checkDownloadsPossible ()
 
 checkMysqliReconnectSetting ()
 
 checkAlwaysPopulateRawPostDataSetting ()
 
 checkDocRoot ()
 
 checkOpenBaseDir ()
 
 checkXdebugMaxNestingLevel ()
 
 checkOpenSslInstalled ()
 
 checkMaxInputVars ()
 
 getSuhosinLoadedStatus ()
 
 checkSuhosinRequestMaxVars ()
 
 checkSuhosinRequestMaxVarnameLength ()
 
 checkSuhosinPostMaxNameLength ()
 
 checkSuhosinPostMaxVars ()
 
 checkSuhosinGetMaxValueLength ()
 
 checkSuhosinGetMaxNameLength ()
 
 checkSuhosinExecutorIncludeWhiteListContainsPhar ()
 
 checkSuhosinExecutorIncludeWhiteListContainsVfs ()
 
 checkSomePhpOpcodeCacheIsLoaded ()
 
 checkReflectionDocComment ()
 
 checkSystemLocale ()
 
 checkLocaleWithUTF8filesystem ()
 
 checkWindowsApacheThreadStackSize ()
 
 checkRequiredPhpExtension ($extension)
 
 checkGdLibTrueColorSupport ()
 
 checkGdLibGifSupport ()
 
 checkGdLibJpgSupport ()
 
 checkGdLibPngSupport ()
 
 checkGdLibFreeTypeSupport ()
 
 isTrueTypeFontWorking ()
 
 checkRegisterGlobals ()
 
 checkLibXmlBug ()
 
 isValidIp ($ip)
 
 isWindowsOs ()
 
 isSuhosinLoadedAndActive ()
 
 trimExplode ($delimiter, $string)
 
 getBytesFromSizeMeasurement ($measurement)
 

Protected Attributes

 $requiredPhpExtensions
 

Detailed Description

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.

The only core code used is the class loader

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).

Definition at line 49 of file Check.php.

Member Function Documentation

◆ checkAlwaysPopulateRawPostDataSetting()

TYPO3\CMS\Install\SystemEnvironment\Check::checkAlwaysPopulateRawPostDataSetting ( )
protected

Check that always_populate_raw_post_data has been set to -1 on PHP 5.6 or newer

Returns
Status

Definition at line 490 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkCurrentDirectoryIsInIncludePath()

TYPO3\CMS\Install\SystemEnvironment\Check::checkCurrentDirectoryIsInIncludePath ( )
protected

Checks if current directory (.) is in PHP include path

Returns
Status

Definition at line 130 of file Check.php.

References TYPO3\CMS\Install\SystemEnvironment\Check\isWindowsOs(), and TYPO3\CMS\Install\SystemEnvironment\Check\trimExplode().

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkDisableFunctions()

TYPO3\CMS\Install\SystemEnvironment\Check::checkDisableFunctions ( )
protected

Check for disabled functions

Returns
Status

Definition at line 390 of file Check.php.

References TYPO3\CMS\Install\SystemEnvironment\Check\trimExplode().

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkDocRoot()

TYPO3\CMS\Install\SystemEnvironment\Check::checkDocRoot ( )
protected

Check for doc_root ini setting

Returns
Status

Definition at line 521 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkDownloadsPossible()

TYPO3\CMS\Install\SystemEnvironment\Check::checkDownloadsPossible ( )
protected

Check if it is possible to download external data (e.g. TER) Either allow_url_fopen must be enabled or curl must be used

Returns
Status|Status

Definition at line 444 of file Check.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkFileUploadEnabled()

TYPO3\CMS\Install\SystemEnvironment\Check::checkFileUploadEnabled ( )
protected

Check if file uploads are enabled in PHP

Returns
Status

Definition at line 182 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkGdLibFreeTypeSupport()

TYPO3\CMS\Install\SystemEnvironment\Check::checkGdLibFreeTypeSupport ( )
protected

Check gdlib supports freetype

Returns
Status

Definition at line 1349 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkGdLibGifSupport()

TYPO3\CMS\Install\SystemEnvironment\Check::checkGdLibGifSupport ( )
protected

Check gif support of GD library

Returns
Status

Definition at line 1254 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkGdLibJpgSupport()

TYPO3\CMS\Install\SystemEnvironment\Check::checkGdLibJpgSupport ( )
protected

Check jgp support of GD library

Returns
Status

Definition at line 1289 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkGdLibPngSupport()

TYPO3\CMS\Install\SystemEnvironment\Check::checkGdLibPngSupport ( )
protected

Check png support of GD library

Returns
Status

Definition at line 1313 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkGdLibTrueColorSupport()

TYPO3\CMS\Install\SystemEnvironment\Check::checkGdLibTrueColorSupport ( )
protected

Check imagecreatetruecolor to verify gdlib works as expected

Returns
Status

Definition at line 1223 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkLibXmlBug()

TYPO3\CMS\Install\SystemEnvironment\Check::checkLibXmlBug ( )
protected

Check for bug in libxml

Returns
Status

Definition at line 1447 of file Check.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\array2xml().

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkLocaleWithUTF8filesystem()

TYPO3\CMS\Install\SystemEnvironment\Check::checkLocaleWithUTF8filesystem ( )
protected

Checks whether we can use file names with UTF-8 characters. Configured system locale must support UTF-8 when UTF8filesystem is set

Returns
Status

Definition at line 1127 of file Check.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkMaxExecutionTime()

TYPO3\CMS\Install\SystemEnvironment\Check::checkMaxExecutionTime ( )
protected

Check maximum execution time

Returns
Status

Definition at line 341 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkMaxInputVars()

TYPO3\CMS\Install\SystemEnvironment\Check::checkMaxInputVars ( )
protected

Get max_input_vars status

Returns
Status

Definition at line 651 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkMemorySettings()

TYPO3\CMS\Install\SystemEnvironment\Check::checkMemorySettings ( )
protected

◆ checkMysqliReconnectSetting()

TYPO3\CMS\Install\SystemEnvironment\Check::checkMysqliReconnectSetting ( )
protected

Verify that mysqli.reconnect is set to 0 in order to avoid improper reconnects

Returns
Status

Definition at line 466 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkOpenBaseDir()

TYPO3\CMS\Install\SystemEnvironment\Check::checkOpenBaseDir ( )
protected

Check open_basedir

Returns
Status

Definition at line 547 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkOpenSslInstalled()

TYPO3\CMS\Install\SystemEnvironment\Check::checkOpenSslInstalled ( )
protected

Check accessibility and functionality of OpenSSL

Returns
Status

Definition at line 617 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkPcreVersion()

TYPO3\CMS\Install\SystemEnvironment\Check::checkPcreVersion ( )
protected

Check PRCE module is loaded and minimum version

Returns
Status

Definition at line 306 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkPhpVersion()

TYPO3\CMS\Install\SystemEnvironment\Check::checkPhpVersion ( )
protected

Check minimum PHP version

Returns
Status

Definition at line 283 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize()

TYPO3\CMS\Install\SystemEnvironment\Check::checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize ( )
protected

Check maximum post upload size correlates with maximum file upload

Returns
Status

Definition at line 207 of file Check.php.

References TYPO3\CMS\Install\SystemEnvironment\Check\getBytesFromSizeMeasurement().

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkReflectionDocComment()

TYPO3\CMS\Install\SystemEnvironment\Check::checkReflectionDocComment ( )
protected

Check doc comments can be fetched by reflection

Returns
Status

Definition at line 1058 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkRegisterGlobals()

TYPO3\CMS\Install\SystemEnvironment\Check::checkRegisterGlobals ( )
protected

Check register globals

Returns
Status

Definition at line 1418 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkRequiredPhpExtension()

TYPO3\CMS\Install\SystemEnvironment\Check::checkRequiredPhpExtension (   $extension)
protected

Check if a specific required PHP extension is loaded

Parameters
string$extension
Returns
Status

Definition at line 1202 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkSomePhpOpcodeCacheIsLoaded()

TYPO3\CMS\Install\SystemEnvironment\Check::checkSomePhpOpcodeCacheIsLoaded ( )
protected

Check if some opcode cache is loaded

Returns
Status

Definition at line 990 of file Check.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkSuhosinExecutorIncludeWhiteListContainsPhar()

TYPO3\CMS\Install\SystemEnvironment\Check::checkSuhosinExecutorIncludeWhiteListContainsPhar ( )
protected

Check suhosin.executor.include.whitelist contains phar

Returns
Status

Definition at line 923 of file Check.php.

References TYPO3\CMS\Install\SystemEnvironment\Check\isSuhosinLoadedAndActive().

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkSuhosinExecutorIncludeWhiteListContainsVfs()

TYPO3\CMS\Install\SystemEnvironment\Check::checkSuhosinExecutorIncludeWhiteListContainsVfs ( )
protected

Check suhosin.executor.include.whitelist contains vfs

Returns
Status

Definition at line 956 of file Check.php.

References TYPO3\CMS\Install\SystemEnvironment\Check\isSuhosinLoadedAndActive().

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkSuhosinGetMaxNameLength()

TYPO3\CMS\Install\SystemEnvironment\Check::checkSuhosinGetMaxNameLength ( )
protected

Check suhosin.get.max_name_length

Returns
Status

Definition at line 887 of file Check.php.

References TYPO3\CMS\Install\SystemEnvironment\Check\isSuhosinLoadedAndActive().

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkSuhosinGetMaxValueLength()

TYPO3\CMS\Install\SystemEnvironment\Check::checkSuhosinGetMaxValueLength ( )
protected

Check suhosin.get.max_value_length

Returns
Status

Definition at line 851 of file Check.php.

References TYPO3\CMS\Install\SystemEnvironment\Check\isSuhosinLoadedAndActive().

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkSuhosinPostMaxNameLength()

TYPO3\CMS\Install\SystemEnvironment\Check::checkSuhosinPostMaxNameLength ( )
protected

Check suhosin.post.max_name_length

Returns
Status

Definition at line 779 of file Check.php.

References TYPO3\CMS\Install\SystemEnvironment\Check\isSuhosinLoadedAndActive().

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkSuhosinPostMaxVars()

TYPO3\CMS\Install\SystemEnvironment\Check::checkSuhosinPostMaxVars ( )
protected

◆ checkSuhosinRequestMaxVarnameLength()

TYPO3\CMS\Install\SystemEnvironment\Check::checkSuhosinRequestMaxVarnameLength ( )
protected

Check suhosin.request.max_varname_length

Returns
Status

Definition at line 743 of file Check.php.

References TYPO3\CMS\Install\SystemEnvironment\Check\isSuhosinLoadedAndActive().

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkSuhosinRequestMaxVars()

TYPO3\CMS\Install\SystemEnvironment\Check::checkSuhosinRequestMaxVars ( )
protected

◆ checkSystemLocale()

TYPO3\CMS\Install\SystemEnvironment\Check::checkSystemLocale ( )
protected

Check if systemLocale setting is correct (locale exists in the OS)

Returns
Status

Definition at line 1093 of file Check.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkTrustedHostPattern()

TYPO3\CMS\Install\SystemEnvironment\Check::checkTrustedHostPattern ( )
protected

◆ checkWindowsApacheThreadStackSize()

TYPO3\CMS\Install\SystemEnvironment\Check::checkWindowsApacheThreadStackSize ( )
protected

Checks thread stack size if on windows with apache

Returns
Status

Definition at line 1171 of file Check.php.

References TYPO3\CMS\Install\SystemEnvironment\Check\isWindowsOs().

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ checkXdebugMaxNestingLevel()

TYPO3\CMS\Install\SystemEnvironment\Check::checkXdebugMaxNestingLevel ( )
protected

If xdebug is loaded, the default max_nesting_level of 100 must be raised

Returns
Status

Definition at line 572 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ getBytesFromSizeMeasurement()

TYPO3\CMS\Install\SystemEnvironment\Check::getBytesFromSizeMeasurement (   $measurement)
protected

Helper method to get the bytes value from a measurement string like "100k".

Parameters
string$measurementThe measurement (e.g. "100k")
Returns
int The bytes value (e.g. 102400)

Definition at line 1547 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\checkMemorySettings(), and TYPO3\CMS\Install\SystemEnvironment\Check\checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize().

◆ getStatus()

TYPO3\CMS\Install\SystemEnvironment\Check::getStatus ( )

Get all status information as array with status objects

Returns
array<>

Definition at line 75 of file Check.php.

References TYPO3\CMS\Install\SystemEnvironment\Check\checkAlwaysPopulateRawPostDataSetting(), TYPO3\CMS\Install\SystemEnvironment\Check\checkCurrentDirectoryIsInIncludePath(), TYPO3\CMS\Install\SystemEnvironment\Check\checkDisableFunctions(), TYPO3\CMS\Install\SystemEnvironment\Check\checkDocRoot(), TYPO3\CMS\Install\SystemEnvironment\Check\checkDownloadsPossible(), TYPO3\CMS\Install\SystemEnvironment\Check\checkFileUploadEnabled(), TYPO3\CMS\Install\SystemEnvironment\Check\checkGdLibFreeTypeSupport(), TYPO3\CMS\Install\SystemEnvironment\Check\checkGdLibGifSupport(), TYPO3\CMS\Install\SystemEnvironment\Check\checkGdLibJpgSupport(), TYPO3\CMS\Install\SystemEnvironment\Check\checkGdLibPngSupport(), TYPO3\CMS\Install\SystemEnvironment\Check\checkGdLibTrueColorSupport(), TYPO3\CMS\Install\SystemEnvironment\Check\checkLibXmlBug(), TYPO3\CMS\Install\SystemEnvironment\Check\checkLocaleWithUTF8filesystem(), TYPO3\CMS\Install\SystemEnvironment\Check\checkMaxExecutionTime(), TYPO3\CMS\Install\SystemEnvironment\Check\checkMaxInputVars(), TYPO3\CMS\Install\SystemEnvironment\Check\checkMemorySettings(), TYPO3\CMS\Install\SystemEnvironment\Check\checkMysqliReconnectSetting(), TYPO3\CMS\Install\SystemEnvironment\Check\checkOpenBaseDir(), TYPO3\CMS\Install\SystemEnvironment\Check\checkOpenSslInstalled(), TYPO3\CMS\Install\SystemEnvironment\Check\checkPcreVersion(), TYPO3\CMS\Install\SystemEnvironment\Check\checkPhpVersion(), TYPO3\CMS\Install\SystemEnvironment\Check\checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize(), TYPO3\CMS\Install\SystemEnvironment\Check\checkReflectionDocComment(), TYPO3\CMS\Install\SystemEnvironment\Check\checkRegisterGlobals(), TYPO3\CMS\Install\SystemEnvironment\Check\checkRequiredPhpExtension(), TYPO3\CMS\Install\SystemEnvironment\Check\checkSomePhpOpcodeCacheIsLoaded(), TYPO3\CMS\Install\SystemEnvironment\Check\checkSuhosinExecutorIncludeWhiteListContainsPhar(), TYPO3\CMS\Install\SystemEnvironment\Check\checkSuhosinExecutorIncludeWhiteListContainsVfs(), TYPO3\CMS\Install\SystemEnvironment\Check\checkSuhosinGetMaxNameLength(), TYPO3\CMS\Install\SystemEnvironment\Check\checkSuhosinGetMaxValueLength(), TYPO3\CMS\Install\SystemEnvironment\Check\checkSuhosinPostMaxNameLength(), TYPO3\CMS\Install\SystemEnvironment\Check\checkSuhosinPostMaxVars(), TYPO3\CMS\Install\SystemEnvironment\Check\checkSuhosinRequestMaxVarnameLength(), TYPO3\CMS\Install\SystemEnvironment\Check\checkSuhosinRequestMaxVars(), TYPO3\CMS\Install\SystemEnvironment\Check\checkSystemLocale(), TYPO3\CMS\Install\SystemEnvironment\Check\checkTrustedHostPattern(), TYPO3\CMS\Install\SystemEnvironment\Check\checkWindowsApacheThreadStackSize(), TYPO3\CMS\Install\SystemEnvironment\Check\checkXdebugMaxNestingLevel(), TYPO3\CMS\Install\SystemEnvironment\Check\getSuhosinLoadedStatus(), TYPO3\CMS\Install\SystemEnvironment\Check\isSuhosinLoadedAndActive(), and TYPO3\CMS\Install\SystemEnvironment\Check\isTrueTypeFontWorking().

◆ getSuhosinLoadedStatus()

TYPO3\CMS\Install\SystemEnvironment\Check::getSuhosinLoadedStatus ( )
protected

Get suhosin loaded status Should be called only if suhosin extension is loaded

Returns
Status
Exceptions

Definition at line 691 of file Check.php.

References TYPO3\CMS\Install\SystemEnvironment\Check\isSuhosinLoadedAndActive().

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ isSuhosinLoadedAndActive()

◆ isTrueTypeFontWorking()

TYPO3\CMS\Install\SystemEnvironment\Check::isTrueTypeFontWorking ( )
protected

Create true type font test image

Returns
Status

Definition at line 1376 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\getStatus().

◆ isValidIp()

TYPO3\CMS\Install\SystemEnvironment\Check::isValidIp (   $ip)
protected

Helper methods Validate a given IP address.

Parameters
string$ipIP address to be tested
Returns
bool

Definition at line 1480 of file Check.php.

◆ isWindowsOs()

TYPO3\CMS\Install\SystemEnvironment\Check::isWindowsOs ( )
protected

Test if this instance runs on windows OS

Returns
bool TRUE if operating system is windows

Definition at line 1490 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\checkCurrentDirectoryIsInIncludePath(), and TYPO3\CMS\Install\SystemEnvironment\Check\checkWindowsApacheThreadStackSize().

◆ trimExplode()

TYPO3\CMS\Install\SystemEnvironment\Check::trimExplode (   $delimiter,
  $string 
)
protected

Helper method to explode a string by delimiter and throw away empty values. Removes empty values from result array.

Parameters
string$delimiterDelimiter string to explode with
string$stringThe string to explode
Returns
array Exploded values

Definition at line 1528 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\checkCurrentDirectoryIsInIncludePath(), and TYPO3\CMS\Install\SystemEnvironment\Check\checkDisableFunctions().

Member Data Documentation

◆ $requiredPhpExtensions

TYPO3\CMS\Install\SystemEnvironment\Check::$requiredPhpExtensions
protected
Initial value:
= [
'filter',
'gd',
'hash',
'json',
'mysqli',
'openssl',
'session',
'soap',
'SPL',
'standard',
'xml',
'zip',
'zlib',
]

Definition at line 54 of file Check.php.