‪TYPO3CMS  10.4
TYPO3\CMS\Install\SystemEnvironment\Check Class Reference
Inheritance diagram for TYPO3\CMS\Install\SystemEnvironment\Check:
TYPO3\CMS\Install\SystemEnvironment\CheckInterface

Public Member Functions

 __construct ()
 
 getMessageQueue ()
 
FlashMessageQueue getStatus ()
 
 checkPhpExtension (string $extension, bool $required=true, string $purpose='')
 

Protected Member Functions

 checkCurrentDirectoryIsInIncludePath ()
 
 checkFileUploadEnabled ()
 
 checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize ()
 
 checkMemorySettings ()
 
 checkPhpVersion ()
 
 checkPcreVersion ()
 
 checkMaxExecutionTime ()
 
 checkDisableFunctions ()
 
 checkDocRoot ()
 
 checkOpenBaseDir ()
 
 checkXdebugMaxNestingLevel ()
 
 checkMaxInputVars ()
 
 checkReflectionDocComment ()
 
 checkWindowsApacheThreadStackSize ()
 
 checkGdLibTrueColorSupport ()
 
 checkGdLibGifSupport ()
 
 checkGdLibJpgSupport ()
 
 checkGdLibPngSupport ()
 
 checkGdLibFreeTypeSupport ()
 
bool isValidIp ($ip)
 
bool isWindowsOs ()
 
array trimExplode ($delimiter, $string)
 
int getBytesFromSizeMeasurement ($measurement)
 

Protected Attributes

FlashMessageQueue $messageQueue
 
array $requiredPhpExtensions
 
string[] $suggestedPhpExtensions
 

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

This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.

Definition at line 54 of file Check.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 85 of file Check.php.

Member Function Documentation

◆ checkCurrentDirectoryIsInIncludePath()

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

◆ checkDisableFunctions()

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

◆ checkDocRoot()

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

Check for doc_root ini setting

Definition at line 420 of file Check.php.

References TYPO3\CMS\Core\Messaging\AbstractMessage\NOTICE.

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

◆ checkFileUploadEnabled()

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

Check if file uploads are enabled in PHP

Definition at line 164 of file Check.php.

References TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR.

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

◆ checkGdLibFreeTypeSupport()

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

Check gdlib supports freetype

Definition at line 758 of file Check.php.

References TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR.

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

◆ checkGdLibGifSupport()

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

Check gif support of GD library

Definition at line 668 of file Check.php.

References TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR.

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

◆ checkGdLibJpgSupport()

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

Check jpg support of GD library

Definition at line 701 of file Check.php.

References TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR.

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

◆ checkGdLibPngSupport()

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

Check png support of GD library

Definition at line 723 of file Check.php.

References TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR.

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

◆ checkGdLibTrueColorSupport()

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

Check imagecreatetruecolor to verify gdlib works as expected

Definition at line 638 of file Check.php.

References TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR.

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

◆ checkMaxExecutionTime()

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

◆ checkMaxInputVars()

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

◆ checkMemorySettings()

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

◆ checkOpenBaseDir()

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

◆ checkPcreVersion()

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

Check PRCE module is loaded and minimum version

Definition at line 288 of file Check.php.

References TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR.

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

◆ checkPhpExtension()

TYPO3\CMS\Install\SystemEnvironment\Check::checkPhpExtension ( string  $extension,
bool  $required = true,
string  $purpose = '' 
)

Checks if a specific PHP extension is loaded.

Parameters
string$extension
bool$required
string$purpose

Definition at line 617 of file Check.php.

References TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR, and TYPO3\CMS\Core\Messaging\AbstractMessage\WARNING.

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

◆ checkPhpVersion()

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

Check minimum PHP version

Definition at line 266 of file Check.php.

References TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR.

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

Definition at line 188 of file Check.php.

References TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR, and TYPO3\CMS\Install\SystemEnvironment\Check\getBytesFromSizeMeasurement().

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

◆ checkReflectionDocComment()

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

◆ checkWindowsApacheThreadStackSize()

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

Checks thread stack size if on windows with apache

Definition at line 586 of file Check.php.

References TYPO3\CMS\Install\SystemEnvironment\Check\isWindowsOs(), and TYPO3\CMS\Core\Messaging\AbstractMessage\WARNING.

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

Definition at line 469 of file Check.php.

References TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR, and TYPO3\CMS\Core\Messaging\AbstractMessage\WARNING.

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

◆ getBytesFromSizeMeasurement()

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

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

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

Definition at line 835 of file Check.php.

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

◆ getMessageQueue()

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

Definition at line 90 of file Check.php.

References TYPO3\CMS\Install\SystemEnvironment\Check\$messageQueue.

◆ getStatus()

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

Get all status information as array with status objects

Returns
‪FlashMessageQueue

Implements TYPO3\CMS\Install\SystemEnvironment\CheckInterface.

Definition at line 100 of file Check.php.

References TYPO3\CMS\Install\SystemEnvironment\Check\$messageQueue, TYPO3\CMS\Install\SystemEnvironment\Check\checkCurrentDirectoryIsInIncludePath(), TYPO3\CMS\Install\SystemEnvironment\Check\checkDisableFunctions(), TYPO3\CMS\Install\SystemEnvironment\Check\checkDocRoot(), 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\checkMaxExecutionTime(), TYPO3\CMS\Install\SystemEnvironment\Check\checkMaxInputVars(), TYPO3\CMS\Install\SystemEnvironment\Check\checkMemorySettings(), TYPO3\CMS\Install\SystemEnvironment\Check\checkOpenBaseDir(), TYPO3\CMS\Install\SystemEnvironment\Check\checkPcreVersion(), TYPO3\CMS\Install\SystemEnvironment\Check\checkPhpExtension(), TYPO3\CMS\Install\SystemEnvironment\Check\checkPhpVersion(), TYPO3\CMS\Install\SystemEnvironment\Check\checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize(), TYPO3\CMS\Install\SystemEnvironment\Check\checkReflectionDocComment(), TYPO3\CMS\Install\SystemEnvironment\Check\checkWindowsApacheThreadStackSize(), and TYPO3\CMS\Install\SystemEnvironment\Check\checkXdebugMaxNestingLevel().

◆ isValidIp()

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

Helper methods Validate a given IP address.

Parameters
string$ip‪IP address to be tested
Returns
‪bool

Definition at line 788 of file Check.php.

◆ isWindowsOs()

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

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

◆ trimExplode()

array 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$delimiter‪Delimiter string to explode with
string$string‪The string to explode
Returns
‪array Exploded values

Definition at line 815 of file Check.php.

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

Member Data Documentation

◆ $messageQueue

FlashMessageQueue TYPO3\CMS\Install\SystemEnvironment\Check::$messageQueue
protected

◆ $requiredPhpExtensions

array TYPO3\CMS\Install\SystemEnvironment\Check::$requiredPhpExtensions
protected
Initial value:
= array(
'filter',
'gd',
'hash',
'json',
'libxml',
'PDO',
'session',
'SPL',
'standard',
'xml',
'zip',
'zlib',
)

List of required PHP extensions

Definition at line 62 of file Check.php.

◆ $suggestedPhpExtensions

string [] TYPO3\CMS\Install\SystemEnvironment\Check::$suggestedPhpExtensions
protected
Initial value:
= array(
'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, and for extensions such as "rsaauth".'
)

Definition at line 79 of file Check.php.