TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
Check Class Reference

Public Member Functions

 getStatus ()
 

Protected Member Functions

 checkCurrentDirectoryIsInIncludePath ()
 
 checkFileUploadEnabled ()
 
 checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize ()
 
 checkMemorySettings ()
 
 checkPhpVersion ()
 
 checkPcreVersion ()
 
 checkMaxExecutionTime ()
 
 checkDisableFunctions ()
 
 checkMysqliReconnectSetting ()
 
 checkDocRoot ()
 
 checkOpenBaseDir ()
 
 checkXdebugMaxNestingLevel ()
 
 checkOpenSslInstalled ()
 
 checkMaxInputVars ()
 
 getSuhosinLoadedStatus ()
 
 checkSuhosinRequestMaxVars ()
 
 checkSuhosinRequestMaxVarnameLength ()
 
 checkSuhosinPostMaxNameLength ()
 
 checkSuhosinPostMaxVars ()
 
 checkSuhosinGetMaxValueLength ()
 
 checkSuhosinGetMaxNameLength ()
 
 checkSuhosinExecutorIncludeWhiteListContainsPhar ()
 
 checkSuhosinExecutorIncludeWhiteListContainsVfs ()
 
 checkReflectionDocComment ()
 
 checkWindowsApacheThreadStackSize ()
 
 checkRequiredPhpExtension ($extension)
 
 checkGdLibTrueColorSupport ()
 
 checkGdLibGifSupport ()
 
 checkGdLibJpgSupport ()
 
 checkGdLibPngSupport ()
 
 checkGdLibFreeTypeSupport ()
 
 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 47 of file Check.php.

Member Function Documentation

checkCurrentDirectoryIsInIncludePath ( )
protected

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

Returns
Status

Definition at line 124 of file Check.php.

References Check\isWindowsOs(), and Check\trimExplode().

Referenced by Check\getStatus().

checkDisableFunctions ( )
protected

Check for disabled functions

Returns
Status

Definition at line 359 of file Check.php.

References Check\trimExplode().

Referenced by Check\getStatus().

checkDocRoot ( )
protected

Check for doc_root ini setting

Returns
Status

Definition at line 436 of file Check.php.

Referenced by Check\getStatus().

checkFileUploadEnabled ( )
protected

Check if file uploads are enabled in PHP

Returns
Status

Definition at line 151 of file Check.php.

Referenced by Check\getStatus().

checkGdLibFreeTypeSupport ( )
protected

Check gdlib supports freetype

Returns
Status

Definition at line 1119 of file Check.php.

Referenced by Check\getStatus().

checkGdLibGifSupport ( )
protected

Check gif support of GD library

Returns
Status

Definition at line 1023 of file Check.php.

Referenced by Check\getStatus().

checkGdLibJpgSupport ( )
protected

Check jgp support of GD library

Returns
Status

Definition at line 1059 of file Check.php.

Referenced by Check\getStatus().

checkGdLibPngSupport ( )
protected

Check png support of GD library

Returns
Status

Definition at line 1083 of file Check.php.

Referenced by Check\getStatus().

checkGdLibTrueColorSupport ( )
protected

Check imagecreatetruecolor to verify gdlib works as expected

Returns
Status

Definition at line 992 of file Check.php.

Referenced by Check\getStatus().

checkMaxExecutionTime ( )
protected

Check maximum execution time

Returns
Status

Definition at line 310 of file Check.php.

Referenced by Check\getStatus().

checkMaxInputVars ( )
protected

Get max_input_vars status

Returns
Status

Definition at line 566 of file Check.php.

Referenced by Check\getStatus().

checkMemorySettings ( )
protected

Check memory settings

Returns
Status

Definition at line 203 of file Check.php.

References Check\getBytesFromSizeMeasurement().

Referenced by Check\getStatus().

checkMysqliReconnectSetting ( )
protected

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

Returns
Status

Definition at line 412 of file Check.php.

Referenced by Check\getStatus().

checkOpenBaseDir ( )
protected

Check open_basedir

Returns
Status

Definition at line 462 of file Check.php.

Referenced by Check\getStatus().

checkOpenSslInstalled ( )
protected

Check accessibility and functionality of OpenSSL

Returns
Status

Definition at line 532 of file Check.php.

Referenced by Check\getStatus().

checkPcreVersion ( )
protected

Check PRCE module is loaded and minimum version

Returns
Status

Definition at line 275 of file Check.php.

Referenced by Check\getStatus().

checkPhpVersion ( )
protected

Check minimum PHP version

Returns
Status

Definition at line 252 of file Check.php.

Referenced by Check\getStatus().

checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize ( )
protected

Check maximum post upload size correlates with maximum file upload

Returns
Status

Definition at line 176 of file Check.php.

References Check\getBytesFromSizeMeasurement().

Referenced by Check\getStatus().

checkReflectionDocComment ( )
protected

Check doc comments can be fetched by reflection

Returns
Status

Definition at line 905 of file Check.php.

Referenced by Check\getStatus().

checkRequiredPhpExtension (   $extension)
protected

Check if a specific required PHP extension is loaded

Parameters
string$extension
Returns
Status

Definition at line 971 of file Check.php.

Referenced by Check\getStatus().

checkSuhosinExecutorIncludeWhiteListContainsPhar ( )
protected

Check suhosin.executor.include.whitelist contains phar

Returns
Status

Definition at line 838 of file Check.php.

References Check\isSuhosinLoadedAndActive().

Referenced by Check\getStatus().

checkSuhosinExecutorIncludeWhiteListContainsVfs ( )
protected

Check suhosin.executor.include.whitelist contains vfs

Returns
Status

Definition at line 871 of file Check.php.

References Check\isSuhosinLoadedAndActive().

Referenced by Check\getStatus().

checkSuhosinGetMaxNameLength ( )
protected

Check suhosin.get.max_name_length

Returns
Status

Definition at line 802 of file Check.php.

References Check\isSuhosinLoadedAndActive().

Referenced by Check\getStatus().

checkSuhosinGetMaxValueLength ( )
protected

Check suhosin.get.max_value_length

Returns
Status

Definition at line 766 of file Check.php.

References Check\isSuhosinLoadedAndActive().

Referenced by Check\getStatus().

checkSuhosinPostMaxNameLength ( )
protected

Check suhosin.post.max_name_length

Returns
Status

Definition at line 694 of file Check.php.

References Check\isSuhosinLoadedAndActive().

Referenced by Check\getStatus().

checkSuhosinPostMaxVars ( )
protected

Check suhosin.post.max_vars

Returns
Status

Definition at line 730 of file Check.php.

References Check\isSuhosinLoadedAndActive().

Referenced by Check\getStatus().

checkSuhosinRequestMaxVarnameLength ( )
protected

Check suhosin.request.max_varname_length

Returns
Status

Definition at line 658 of file Check.php.

References Check\isSuhosinLoadedAndActive().

Referenced by Check\getStatus().

checkSuhosinRequestMaxVars ( )
protected

Check suhosin.request.max_vars

Returns
Status

Definition at line 622 of file Check.php.

References Check\isSuhosinLoadedAndActive().

Referenced by Check\getStatus().

checkWindowsApacheThreadStackSize ( )
protected

Checks thread stack size if on windows with apache

Returns
Status

Definition at line 940 of file Check.php.

References Check\isWindowsOs().

Referenced by Check\getStatus().

checkXdebugMaxNestingLevel ( )
protected

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

Returns
Status

Definition at line 487 of file Check.php.

Referenced by Check\getStatus().

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

Referenced by Check\checkMemorySettings(), and Check\checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize().

getSuhosinLoadedStatus ( )
protected

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

Returns
Status
Exceptions
BadMethodCallException

Definition at line 606 of file Check.php.

References Check\isSuhosinLoadedAndActive().

Referenced by Check\getStatus().

isValidIp (   $ip)
protected

Helper methods Validate a given IP address.

Parameters
string$ipIP address to be tested
Returns
bool

Definition at line 1151 of file Check.php.

isWindowsOs ( )
protected

Test if this instance runs on windows OS

Returns
bool TRUE if operating system is windows

Definition at line 1161 of file Check.php.

Referenced by Check\checkCurrentDirectoryIsInIncludePath(), and Check\checkWindowsApacheThreadStackSize().

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

Referenced by Check\checkCurrentDirectoryIsInIncludePath(), and Check\checkDisableFunctions().

Member Data Documentation

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

Definition at line 52 of file Check.php.