TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Install\SystemEnvironment\Check Class Reference

Public Member Functions

 getStatus ()
 

Protected Member Functions

 checkCurrentDirectoryIsInIncludePath ()
 
 checkFileUploadEnabled ()
 
 checkMaximumFileUploadSize ()
 
 checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize ()
 
 checkMemorySettings ()
 
 checkPhpVersion ()
 
 checkMaxExecutionTime ()
 
 checkDisableFunctions ()
 
 checkDownloadsPossible ()
 
 checkMysqliReconnectSetting ()
 
 checkSafeMode ()
 
 checkDocRoot ()
 
 checkOpenBaseDir ()
 
 checkXdebugMaxNestingLevel ()
 
 checkOpenSslInstalled ()
 
 getSuhosinLoadedStatus ()
 
 checkSuhosinRequestMaxVars ()
 
 checkSuhosinRequestMaxVarnameLength ()
 
 checkSuhosinPostMaxNameLength ()
 
 checkSuhosinPostMaxVars ()
 
 checkSuhosinGetMaxValueLength ()
 
 checkSuhosinGetMaxNameLength ()
 
 checkSuhosinExecutorIncludeWhiteListContainsPhar ()
 
 checkSuhosinExecutorIncludeWhiteListContainsVfs ()
 
 checkSomePhpOpcodeCacheIsLoaded ()
 
 checkReflectionDocComment ()
 
 checkSystemLocale ()
 
 checkLocaleWithUTF8filesystem ()
 
 checkWindowsApacheThreadStackSize ()
 
 checkRequiredPhpExtension ($extension)
 
 checkGdLibTrueColorSupport ()
 
 checkGdLibGifSupport ()
 
 checkGdLibJpgSupport ()
 
 checkGdLibPngSupport ()
 
 checkGdLibFreeTypeSupport ()
 
 isTrueTypeFontDpiStandard ()
 
 checkPhpMagicQuotes ()
 
 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).

Author
Christian Kuhn lolli.nosp@m.@sch.nosp@m.warzb.nosp@m.u.ch

Definition at line 49 of file Check.php.

Member Function Documentation

◆ 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 359 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 483 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 410 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 156 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 1259 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 1164 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 1199 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 1223 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 1134 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 1379 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 1036 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 302 of file Check.php.

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

◆ checkMaximumFileUploadSize()

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

Check maximum file upload size against default value of 10MB

Returns
Status

Definition at line 182 of file Check.php.

References $GLOBALS, and TYPO3\CMS\Install\SystemEnvironment\Check\getBytesFromSizeMeasurement().

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 431 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 508 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 576 of file Check.php.

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

◆ checkPhpMagicQuotes()

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

Check php magic quotes

Returns
Status

Definition at line 1328 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 280 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 968 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 1351 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 1114 of file Check.php.

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

◆ checkSafeMode()

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

Check if safe mode is enabled

Returns
Status

Definition at line 455 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 901 of file Check.php.

References TYPO3\CMS\Core\Utility\OpcodeCacheUtility\getAllActive().

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 836 of file Check.php.

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

◆ checkSuhosinExecutorIncludeWhiteListContainsVfs()

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

Check suhosin.executor.include.whitelist contains vfs

Returns
Status

Definition at line 868 of file Check.php.

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

◆ checkSuhosinGetMaxNameLength()

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

Check suhosin.get.max_name_length

Returns
Status

Definition at line 801 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 766 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 696 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 661 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 1002 of file Check.php.

References $GLOBALS.

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

◆ checkWindowsApacheThreadStackSize()

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

Checks thread stack size if on windows with apache

Returns
Status

Definition at line 1083 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 532 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
integer The bytes value (e.g. 102400)

Definition at line 1474 of file Check.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\Check\checkMaximumFileUploadSize(), 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 77 of file Check.php.

References 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\checkMaximumFileUploadSize(), 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\checkPhpMagicQuotes(), 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\checkSafeMode(), TYPO3\CMS\Install\SystemEnvironment\Check\checkSomePhpOpcodeCacheIsLoaded(), 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\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\isTrueTypeFontDpiStandard().

◆ 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 611 of file Check.php.

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

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

◆ isSuhosinLoadedAndActive()

◆ isTrueTypeFontDpiStandard()

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

Create true type font test image

Returns
Status

Definition at line 1285 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
boolean

Definition at line 1411 of file Check.php.

◆ isWindowsOs()

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

Test if this instance runs on windows OS

Returns
boolean TRUE if operating system is windows

Definition at line 1420 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 delimeter 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 1456 of file Check.php.

References $result.

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:
= array(
'fileinfo',
'filter',
'gd',
'hash',
'json',
'mysqli',
'openssl',
'pcre',
'session',
'soap',
'SPL',
'standard',
'xml',
'zip',
'zlib',
)

Definition at line 54 of file Check.php.