Check implements CheckInterface
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).
This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.
Table of Contents
Interfaces
- CheckInterface
- Check system environment status
Properties
- $messageQueue : FlashMessageQueue
- $requiredPhpExtensions : array<string|int, mixed>
- $suggestedPhpExtensions : array<string|int, string>
Methods
- __construct() : mixed
- checkPhpExtension() : mixed
- Checks if a specific PHP extension is loaded.
- getMessageQueue() : FlashMessageQueue
- getStatus() : FlashMessageQueue
- Get all status information as array with status objects
- checkCurrentDirectoryIsInIncludePath() : mixed
- Checks if current directory (.) is in PHP include path
- checkDisableFunctions() : mixed
- Check for disabled functions
- checkDocRoot() : mixed
- Check for doc_root ini setting
- checkFileUploadEnabled() : mixed
- Check if file uploads are enabled in PHP
- checkGdLibFreeTypeSupport() : mixed
- Check gdlib supports freetype
- checkGdLibGifSupport() : mixed
- Check gif support of GD library
- checkGdLibJpgSupport() : mixed
- Check jpg support of GD library
- checkGdLibPngSupport() : mixed
- Check png support of GD library
- checkGdLibTrueColorSupport() : mixed
- Check imagecreatetruecolor to verify gdlib works as expected
- checkMaxExecutionTime() : mixed
- Check maximum execution time
- checkMaxInputVars() : mixed
- Get max_input_vars status
- checkMemorySettings() : mixed
- Check memory settings
- checkOpenBaseDir() : mixed
- Check open_basedir
- checkPcreVersion() : mixed
- Check PRCE module is loaded and minimum version
- checkPhpVersion() : mixed
- Check minimum PHP version
- checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize() : mixed
- Check maximum post upload size correlates with maximum file upload
- checkReflectionDocComment() : mixed
- Check doc comments can be fetched by reflection
- checkWindowsApacheThreadStackSize() : mixed
- Checks thread stack size if on windows with apache
- checkXdebugMaxNestingLevel() : mixed
- If xdebug is loaded, the default max_nesting_level of 100 must be raised
- getBytesFromSizeMeasurement() : int
- Helper method to get the bytes value from a measurement string like "100k".
- isValidIp() : bool
- Validate a given IP address.
- isWindowsOs() : bool
- Test if this instance runs on windows OS
- trimExplode() : array<string|int, mixed>
- Helper method to explode a string by delimiter and throw away empty values.
Properties
$messageQueue
protected
FlashMessageQueue
$messageQueue
$requiredPhpExtensions
protected
array<string|int, mixed>
$requiredPhpExtensions
= ['filter', 'gd', 'hash', 'json', 'libxml', 'PDO', 'session', 'SPL', 'standard', 'xml', 'zip', 'zlib']
List of required PHP extensions
$suggestedPhpExtensions
protected
array<string|int, string>
$suggestedPhpExtensions
= ['fileinfo' => 'This extension is used for proper file type detection in the File Abstraction Layer.', 'intl' => 'This extension is used for correct language and locale handling.', 'openssl' => 'This extension is used for sending SMTP mails over an encrypted channel endpoint.']
Methods
__construct()
public
__construct() : mixed
checkPhpExtension()
Checks if a specific PHP extension is loaded.
public
checkPhpExtension(string $extension[, bool $required = true ][, string $purpose = '' ]) : mixed
Parameters
- $extension : string
- $required : bool = true
- $purpose : string = ''
getMessageQueue()
public
getMessageQueue() : FlashMessageQueue
Return values
FlashMessageQueuegetStatus()
Get all status information as array with status objects
public
getStatus() : FlashMessageQueue
Return values
FlashMessageQueuecheckCurrentDirectoryIsInIncludePath()
Checks if current directory (.) is in PHP include path
protected
checkCurrentDirectoryIsInIncludePath() : mixed
checkDisableFunctions()
Check for disabled functions
protected
checkDisableFunctions() : mixed
checkDocRoot()
Check for doc_root ini setting
protected
checkDocRoot() : mixed
checkFileUploadEnabled()
Check if file uploads are enabled in PHP
protected
checkFileUploadEnabled() : mixed
checkGdLibFreeTypeSupport()
Check gdlib supports freetype
protected
checkGdLibFreeTypeSupport() : mixed
checkGdLibGifSupport()
Check gif support of GD library
protected
checkGdLibGifSupport() : mixed
checkGdLibJpgSupport()
Check jpg support of GD library
protected
checkGdLibJpgSupport() : mixed
checkGdLibPngSupport()
Check png support of GD library
protected
checkGdLibPngSupport() : mixed
checkGdLibTrueColorSupport()
Check imagecreatetruecolor to verify gdlib works as expected
protected
checkGdLibTrueColorSupport() : mixed
checkMaxExecutionTime()
Check maximum execution time
protected
checkMaxExecutionTime() : mixed
checkMaxInputVars()
Get max_input_vars status
protected
checkMaxInputVars() : mixed
checkMemorySettings()
Check memory settings
protected
checkMemorySettings() : mixed
checkOpenBaseDir()
Check open_basedir
protected
checkOpenBaseDir() : mixed
checkPcreVersion()
Check PRCE module is loaded and minimum version
protected
checkPcreVersion() : mixed
checkPhpVersion()
Check minimum PHP version
protected
checkPhpVersion() : mixed
checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize()
Check maximum post upload size correlates with maximum file upload
protected
checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize() : mixed
checkReflectionDocComment()
Check doc comments can be fetched by reflection
protected
checkReflectionDocComment() : mixed
checkWindowsApacheThreadStackSize()
Checks thread stack size if on windows with apache
protected
checkWindowsApacheThreadStackSize() : mixed
checkXdebugMaxNestingLevel()
If xdebug is loaded, the default max_nesting_level of 100 must be raised
protected
checkXdebugMaxNestingLevel() : mixed
getBytesFromSizeMeasurement()
Helper method to get the bytes value from a measurement string like "100k".
protected
getBytesFromSizeMeasurement(string $measurement) : int
Parameters
- $measurement : string
-
The measurement (e.g. "100k")
Return values
int —The bytes value (e.g. 102400)
isValidIp()
Validate a given IP address.
protected
isValidIp(string $ip) : bool
Parameters
- $ip : string
-
IP address to be tested
Return values
boolisWindowsOs()
Test if this instance runs on windows OS
protected
isWindowsOs() : bool
Return values
bool —TRUE if operating system is windows
trimExplode()
Helper method to explode a string by delimiter and throw away empty values.
protected
trimExplode(string $delimiter, string $string) : array<string|int, mixed>
Removes empty values from result array.
Parameters
- $delimiter : string
-
Delimiter string to explode with
- $string : string
-
The string to explode
Return values
array<string|int, mixed> —Exploded values