‪TYPO3CMS  ‪main
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 ()
 
 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 ()
 
int getBytesFromSizeMeasurement ($measurement)
 

Protected Attributes

FlashMessageQueue $messageQueue
 
array $requiredPhpExtensions
 
string[] $suggestedPhpExtensions
 

Private Member Functions

 checkImageResource ($imageResource)
 

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.

This class is instantiated as a very early during installation.

Be picky with dependencies here:

  • ‪No hooks or anything like that
  • ‪No localization
  • ‪Only low level ext:core classes if free of side effects

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

Definition at line 44 of file Check.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 77 of file Check.php.

Member Function Documentation

◆ checkCurrentDirectoryIsInIncludePath()

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

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

Definition at line 128 of file Check.php.

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

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

◆ checkDisableFunctions()

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

Check for disabled functions

Definition at line 359 of file Check.php.

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

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

◆ checkDocRoot()

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

Check for doc_root ini setting

Definition at line 410 of file Check.php.

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

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

◆ checkGdLibFreeTypeSupport()

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

Check gdlib supports freetype

Definition at line 744 of file Check.php.

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

◆ checkGdLibGifSupport()

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

◆ checkGdLibJpgSupport()

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

Check jpg support of GD library

Definition at line 687 of file Check.php.

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

◆ checkGdLibPngSupport()

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

◆ checkGdLibTrueColorSupport()

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

Check imagecreatetruecolor to verify gdlib works as expected

Definition at line 624 of file Check.php.

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

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

◆ checkImageResource()

TYPO3\CMS\Install\SystemEnvironment\Check::checkImageResource (   $imageResource)
private

◆ checkMaxExecutionTime()

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

Check maximum execution time

Definition at line 312 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

Definition at line 505 of file Check.php.

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

◆ checkMemorySettings()

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

◆ checkOpenBaseDir()

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

Check open_basedir

Definition at line 435 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

Definition at line 278 of file Check.php.

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.

Definition at line 603 of file Check.php.

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

◆ checkPhpVersion()

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

Check minimum PHP version

Definition at line 256 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

Definition at line 178 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

Definition at line 542 of file Check.php.

References TYPO3\CMS\Core\Information\Typo3Information\URL_OPCACHE.

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

Definition at line 576 of file Check.php.

References $_SERVER, and 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

Definition at line 459 of file Check.php.

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

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

◆ getStatus()

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

Get all status information as array with status objects

Implements TYPO3\CMS\Install\SystemEnvironment\CheckInterface.

Definition at line 90 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 774 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 784 of file Check.php.

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

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',
'intl',
'json',
'libxml',
'mbstring',
'PDO',
'session',
'SPL',
'standard',
'tokenizer',
'xml',
'zip',
'zlib',
)

List of required PHP extensions

Definition at line 52 of file Check.php.

◆ $suggestedPhpExtensions

string [] TYPO3\CMS\Install\SystemEnvironment\Check::$suggestedPhpExtensions
protected
Initial value:
= array(
'exif' => 'This extension is used to detect the orientation of uploaded images.',
'fileinfo' => 'This extension is used for proper file type detection in the File Abstraction Layer.',
'openssl' => 'This extension is used for sending SMTP mails over an encrypted channel endpoint.',
)

Definition at line 71 of file Check.php.