78 'fileinfo' =>
'This extension is used for proper file type detection in the File Abstraction Layer.',
79 'intl' =>
'This extension is used for correct language and locale handling.',
80 'openssl' =>
'This extension is used for sending SMTP mails over an encrypted channel endpoint, and for extensions such as "rsaauth".'
107 foreach ($this->requiredPhpExtensions as $extension) {
111 foreach ($this->suggestedPhpExtensions as $extension => $purpose) {
130 $includePath = ini_get(
'include_path');
132 $pathArray = $this->
trimExplode($delimiter, $includePath);
133 if (!in_array(
'.', $pathArray)) {
135 'include_path = ' . implode(
' ', $pathArray) . LF
136 .
'Normally the current path \'.\' is included in the'
137 .
' include_path of PHP. Although TYPO3 does not rely on this,'
138 .
' it is an unusual setting that may introduce problems for'
139 .
' some extensions.',
140 'Current directory (./) is not within PHP include path',
146 'Current directory (./) is within PHP include path.'
156 if (!ini_get(
'file_uploads')) {
158 'file_uploads=' . ini_get(
'file_uploads') . LF
159 .
'TYPO3 uses the ability to upload files from the browser in various cases.'
160 .
' If this flag is disabled in PHP, you won\'t be able to upload files.'
161 .
' But it doesn\'t end here, because not only are files not accepted by'
162 .
' the server - ALL content in the forms are discarded and therefore'
163 .
' nothing at all will be editable if you don\'t set this flag!',
164 'File uploads not allowed in PHP',
170 'File uploads allowed in PHP'
182 if ($maximumPostSize > 0 && $maximumPostSize < $maximumUploadFilesize) {
184 'upload_max_filesize=' . ini_get(
'upload_max_filesize') . LF
185 .
'post_max_size=' . ini_get(
'post_max_size') . LF
186 .
'You have defined a maximum size for file uploads in PHP which'
187 .
' exceeds the allowed size for POST requests. Therefore the'
188 .
' file uploads can also not be larger than ' . ini_get(
'post_max_size') .
'.',
189 'Maximum size for POST requests is smaller than maximum upload filesize in PHP',
192 } elseif ($maximumPostSize === $maximumUploadFilesize) {
194 'The maximum size for file uploads is set to ' . ini_get(
'upload_max_filesize'),
195 'Maximum post upload size correlates with maximum upload file size in PHP'
199 'The maximum size for file uploads is set to ' . ini_get(
'upload_max_filesize'),
200 'Maximum post upload size is higher than maximum upload file size in PHP, which is fine.'
210 $minimumMemoryLimit = 64;
211 $recommendedMemoryLimit = 128;
213 if ($memoryLimit <= 0) {
215 'PHP is configured not to limit memory usage at all. This is a risk'
216 .
' and should be avoided in production setup. In general it\'s best practice to limit this.'
217 .
' To be safe, set a limit in PHP, but with a minimum of ' . $recommendedMemoryLimit .
'MB:' . LF
218 .
'memory_limit=' . $recommendedMemoryLimit .
'M',
219 'Unlimited memory limit for PHP',
222 } elseif ($memoryLimit < 1024 * 1024 * $minimumMemoryLimit) {
224 'memory_limit=' . ini_get(
'memory_limit') . LF
225 .
'Your system is configured to enforce a memory limit for PHP scripts lower than '
226 . $minimumMemoryLimit .
'MB. It is required to raise the limit.'
227 .
' We recommend a minimum PHP memory limit of ' . $recommendedMemoryLimit .
'MB:' . LF
228 .
'memory_limit=' . $recommendedMemoryLimit .
'M',
229 'PHP Memory limit below ' . $minimumMemoryLimit .
'MB',
232 } elseif ($memoryLimit < 1024 * 1024 * $recommendedMemoryLimit) {
234 'memory_limit=' . ini_get(
'memory_limit') . LF
235 .
'Your system is configured to enforce a memory limit for PHP scripts lower than '
236 . $recommendedMemoryLimit .
'MB.'
237 .
' A slim TYPO3 instance without many extensions will probably work, but you should monitor your'
238 .
' system for "allowed memory size of X bytes exhausted" messages, especially if using the backend.'
239 .
' To be on the safe side,' .
' we recommend a minimum PHP memory limit of '
240 . $recommendedMemoryLimit .
'MB:' . LF
241 .
'memory_limit=' . $recommendedMemoryLimit .
'M',
242 'PHP Memory limit below ' . $recommendedMemoryLimit .
'MB',
248 'PHP Memory limit is equal to or more than ' . $recommendedMemoryLimit .
'MB'
258 $minimumPhpVersion =
'7.2.0';
259 $currentPhpVersion = PHP_VERSION;
260 if (version_compare($currentPhpVersion, $minimumPhpVersion) < 0) {
262 'Your PHP version ' . $currentPhpVersion .
' is too old. TYPO3 CMS does not run'
263 .
' with this version. Update to at least PHP ' . $minimumPhpVersion,
264 'PHP version too low',
270 'PHP version is fine'
280 $minimumPcreVersion =
'8.38';
281 if (!extension_loaded(
'pcre')) {
283 'TYPO3 CMS uses PHP extension pcre but it is not loaded'
284 .
' in your environment. Change your environment to provide this extension'
285 .
' in with minimum version ' . $minimumPcreVersion .
'.',
286 'PHP extension pcre not loaded',
290 $installedPcreVersionString = trim(PCRE_VERSION);
291 $mainPcreVersionString = explode(
' ', $installedPcreVersionString);
292 $mainPcreVersionString = $mainPcreVersionString[0];
293 if (version_compare($mainPcreVersionString, $minimumPcreVersion) < 0) {
295 'Your PCRE version ' . PCRE_VERSION .
' is too old. TYPO3 CMS may trigger PHP segmentantion'
296 .
' faults with this version. Update to at least PCRE ' . $minimumPcreVersion,
297 'PCRE version too low',
303 'PHP extension PCRE is loaded and version is fine'
314 $minimumMaximumExecutionTime = 30;
315 $recommendedMaximumExecutionTime = 240;
316 $currentMaximumExecutionTime = ini_get(
'max_execution_time');
317 if ($currentMaximumExecutionTime == 0) {
319 'max_execution_time=0' . LF
320 .
'While TYPO3 is fine with this, you risk a denial-of-service for your system if for whatever'
321 .
' reason some script hangs in an infinite loop. You are usually on the safe side '
322 .
' if it is reduced to ' . $recommendedMaximumExecutionTime .
' seconds:' . LF
323 .
'max_execution_time=' . $recommendedMaximumExecutionTime,
324 'Infinite PHP script execution time',
327 } elseif ($currentMaximumExecutionTime < $minimumMaximumExecutionTime) {
329 'max_execution_time=' . $currentMaximumExecutionTime . LF
330 .
'Your max_execution_time is too low. Some expensive operations in TYPO3 can take longer than that.'
331 .
' It is recommended to raise the limit to ' . $recommendedMaximumExecutionTime .
' seconds:' . LF
332 .
'max_execution_time=' . $recommendedMaximumExecutionTime,
333 'Low PHP script execution time',
336 } elseif ($currentMaximumExecutionTime < $recommendedMaximumExecutionTime) {
338 'max_execution_time=' . $currentMaximumExecutionTime . LF
339 .
'Your max_execution_time is low. While TYPO3 often runs without problems'
340 .
' with ' . $minimumMaximumExecutionTime .
' seconds,'
341 .
' it may still happen that script execution is stopped before finishing'
342 .
' calculations. You should monitor the system for messages in this area'
343 .
' and maybe raise the limit to ' . $recommendedMaximumExecutionTime .
' seconds:' . LF
344 .
'max_execution_time=' . $recommendedMaximumExecutionTime,
345 'Low PHP script execution time',
351 'Maximum PHP script execution time is equal to or more than ' . $recommendedMaximumExecutionTime
361 $disabledFunctions = trim(ini_get(
'disable_functions'));
364 $disabledFunctionsArray = $this->
trimExplode(
',', $disabledFunctions);
371 foreach ($disabledFunctionsArray as $key => $disabledFunction) {
372 foreach ($findStrings as $findString) {
373 if (strpos($disabledFunction, $findString) !==
false) {
374 unset($disabledFunctionsArray[$key]);
379 if ($disabledFunctions !==
'') {
380 if (!empty($disabledFunctionsArray)) {
382 'disable_functions=' . implode(
' ', explode(
',', $disabledFunctions)) . LF
383 .
'These function(s) are disabled. TYPO3 uses some of those, so there might be trouble.'
384 .
' TYPO3 is designed to use the default set of PHP functions plus some common extensions.'
385 .
' Possibly these functions are disabled'
386 .
' due to security considerations and most likely the list would include a function like'
387 .
' exec() which is used by TYPO3 at various places. Depending on which exact functions'
388 .
' are disabled, some parts of the system may just break without further notice.',
389 'Some PHP functions disabled',
394 'disable_functions=' . implode(
' ', explode(
',', $disabledFunctions)) . LF
395 .
'These function(s) are disabled. TYPO3 uses currently none of those, so you are good to go.',
396 'Some PHP functions currently disabled but OK'
402 'No disabled PHP functions'
412 $currentMysqliReconnectSetting = ini_get(
'mysqli.reconnect');
413 if ($currentMysqliReconnectSetting ===
'1') {
415 'mysqli.reconnect=1' . LF
416 .
'PHP is configured to automatically reconnect the database connection on disconnection.' . LF
417 .
' Warning: If (e.g. during a long-running task) the connection is dropped and automatically reconnected, '
418 .
' it may not be reinitialized properly (e.g. charset) and write mangled data to the database!',
419 'PHP mysqli.reconnect is enabled',
425 'PHP mysqli.reconnect is fine'
435 $docRootSetting = trim(ini_get(
'doc_root'));
436 if ($docRootSetting !==
'') {
438 'doc_root=' . $docRootSetting . LF
439 .
'PHP cannot execute scripts'
440 .
' outside this directory. This setting is seldom used and must correlate'
441 .
' with your actual document root. You might be in trouble if your'
442 .
' TYPO3 CMS core code is linked to some different location.'
443 .
' If that is a problem, the setting must be changed.',
450 'PHP doc_root is not set'
460 $openBaseDirSetting = trim(ini_get(
'open_basedir'));
461 if ($openBaseDirSetting !==
'') {
463 'open_basedir = ' . ini_get(
'open_basedir') . LF
464 .
'This restricts TYPO3 to open and include files only in this'
465 .
' path. Please make sure that this does not prevent TYPO3 from running,'
466 .
' if for example your TYPO3 CMS core is linked to a different directory'
467 .
' not included in this path.',
468 'PHP open_basedir is set',
474 'PHP open_basedir is off'
484 if (extension_loaded(
'xdebug')) {
485 $recommendedMaxNestingLevel = 400;
486 $errorThreshold = 250;
487 $currentMaxNestingLevel = ini_get(
'xdebug.max_nesting_level');
488 if ($currentMaxNestingLevel < $errorThreshold) {
490 'xdebug.max_nesting_level=' . $currentMaxNestingLevel . LF
491 .
'This setting controls the maximum number of nested function calls to protect against'
492 .
' infinite recursion. The current value is too low for TYPO3 CMS and must'
493 .
' be either raised or xdebug has to be unloaded. A value of ' . $recommendedMaxNestingLevel
494 .
' is recommended. Warning: Expect fatal PHP errors in central parts of the CMS'
495 .
' if the value is not raised significantly to:' . LF
496 .
'xdebug.max_nesting_level=' . $recommendedMaxNestingLevel,
497 'PHP xdebug.max_nesting_level is critically low',
500 } elseif ($currentMaxNestingLevel < $recommendedMaxNestingLevel) {
502 'xdebug.max_nesting_level=' . $currentMaxNestingLevel . LF
503 .
'This setting controls the maximum number of nested function calls to protect against'
504 .
' infinite recursion. The current value is high enough for the TYPO3 CMS core to work'
505 .
' fine, but still some extensions could raise fatal PHP errors if the setting is not'
506 .
' raised further. A value of ' . $recommendedMaxNestingLevel .
' is recommended.' . LF
507 .
'xdebug.max_nesting_level=' . $recommendedMaxNestingLevel,
508 'PHP xdebug.max_nesting_level is low',
514 'PHP xdebug.max_nesting_level ok'
520 'PHP xdebug extension not loaded'
530 $recommendedMaxInputVars = 1500;
531 $minimumMaxInputVars = 1000;
532 $currentMaxInputVars = ini_get(
'max_input_vars');
534 if ($currentMaxInputVars < $minimumMaxInputVars) {
536 'max_input_vars=' . $currentMaxInputVars . LF
537 .
'This setting can lead to lost information if submitting forms with lots of data in TYPO3 CMS'
538 .
' (as the install tool does). It is highly recommended to raise this'
539 .
' to at least ' . $recommendedMaxInputVars .
':' . LF
540 .
'max_input_vars=' . $recommendedMaxInputVars,
541 'PHP max_input_vars too low',
544 } elseif ($currentMaxInputVars < $recommendedMaxInputVars) {
546 'max_input_vars=' . $currentMaxInputVars . LF
547 .
'This setting can lead to lost information if submitting forms with lots of data in TYPO3 CMS'
548 .
' (as the install tool does). It is highly recommended to raise this'
549 .
' to at least ' . $recommendedMaxInputVars .
':' . LF
550 .
'max_input_vars=' . $recommendedMaxInputVars,
551 'PHP max_input_vars very low',
557 'PHP max_input_vars ok'
567 $testReflection = new \ReflectionMethod(static::class, __FUNCTION__);
568 if ($testReflection->getDocComment() ===
false) {
570 'TYPO3 CMS core extensions like extbase and fluid heavily rely on method'
571 .
' comment parsing to fetch annotations and add magic belonging to them.'
572 .
' This does not work in the current environment and so we cannot install'
574 .
' Here are some possibilities: ' . LF
575 .
'* In Zend OPcache you can disable saving/loading comments. If you are using'
576 .
' Zend OPcache (included since PHP 5.5) then check your php.ini settings for'
577 .
' opcache.save_comments and opcache.load_comments and enable them.' . LF
578 .
'* In Zend Optimizer+ you can disable saving comments. If you are using'
579 .
' Zend Optimizer+ then check your php.ini settings for'
580 .
' zend_optimizerplus.save_comments and enable it.' . LF
581 .
'* The PHP extension eaccelerator is known to break this if'
582 .
' it is compiled without --with-eaccelerator-doc-comment-inclusion flag.'
583 .
' This compile flag must be specified, otherwise TYPO3 CMS will not work.' . LF
584 .
'For more information take a look in our documentation ' . TYPO3_URL_WIKI_OPCODECACHE .
'.',
585 'PHP Doc comment reflection broken',
591 'PHP Doc comment reflection works'
602 && strpos($_SERVER[
'SERVER_SOFTWARE'],
'Apache') === 0
605 'This current value cannot be checked by the system, so please ignore this warning if it'
606 .
' is already taken care of: Fluid uses complex regular expressions which require a lot'
607 .
' of stack space during the first processing.'
608 .
' On Windows the default stack size for Apache is a lot smaller than on UNIX.'
609 .
' You can increase the size to 8MB (default on UNIX) by adding the following configuration'
610 .
' to httpd.conf and restarting Apache afterwards:' . LF
611 .
'<IfModule mpm_winnt_module>ThreadStackSize 8388608</IfModule>',
612 'Windows apache thread stack size',
618 'Apache ThreadStackSize is not an issue on UNIX systems'
630 protected function checkPhpExtension(
string $extension,
bool $required =
true,
string $purpose =
'')
632 if (!extension_loaded($extension)) {
634 'TYPO3 uses the PHP extension "' . $extension .
'" but it is not loaded'
635 .
' in your environment. Change your environment to provide this extension. '
637 'PHP extension "' . $extension .
'" not loaded',
643 'PHP extension "' . $extension .
'" loaded'
653 if (function_exists(
'imagecreatetruecolor')) {
654 $imageResource = @imagecreatetruecolor(50, 100);
655 if (is_resource($imageResource)) {
656 imagedestroy($imageResource);
659 'PHP GD library true color works'
663 'GD is loaded, but calling imagecreatetruecolor() fails.'
664 .
' This must be fixed, TYPO3 CMS won\'t work well otherwise.',
665 'PHP GD library true color support broken',
671 'Gdlib is essential for TYPO3 CMS to work properly.',
672 'PHP GD library true color support missing',
683 if (function_exists(
'imagecreatefromgif')
684 && function_exists(
'imagegif')
685 && (imagetypes() & IMG_GIF)
688 $imageResource = @imagecreatefromgif(__DIR__ .
'/../../Resources/Public/Images/TestInput/Test.gif');
689 if (is_resource($imageResource)) {
690 imagedestroy($imageResource);
693 'PHP GD library has gif support'
697 'GD is loaded, but calling imagecreatefromgif() fails. This must be fixed, TYPO3 CMS won\'t work well otherwise.',
698 'PHP GD library gif support broken',
704 'GD must be compiled with gif support. This is essential for TYPO3 CMS to work properly.',
705 'PHP GD library gif support missing',
716 if (function_exists(
'imagecreatefromjpeg')
717 && function_exists(
'imagejpeg')
718 && (imagetypes() & IMG_JPG)
722 'PHP GD library has jpg support'
726 'GD must be compiled with jpg support. This is essential for TYPO3 CMS to work properly.',
727 'PHP GD library jpg support missing',
738 if (function_exists(
'imagecreatefrompng')
739 && function_exists(
'imagepng')
740 && (imagetypes() & IMG_PNG)
743 $imageResource = @imagecreatefrompng(__DIR__ .
'/../../Resources/Public/Images/TestInput/Test.png');
744 if (is_resource($imageResource)) {
745 imagedestroy($imageResource);
748 'PHP GD library has png support'
752 'GD is compiled with png support, but calling imagecreatefrompng() fails.'
753 .
' Check your environment and fix it, png in GD lib is important'
754 .
' for TYPO3 CMS to work properly.',
755 'PHP GD library png support broken',
761 'GD must be compiled with png support. This is essential for TYPO3 CMS to work properly',
762 'PHP GD library png support missing',
773 if (function_exists(
'imagettftext')) {
775 'There is a difference between the font size setting which the GD'
776 .
' library should be supplied with. If installation is completed'
777 .
' a test in the install tool helps to find out the value you need.',
778 'PHP GD library has freetype font support'
782 'Some core functionality and extension rely on the GD'
783 .
' to render fonts on images. This support is missing'
784 .
' in your environment. Install it.',
785 'PHP GD library freetype support missing',
803 return filter_var($ip, FILTER_VALIDATE_IP) !==
false;
814 if (!stristr(PHP_OS,
'darwin') && stristr(PHP_OS,
'win')) {
830 $explodedValues = explode($delimiter, $string);
831 $resultWithPossibleEmptyValues = array_map(
'trim', $explodedValues);
833 foreach ($resultWithPossibleEmptyValues as $value) {
849 $bytes = (float)$measurement;
850 if (stripos($measurement,
'G')) {
851 $bytes *= 1024 * 1024 * 1024;
852 } elseif (stripos($measurement,
'M')) {
853 $bytes *= 1024 * 1024;
854 } elseif (stripos($measurement,
'K')) {