‪TYPO3CMS  ‪main
EnvironmentController.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
20 use Psr\Http\Message\ResponseInterface;
21 use Psr\Http\Message\ServerRequestInterface;
22 use Symfony\Component\Mime\Address;
23 use Symfony\Component\Mime\Exception\RfcComplianceException;
47 
53 {
54  private const ‪IMAGE_FILE_EXT = ['gif', 'jpg', 'png', 'tif', 'ai', 'pdf', 'webp'];
55  private const ‪TEST_REFERENCE_PATH = __DIR__ . '/../../Resources/Public/Images/TestReference';
56 
57  public function ‪__construct(
58  private readonly ‪LateBootService $lateBootService,
59  private readonly ‪FormProtectionFactory $formProtectionFactory,
60  private readonly ‪MailerInterface $mailer,
61  ) {
62  }
63 
67  public function ‪cardsAction(ServerRequestInterface $request): ResponseInterface
68  {
69  $view = $this->‪initializeView($request);
70  return new ‪JsonResponse([
71  'success' => true,
72  'html' => $view->render('Environment/Cards'),
73  ]);
74  }
75 
79  public function ‪systemInformationGetDataAction(ServerRequestInterface $request): ResponseInterface
80  {
81  $view = $this->‪initializeView($request);
82  $view->assignMultiple([
83  'systemInformationCgiDetected' => ‪Environment::isRunningOnCgiServer(),
84  'systemInformationDatabaseConnections' => $this->‪getDatabaseConnectionInformation(),
85  'systemInformationOperatingSystem' => ‪Environment::isWindows() ? 'Windows' : 'Unix',
86  'systemInformationApplicationContext' => $this->‪getApplicationContextInformation(),
87  'phpVersion' => PHP_VERSION,
88  ]);
89  return new ‪JsonResponse([
90  'success' => true,
91  'html' => $view->render('Environment/SystemInformation'),
92  ]);
93  }
94 
98  public function ‪phpInfoGetDataAction(ServerRequestInterface $request): ResponseInterface
99  {
100  $view = $this->‪initializeView($request);
101  return new ‪JsonResponse([
102  'success' => true,
103  'html' => $view->render('Environment/PhpInfo'),
104  ]);
105  }
106 
110  public function ‪environmentCheckGetStatusAction(ServerRequestInterface $request): ResponseInterface
111  {
112  $view = $this->‪initializeView($request);
113  $messageQueue = new ‪FlashMessageQueue('install');
114  $checkMessages = (new ‪Check())->getStatus();
115  foreach ($checkMessages as $message) {
116  $messageQueue->enqueue($message);
117  }
118  $setupMessages = (new ‪SetupCheck())->getStatus();
119  foreach ($setupMessages as $message) {
120  $messageQueue->enqueue($message);
121  }
122  $databaseMessages = (new ‪DatabaseCheck())->getStatus();
123  foreach ($databaseMessages as $message) {
124  $messageQueue->enqueue($message);
125  }
126  $serverResponseMessages = (new ‪ServerResponseCheck(false))->getStatus();
127  foreach ($serverResponseMessages as $message) {
128  $messageQueue->enqueue($message);
129  }
130  return new ‪JsonResponse([
131  'success' => true,
132  'status' => [
133  'error' => $messageQueue->getAllMessages(ContextualFeedbackSeverity::ERROR),
134  'warning' => $messageQueue->getAllMessages(ContextualFeedbackSeverity::WARNING),
135  'ok' => $messageQueue->getAllMessages(ContextualFeedbackSeverity::OK),
136  'information' => $messageQueue->getAllMessages(ContextualFeedbackSeverity::INFO),
137  'notice' => $messageQueue->getAllMessages(ContextualFeedbackSeverity::NOTICE),
138  ],
139  'html' => $view->render('Environment/EnvironmentCheck'),
140  'buttons' => [
141  [
142  'btnClass' => 'btn-default t3js-environmentCheck-execute',
143  'text' => 'Run tests again',
144  ],
145  ],
146  ]);
147  }
148 
152  public function ‪folderStructureGetStatusAction(ServerRequestInterface $request): ResponseInterface
153  {
154  $view = $this->‪initializeView($request);
155  $folderStructureFactory = GeneralUtility::makeInstance(DefaultFactory::class);
156  $structureFacade = $folderStructureFactory->getStructure();
157 
158  $structureMessages = $structureFacade->getStatus();
159  $errorQueue = new ‪FlashMessageQueue('install');
160  $okQueue = new ‪FlashMessageQueue('install');
161  foreach ($structureMessages as $message) {
162  if ($message->getSeverity() === ContextualFeedbackSeverity::ERROR
163  || $message->getSeverity() === ContextualFeedbackSeverity::WARNING
164  ) {
165  $errorQueue->enqueue($message);
166  } else {
167  $okQueue->enqueue($message);
168  }
169  }
170 
171  $permissionCheck = GeneralUtility::makeInstance(DefaultPermissionsCheck::class);
172 
173  $view->assign('publicPath', ‪Environment::getPublicPath());
174 
175  $buttons = [];
176  if ($errorQueue->count() > 0) {
177  $buttons[] = [
178  'btnClass' => 'btn-default t3js-folderStructure-errors-fix',
179  'text' => 'Try to fix file and folder permissions',
180  ];
181  }
182 
183  return new ‪JsonResponse([
184  'success' => true,
185  'errorStatus' => $errorQueue,
186  'okStatus' => $okQueue,
187  'folderStructureFilePermissionStatus' => $permissionCheck->getMaskStatus('fileCreateMask'),
188  'folderStructureDirectoryPermissionStatus' => $permissionCheck->getMaskStatus('folderCreateMask'),
189  'html' => $view->render('Environment/FolderStructure'),
190  'buttons' => $buttons,
191  ]);
192  }
193 
197  public function ‪folderStructureFixAction(): ResponseInterface
198  {
199  $folderStructureFactory = GeneralUtility::makeInstance(DefaultFactory::class);
200  $structureFacade = $folderStructureFactory->getStructure();
201  $fixedStatusObjects = $structureFacade->fix();
202  return new ‪JsonResponse([
203  'success' => true,
204  'fixedStatus' => $fixedStatusObjects,
205  ]);
206  }
207 
211  public function ‪mailTestGetDataAction(ServerRequestInterface $request): ResponseInterface
212  {
213  $view = $this->‪initializeView($request);
214  $formProtection = $this->formProtectionFactory->createFromRequest($request);
215  $view->assignMultiple([
216  'mailTestToken' => $formProtection->generateToken('installTool', 'mailTest'),
217  'mailTestSenderAddress' => $this->getSenderEmailAddress(),
218  ]);
219  return new ‪JsonResponse([
220  'success' => true,
221  'html' => $view->render('Environment/MailTest'),
222  'buttons' => [
223  [
224  'btnClass' => 'btn-default t3js-mailTest-execute',
225  'text' => 'Send test mail',
226  ],
227  ],
228  ]);
229  }
230 
234  public function ‪mailTestAction(ServerRequestInterface $request): ResponseInterface
235  {
236  $container = $this->lateBootService->getContainer();
237  $backup = $this->lateBootService->makeCurrent($container);
238  $messages = new ‪FlashMessageQueue('install');
239  $recipient = $request->getParsedBody()['install']['email'];
240  if (empty($recipient) || !GeneralUtility::validEmail($recipient)) {
241  $messages->enqueue(new ‪FlashMessage(
242  'Given address is not a valid email address.',
243  'Mail not sent',
244  ContextualFeedbackSeverity::ERROR
245  ));
246  } else {
247  try {
248  $variables = [
249  'headline' => 'TYPO3 Test Mail',
250  'introduction' => 'Hey TYPO3 Administrator',
251  'content' => 'Seems like your favorite TYPO3 installation can send out emails!',
252  ];
253  $mailMessage = GeneralUtility::makeInstance(FluidEmail::class);
254  $mailMessage
255  ->to($recipient)
256  ->from(new Address($this->‪getSenderEmailAddress(), $this->‪getSenderEmailName()))
257  ->subject($this->‪getEmailSubject())
258  ->setRequest($request)
259  ->assignMultiple($variables);
260 
261  $this->mailer->send($mailMessage);
262  $messages->enqueue(new ‪FlashMessage(
263  'Recipient: ' . $recipient,
264  'Test mail sent'
265  ));
266  } catch (RfcComplianceException $exception) {
267  $messages->enqueue(new ‪FlashMessage(
268  'Please verify $GLOBALS[\'TYPO3_CONF_VARS\'][\'MAIL\'][\'defaultMailFromAddress\'] is a valid mail address.'
269  . ' Error message: ' . $exception->getMessage(),
270  'RFC compliance problem',
271  ContextualFeedbackSeverity::ERROR
272  ));
273  } catch (\Throwable $throwable) {
274  $messages->enqueue(new ‪FlashMessage(
275  'Please verify $GLOBALS[\'TYPO3_CONF_VARS\'][\'MAIL\'][*] settings are valid.'
276  . ' Error message: ' . $throwable->getMessage(),
277  'Could not deliver mail',
278  ContextualFeedbackSeverity::ERROR
279  ));
280  }
281  }
282  $this->lateBootService->makeCurrent(null, $backup);
283  return new ‪JsonResponse([
284  'success' => true,
285  'status' => $messages,
286  ]);
287  }
288 
292  public function ‪imageProcessingGetDataAction(ServerRequestInterface $request): ResponseInterface
293  {
294  $view = $this->‪initializeView($request);
295  $view->assignMultiple([
296  'imageProcessingProcessor' => ‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['processor'] === 'GraphicsMagick' ? 'GraphicsMagick' : 'ImageMagick',
297  'imageProcessingEnabled' => ‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_enabled'],
298  'imageProcessingPath' => ‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_path'],
299  'imageProcessingVersion' => $this->‪determineImageMagickVersion(),
300  'imageProcessingEffects' => ‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_effects'],
301  'imageProcessingGdlibEnabled' => ‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib'],
302  'imageProcessingGdlibPng' => ‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png'],
303  'imageProcessingFileFormats' => ‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],
304  ]);
305  return new ‪JsonResponse([
306  'success' => true,
307  'html' => $view->render('Environment/ImageProcessing'),
308  'buttons' => [
309  [
310  'btnClass' => 'btn-default disabled t3js-imageProcessing-execute',
311  'text' => 'Run image tests again',
312  ],
313  ],
314  ]);
315  }
316 
320  public function ‪imageProcessingTrueTypeAction(): ResponseInterface
321  {
322  $image = @imagecreate(200, 50);
323  imagecolorallocate($image, 255, 255, 55);
324  $textColor = imagecolorallocate($image, 233, 14, 91);
325  @imagettftext(
326  $image,
327  20 / 96.0 * 72, // As in compensateFontSizeBasedOnFreetypeDpi
328  0,
329  10,
330  20,
331  $textColor,
332  ‪ExtensionManagementUtility::extPath('install') . 'Resources/Private/Font/vera.ttf',
333  'Testing true type'
334  );
335  $outputFile = ‪Environment::getPublicPath() . '/typo3temp/assets/images/installTool-' . ‪StringUtility::getUniqueId('createTrueTypeFontTestImage') . '.gif';
336  @imagegif($image, $outputFile);
337  $fileExists = file_exists($outputFile);
338  if ($fileExists) {
340  }
341  $result = [
342  'fileExists' => $fileExists,
343  'referenceFile' => self::TEST_REFERENCE_PATH . '/Font.gif',
344  ];
345  if ($fileExists) {
346  $result['outputFile'] = $outputFile;
347  }
348  return $this->‪getImageTestResponse($result);
349  }
350 
354  public function ‪imageProcessingReadJpgAction(): ResponseInterface
355  {
356  return $this->‪convertImageFormatsToJpg('jpg');
357  }
358 
362  public function ‪imageProcessingReadGifAction(): ResponseInterface
363  {
364  return $this->‪convertImageFormatsToJpg('gif');
365  }
366 
370  public function ‪imageProcessingReadPngAction(): ResponseInterface
371  {
372  return $this->‪convertImageFormatsToJpg('png');
373  }
374 
378  public function ‪imageProcessingReadTifAction(): ResponseInterface
379  {
380  return $this->‪convertImageFormatsToJpg('tif');
381  }
382 
386  public function ‪imageProcessingReadPdfAction(): ResponseInterface
387  {
388  return $this->‪convertImageFormatsToJpg('pdf');
389  }
390 
394  public function ‪imageProcessingReadAiAction(): ResponseInterface
395  {
396  return $this->‪convertImageFormatsToJpg('ai');
397  }
398 
402  public function ‪imageProcessingWriteGifAction(): ResponseInterface
403  {
404  if (!$this->‪isImageMagickEnabledAndConfigured()) {
405  return new ‪JsonResponse([
406  'status' => [$this->‪imageMagickDisabledMessage()],
407  ]);
408  }
409  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
410  $inputFile = $imageBasePath . 'TestInput/Test.gif';
411  $imageProcessor = $this->‪initializeImageProcessor();
412  $imageProcessor->imageMagickConvert_forceFileNameBody = ‪StringUtility::getUniqueId('write-gif');
413  $imResult = $imageProcessor->imageMagickConvert($inputFile, 'gif', '300', '', '', '', [], true);
414  $messages = new ‪FlashMessageQueue('install');
415  if ($imResult !== null && is_file($imResult[3])) {
416  if (‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['gif_compress']) {
417  clearstatcache();
418  $previousSize = GeneralUtility::formatSize((int)filesize($imResult[3]));
419  $methodUsed = ‪GraphicalFunctions::gifCompress($imResult[3], '');
420  clearstatcache();
421  $compressedSize = GeneralUtility::formatSize((int)filesize($imResult[3]));
422  $messages->enqueue(new ‪FlashMessage(
423  'Method used by compress: ' . $methodUsed . LF
424  . ' Previous filesize: ' . $previousSize . '. Current filesize:' . $compressedSize,
425  'Compressed gif',
426  ContextualFeedbackSeverity::INFO
427  ));
428  } else {
429  $messages->enqueue(new ‪FlashMessage(
430  '',
431  'Gif compression not enabled by [GFX][gif_compress]',
432  ContextualFeedbackSeverity::INFO
433  ));
434  }
435  $result = [
436  'status' => $messages,
437  'fileExists' => true,
438  'outputFile' => $imResult[3],
439  'referenceFile' => self::TEST_REFERENCE_PATH . '/Write-gif.gif',
440  'command' => $imageProcessor->IM_commands,
441  ];
442  } else {
443  $result = [
444  'status' => [$this->‪imageGenerationFailedMessage()],
445  'command' => $imageProcessor->IM_commands,
446  ];
447  }
448  return $this->‪getImageTestResponse($result);
449  }
450 
454  public function ‪imageProcessingWritePngAction(): ResponseInterface
455  {
456  if (!$this->‪isImageMagickEnabledAndConfigured()) {
457  return new ‪JsonResponse([
458  'status' => [$this->‪imageMagickDisabledMessage()],
459  ]);
460  }
461  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
462  $inputFile = $imageBasePath . 'TestInput/Test.png';
463  $imageProcessor = $this->‪initializeImageProcessor();
464  $imageProcessor->imageMagickConvert_forceFileNameBody = ‪StringUtility::getUniqueId('write-png');
465  $imResult = $imageProcessor->imageMagickConvert($inputFile, 'png', '300', '', '', '', [], true);
466  if ($imResult !== null && is_file($imResult[3])) {
467  $result = [
468  'fileExists' => true,
469  'outputFile' => $imResult[3],
470  'referenceFile' => self::TEST_REFERENCE_PATH . '/Write-png.png',
471  'command' => $imageProcessor->IM_commands,
472  ];
473  } else {
474  $result = [
475  'status' => [$this->‪imageGenerationFailedMessage()],
476  'command' => $imageProcessor->IM_commands,
477  ];
478  }
479  return $this->‪getImageTestResponse($result);
480  }
484  public function ‪imageProcessingWriteWebpAction(): ResponseInterface
485  {
486  if (!$this->‪isImageMagickEnabledAndConfigured()) {
487  return new ‪JsonResponse([
488  'status' => [$this->‪imageMagickDisabledMessage()],
489  ]);
490  }
491  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
492  $inputFile = $imageBasePath . 'TestInput/Test.webp';
493  $imageProcessor = $this->‪initializeImageProcessor();
494  $imageProcessor->imageMagickConvert_forceFileNameBody = ‪StringUtility::getUniqueId('write-webp');
495  $imResult = $imageProcessor->imageMagickConvert($inputFile, 'webp', '300', '', '', '', [], true);
496  if ($imResult !== null && is_file($imResult[3])) {
497  $result = [
498  'fileExists' => true,
499  'outputFile' => $imResult[3],
500  'referenceFile' => self::TEST_REFERENCE_PATH . '/Write-webp.webp',
501  'command' => $imageProcessor->IM_commands,
502  ];
503  } else {
504  $result = [
505  'status' => [$this->‪imageGenerationFailedMessage()],
506  'command' => $imageProcessor->IM_commands,
507  ];
508  }
509  return $this->‪getImageTestResponse($result);
510  }
511 
515  public function ‪imageProcessingGifToGifAction(): ResponseInterface
516  {
517  if (!$this->‪isImageMagickEnabledAndConfigured()) {
518  return new ‪JsonResponse([
519  'status' => [$this->‪imageMagickDisabledMessage()],
520  ]);
521  }
522  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
523  $imageProcessor = $this->‪initializeImageProcessor();
524  $inputFile = $imageBasePath . 'TestInput/Transparent.gif';
525  $imageProcessor->imageMagickConvert_forceFileNameBody = ‪StringUtility::getUniqueId('scale-gif');
526  $imResult = $imageProcessor->imageMagickConvert($inputFile, 'gif', '300', '', '', '', [], true);
527  if ($imResult !== null && file_exists($imResult[3])) {
528  $result = [
529  'fileExists' => true,
530  'outputFile' => $imResult[3],
531  'referenceFile' => self::TEST_REFERENCE_PATH . '/Scale-gif.gif',
532  'command' => $imageProcessor->IM_commands,
533  ];
534  } else {
535  $result = [
536  'status' => [$this->‪imageGenerationFailedMessage()],
537  'command' => $imageProcessor->IM_commands,
538  ];
539  }
540  return $this->‪getImageTestResponse($result);
541  }
542 
546  public function ‪imageProcessingPngToPngAction(): ResponseInterface
547  {
548  if (!$this->‪isImageMagickEnabledAndConfigured()) {
549  return new ‪JsonResponse([
550  'status' => [$this->‪imageMagickDisabledMessage()],
551  ]);
552  }
553  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
554  $imageProcessor = $this->‪initializeImageProcessor();
555  $inputFile = $imageBasePath . 'TestInput/Transparent.png';
556  $imageProcessor->imageMagickConvert_forceFileNameBody = ‪StringUtility::getUniqueId('scale-png');
557  $imResult = $imageProcessor->imageMagickConvert($inputFile, 'png', '300', '', '', '', [], true);
558  if ($imResult !== null && file_exists($imResult[3])) {
559  $result = [
560  'fileExists' => true,
561  'outputFile' => $imResult[3],
562  'referenceFile' => self::TEST_REFERENCE_PATH . '/Scale-png.png',
563  'command' => $imageProcessor->IM_commands,
564  ];
565  } else {
566  $result = [
567  'status' => [$this->‪imageGenerationFailedMessage()],
568  'command' => $imageProcessor->IM_commands,
569  ];
570  }
571  return $this->‪getImageTestResponse($result);
572  }
573 
577  public function ‪imageProcessingGifToJpgAction(): ResponseInterface
578  {
579  if (!$this->‪isImageMagickEnabledAndConfigured()) {
580  return new ‪JsonResponse([
581  'status' => [$this->‪imageMagickDisabledMessage()],
582  ]);
583  }
584  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
585  $imageProcessor = $this->‪initializeImageProcessor();
586  $inputFile = $imageBasePath . 'TestInput/Transparent.gif';
587  $imageProcessor->imageMagickConvert_forceFileNameBody = ‪StringUtility::getUniqueId('scale-jpg');
588  $jpegQuality = ‪MathUtility::forceIntegerInRange(‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['jpg_quality'], 10, 100, 85);
589  $imResult = $imageProcessor->imageMagickConvert($inputFile, 'jpg', '300', '', '-quality ' . $jpegQuality . ' -opaque white -background white -flatten', '', [], true);
590  if ($imResult !== null && file_exists($imResult[3])) {
591  $result = [
592  'fileExists' => true,
593  'outputFile' => $imResult[3],
594  'referenceFile' => self::TEST_REFERENCE_PATH . '/Scale-jpg.jpg',
595  'command' => $imageProcessor->IM_commands,
596  ];
597  } else {
598  $result = [
599  'status' => [$this->‪imageGenerationFailedMessage()],
600  'command' => $imageProcessor->IM_commands,
601  ];
602  }
603  return $this->‪getImageTestResponse($result);
604  }
605 
609  public function ‪imageProcessingJpgToWebpAction(): ResponseInterface
610  {
611  if (!$this->‪isImageMagickEnabledAndConfigured()) {
612  return new ‪JsonResponse([
613  'status' => [$this->‪imageMagickDisabledMessage()],
614  ]);
615  }
616  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
617  $imageProcessor = $this->‪initializeImageProcessor();
618  $inputFile = $imageBasePath . 'TestInput/Test.jpg';
619  $imageProcessor->imageMagickConvert_forceFileNameBody = ‪StringUtility::getUniqueId('read-webp');
620  $imResult = $imageProcessor->imageMagickConvert($inputFile, 'webp', '300', '', '', '', [], true);
621  if ($imResult !== null) {
622  $result = [
623  'fileExists' => file_exists($imResult[3]),
624  'outputFile' => $imResult[3],
625  'referenceFile' => self::TEST_REFERENCE_PATH . '/Convert-webp.webp',
626  'command' => $imageProcessor->IM_commands,
627  ];
628  } else {
629  $result = [
630  'status' => [$this->‪imageGenerationFailedMessage()],
631  'command' => $imageProcessor->IM_commands,
632  ];
633  }
634  return $this->‪getImageTestResponse($result);
635  }
636 
640  public function ‪imageProcessingCombineGifMaskAction(): ResponseInterface
641  {
642  if (!$this->‪isImageMagickEnabledAndConfigured()) {
643  return new ‪JsonResponse([
644  'status' => [$this->‪imageMagickDisabledMessage()],
645  ]);
646  }
647  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
648  $imageProcessor = $this->‪initializeImageProcessor();
649  $inputFile = $imageBasePath . 'TestInput/BackgroundOrange.gif';
650  $overlayFile = $imageBasePath . 'TestInput/Test.jpg';
651  $maskFile = $imageBasePath . 'TestInput/MaskBlackWhite.gif';
652  $resultFile = $this->‪getImagesPath() . $imageProcessor->filenamePrefix
653  . ‪StringUtility::getUniqueId($imageProcessor->alternativeOutputKey . 'combine1') . '.jpg';
654  $imageProcessor->combineExec($inputFile, $overlayFile, $maskFile, $resultFile);
655  $imResult = $imageProcessor->getImageDimensions($resultFile);
656  if ($imResult) {
657  $result = [
658  'fileExists' => true,
659  'outputFile' => $imResult[3],
660  'referenceFile' => self::TEST_REFERENCE_PATH . '/Combine-1.jpg',
661  'command' => $imageProcessor->IM_commands,
662  ];
663  } else {
664  $result = [
665  'status' => [$this->‪imageGenerationFailedMessage()],
666  'command' => $imageProcessor->IM_commands,
667  ];
668  }
669  return $this->‪getImageTestResponse($result);
670  }
671 
675  public function ‪imageProcessingCombineJpgMaskAction(): ResponseInterface
676  {
677  if (!$this->‪isImageMagickEnabledAndConfigured()) {
678  return new ‪JsonResponse([
679  'status' => [$this->‪imageMagickDisabledMessage()],
680  ]);
681  }
682  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
683  $imageProcessor = $this->‪initializeImageProcessor();
684  $inputFile = $imageBasePath . 'TestInput/BackgroundCombine.jpg';
685  $overlayFile = $imageBasePath . 'TestInput/Test.jpg';
686  $maskFile = $imageBasePath . 'TestInput/MaskCombine.jpg';
687  $resultFile = $this->‪getImagesPath() . $imageProcessor->filenamePrefix
688  . ‪StringUtility::getUniqueId($imageProcessor->alternativeOutputKey . 'combine2') . '.jpg';
689  $imageProcessor->combineExec($inputFile, $overlayFile, $maskFile, $resultFile);
690  $imResult = $imageProcessor->getImageDimensions($resultFile);
691  if ($imResult) {
692  $result = [
693  'fileExists' => true,
694  'outputFile' => $imResult[3],
695  'referenceFile' => self::TEST_REFERENCE_PATH . '/Combine-2.jpg',
696  'command' => $imageProcessor->IM_commands,
697  ];
698  } else {
699  $result = [
700  'status' => [$this->‪imageGenerationFailedMessage()],
701  'command' => $imageProcessor->IM_commands,
702  ];
703  }
704  return $this->‪getImageTestResponse($result);
705  }
706 
710  public function ‪imageProcessingGdlibSimpleAction(): ResponseInterface
711  {
712  $imageProcessor = $this->‪initializeImageProcessor();
713  $gifOrPng = $imageProcessor->gifExtension;
714  $image = imagecreatetruecolor(300, 225);
715  $backgroundColor = imagecolorallocate($image, 0, 0, 0);
716  imagefilledrectangle($image, 0, 0, 300, 225, $backgroundColor);
717  $workArea = [0, 0, 300, 225];
718  $conf = [
719  'dimensions' => '10,50,280,50',
720  'color' => 'olive',
721  ];
722  $imageProcessor->makeBox($image, $conf, $workArea);
723  $outputFile = $this->‪getImagesPath() . $imageProcessor->filenamePrefix . ‪StringUtility::getUniqueId('gdSimple') . '.' . $gifOrPng;
724  $imageProcessor->ImageWrite($image, $outputFile);
725  $imResult = $imageProcessor->getImageDimensions($outputFile);
726  $result = [
727  'fileExists' => true,
728  'outputFile' => $imResult[3],
729  'referenceFile' => self::TEST_REFERENCE_PATH . '/Gdlib-simple.' . $gifOrPng,
730  'command' => $imageProcessor->IM_commands,
731  ];
732  return $this->‪getImageTestResponse($result);
733  }
734 
738  public function ‪imageProcessingGdlibFromFileAction(): ResponseInterface
739  {
740  $imageProcessor = $this->‪initializeImageProcessor();
741  $gifOrPng = $imageProcessor->gifExtension;
742  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
743  $inputFile = $imageBasePath . 'TestInput/Test.' . $gifOrPng;
744  $image = $imageProcessor->imageCreateFromFile($inputFile);
745  $workArea = [0, 0, 400, 300];
746  $conf = [
747  'dimensions' => '10,50,380,50',
748  'color' => 'olive',
749  ];
750  $imageProcessor->makeBox($image, $conf, $workArea);
751  $outputFile = $this->‪getImagesPath() . $imageProcessor->filenamePrefix . ‪StringUtility::getUniqueId('gdBox') . '.' . $gifOrPng;
752  $imageProcessor->ImageWrite($image, $outputFile);
753  $imResult = $imageProcessor->getImageDimensions($outputFile);
754  $result = [
755  'fileExists' => true,
756  'outputFile' => $imResult[3],
757  'referenceFile' => self::TEST_REFERENCE_PATH . '/Gdlib-box.' . $gifOrPng,
758  'command' => $imageProcessor->IM_commands,
759  ];
760  return $this->‪getImageTestResponse($result);
761  }
762 
766  public function ‪imageProcessingGdlibRenderTextAction(): ResponseInterface
767  {
768  $imageProcessor = $this->‪initializeImageProcessor();
769  $gifOrPng = $imageProcessor->gifExtension;
770  $image = imagecreatetruecolor(300, 225);
771  $backgroundColor = imagecolorallocate($image, 128, 128, 150);
772  imagefilledrectangle($image, 0, 0, 300, 225, $backgroundColor);
773  $workArea = [0, 0, 300, 225];
774  $conf = [
775  'iterations' => 1,
776  'angle' => 0,
777  'antiAlias' => 1,
778  'text' => 'HELLO WORLD',
779  'fontColor' => '#003366',
780  'fontSize' => 30,
781  'fontFile' => ‪ExtensionManagementUtility::extPath('install') . 'Resources/Private/Font/vera.ttf',
782  'offset' => '30,80',
783  ];
784  $conf['BBOX'] = $imageProcessor->calcBBox($conf);
785  $imageProcessor->makeText($image, $conf, $workArea);
786  $outputFile = $this->‪getImagesPath() . $imageProcessor->filenamePrefix . ‪StringUtility::getUniqueId('gdText') . '.' . $gifOrPng;
787  $imageProcessor->ImageWrite($image, $outputFile);
788  $imResult = $imageProcessor->getImageDimensions($outputFile);
789  $result = [
790  'fileExists' => true,
791  'outputFile' => $imResult[3],
792  'referenceFile' => self::TEST_REFERENCE_PATH . '/Gdlib-text.' . $gifOrPng,
793  'command' => $imageProcessor->IM_commands,
794  ];
795  return $this->‪getImageTestResponse($result);
796  }
797 
801  public function ‪imageProcessingGdlibNiceTextAction(): ResponseInterface
802  {
803  if (!$this->‪isImageMagickEnabledAndConfigured()) {
804  return new ‪JsonResponse([
805  'status' => [$this->‪imageMagickDisabledMessage()],
806  ]);
807  }
808  $imageProcessor = $this->‪initializeImageProcessor();
809  $gifOrPng = $imageProcessor->gifExtension;
810  $image = imagecreatetruecolor(300, 225);
811  $backgroundColor = imagecolorallocate($image, 128, 128, 150);
812  imagefilledrectangle($image, 0, 0, 300, 225, $backgroundColor);
813  $workArea = [0, 0, 300, 225];
814  $conf = [
815  'iterations' => 1,
816  'angle' => 0,
817  'antiAlias' => 1,
818  'text' => 'HELLO WORLD',
819  'fontColor' => '#003366',
820  'fontSize' => 30,
821  'fontFile' => ‪ExtensionManagementUtility::extPath('install') . 'Resources/Private/Font/vera.ttf',
822  'offset' => '30,80',
823  ];
824  $conf['BBOX'] = $imageProcessor->calcBBox($conf);
825  $imageProcessor->makeText($image, $conf, $workArea);
826  $outputFile = $this->‪getImagesPath() . $imageProcessor->filenamePrefix . ‪StringUtility::getUniqueId('gdText') . '.' . $gifOrPng;
827  $imageProcessor->ImageWrite($image, $outputFile);
828  $conf['offset'] = '30,120';
829  $conf['niceText'] = 1;
830  $imageProcessor->makeText($image, $conf, $workArea);
831  $outputFile = $this->‪getImagesPath() . $imageProcessor->filenamePrefix . ‪StringUtility::getUniqueId('gdNiceText') . '.' . $gifOrPng;
832  $imageProcessor->ImageWrite($image, $outputFile);
833  $imResult = $imageProcessor->getImageDimensions($outputFile);
834  $result = [
835  'fileExists' => true,
836  'outputFile' => $imResult[3],
837  'referenceFile' => self::TEST_REFERENCE_PATH . '/Gdlib-niceText.' . $gifOrPng,
838  'command' => $imageProcessor->IM_commands,
839  ];
840  return $this->‪getImageTestResponse($result);
841  }
842 
846  public function ‪imageProcessingGdlibNiceTextShadowAction(): ResponseInterface
847  {
848  if (!$this->‪isImageMagickEnabledAndConfigured()) {
849  return new ‪JsonResponse([
850  'status' => [$this->‪imageMagickDisabledMessage()],
851  ]);
852  }
853  $imageProcessor = $this->‪initializeImageProcessor();
854  $gifOrPng = $imageProcessor->gifExtension;
855  $image = imagecreatetruecolor(300, 225);
856  $backgroundColor = imagecolorallocate($image, 128, 128, 150);
857  imagefilledrectangle($image, 0, 0, 300, 225, $backgroundColor);
858  $workArea = [0, 0, 300, 225];
859  $conf = [
860  'iterations' => 1,
861  'angle' => 0,
862  'antiAlias' => 1,
863  'text' => 'HELLO WORLD',
864  'fontColor' => '#003366',
865  'fontSize' => 30,
866  'fontFile' => ‪ExtensionManagementUtility::extPath('install') . 'Resources/Private/Font/vera.ttf',
867  'offset' => '30,80',
868  ];
869  $conf['BBOX'] = $imageProcessor->calcBBox($conf);
870  $imageProcessor->makeText($image, $conf, $workArea);
871  $outputFile = $this->‪getImagesPath() . $imageProcessor->filenamePrefix . ‪StringUtility::getUniqueId('gdText') . '.' . $gifOrPng;
872  $imageProcessor->ImageWrite($image, $outputFile);
873  $conf['offset'] = '30,120';
874  $conf['niceText'] = 1;
875  $imageProcessor->makeText($image, $conf, $workArea);
876  $outputFile = $this->‪getImagesPath() . $imageProcessor->filenamePrefix . ‪StringUtility::getUniqueId('gdNiceText') . '.' . $gifOrPng;
877  $imageProcessor->ImageWrite($image, $outputFile);
878  $conf['offset'] = '30,160';
879  $conf['niceText'] = 1;
880  $conf['shadow.'] = [
881  'offset' => '2,2',
882  'blur' => '20',
883  'opacity' => '50',
884  'color' => 'black',
885  ];
886  // Warning: Re-uses $image from above!
887  $imageProcessor->makeShadow($image, $conf['shadow.'], $workArea, $conf);
888  $imageProcessor->makeText($image, $conf, $workArea);
889  $outputFile = $this->‪getImagesPath() . $imageProcessor->filenamePrefix . ‪StringUtility::getUniqueId('GDwithText-niceText-shadow') . '.' . $gifOrPng;
890  $imageProcessor->ImageWrite($image, $outputFile);
891  $imResult = $imageProcessor->getImageDimensions($outputFile);
892  $result = [
893  'fileExists' => true,
894  'outputFile' => $imResult[3],
895  'referenceFile' => self::TEST_REFERENCE_PATH . '/Gdlib-shadow.' . $gifOrPng,
896  'command' => $imageProcessor->IM_commands,
897  ];
898  return $this->‪getImageTestResponse($result);
899  }
900 
907  {
908  $imageProcessor = GeneralUtility::makeInstance(GraphicalFunctions::class);
909  $imageProcessor->dontCheckForExistingTempFile = true;
910  $imageProcessor->filenamePrefix = 'installTool-';
911  $imageProcessor->dontCompress = true;
912  $imageProcessor->alternativeOutputKey = 'typo3InstallTest';
913  $imageProcessor->setImageFileExt(self::IMAGE_FILE_EXT);
914  return $imageProcessor;
915  }
916 
922  protected function ‪determineImageMagickVersion(): string
923  {
924  $command = ‪CommandUtility::imageMagickCommand('identify', '-version');
925  ‪CommandUtility::exec($command, $result);
926  $string = $result[0] ?? '';
927  $version = '';
928  if (!empty($string)) {
929  [, $version] = explode('Magick', $string);
930  [$version] = explode(' ', trim($version));
931  $version = trim($version);
932  }
933  return $version;
934  }
935 
939  protected function ‪convertImageFormatsToJpg(string $inputFormat): ResponseInterface
940  {
941  if (!$this->‪isImageMagickEnabledAndConfigured()) {
942  return new ‪JsonResponse([
943  'status' => [$this->‪imageMagickDisabledMessage()],
944  ]);
945  }
946  if (!‪GeneralUtility::inList(‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $inputFormat)) {
947  return new ‪JsonResponse([
948  'status' => [
949  new ‪FlashMessage(
950  'Handling format ' . $inputFormat . ' must be enabled in TYPO3_CONF_VARS[\'GFX\'][\'imagefile_ext\']',
951  'Skipped test',
952  ContextualFeedbackSeverity::WARNING
953  ),
954  ],
955  ]);
956  }
957  $imageBasePath = ‪ExtensionManagementUtility::extPath('install') . 'Resources/Public/Images/';
958  $imageProcessor = $this->‪initializeImageProcessor();
959  $inputFile = $imageBasePath . 'TestInput/Test.' . $inputFormat;
960  $imageProcessor->imageMagickConvert_forceFileNameBody = ‪StringUtility::getUniqueId('read') . '-' . $inputFormat;
961  $imResult = $imageProcessor->imageMagickConvert($inputFile, 'jpg', '300', '', '', '', [], true);
962  if ($imResult !== null) {
963  $result = [
964  'fileExists' => file_exists($imResult[3]),
965  'outputFile' => $imResult[3],
966  'referenceFile' => self::TEST_REFERENCE_PATH . '/Read-' . $inputFormat . '.jpg',
967  'command' => $imageProcessor->IM_commands,
968  ];
969  } else {
970  $result = [
971  'status' => [$this->‪imageGenerationFailedMessage()],
972  'command' => $imageProcessor->IM_commands,
973  ];
974  }
975  return $this->‪getImageTestResponse($result);
976  }
977 
981  protected function ‪getDatabaseConnectionInformation(): array
982  {
983  $connectionInfos = [];
984  $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
985  foreach ($connectionPool->getConnectionNames() as $connectionName) {
986  $connection = $connectionPool->getConnectionByName($connectionName);
987  $connectionParameters = $connection->getParams();
988  $connectionInfo = [
989  'connectionName' => $connectionName,
990  'version' => $connection->getServerVersion(),
991  'databaseName' => $connection->getDatabase(),
992  'username' => $connectionParameters['user'] ?? '',
993  'host' => $connectionParameters['host'] ?? '',
994  'port' => $connectionParameters['port'] ?? '',
995  'socket' => $connectionParameters['unix_socket'] ?? '',
996  'numberOfTables' => count($connection->createSchemaManager()->listTableNames()),
997  'numberOfMappedTables' => 0,
998  ];
999  if (isset(‪$GLOBALS['TYPO3_CONF_VARS']['DB']['TableMapping'])
1000  && is_array(‪$GLOBALS['TYPO3_CONF_VARS']['DB']['TableMapping'])
1001  ) {
1002  // Count number of array keys having $connectionName as value
1003  $connectionInfo['numberOfMappedTables'] = count(array_intersect(
1004  ‪$GLOBALS['TYPO3_CONF_VARS']['DB']['TableMapping'],
1005  [$connectionName]
1006  ));
1007  }
1008  $connectionInfos[] = $connectionInfo;
1009  }
1010  return $connectionInfos;
1011  }
1012 
1016  protected function ‪getApplicationContextInformation(): array
1017  {
1018  $applicationContext = ‪Environment::getContext();
1019  $status = $applicationContext->isProduction() ? ‪InformationStatus::STATUS_OK : ‪InformationStatus::STATUS_WARNING;
1020 
1021  return [
1022  'context' => (string)$applicationContext,
1023  'status' => $status,
1024  ];
1025  }
1026 
1034  protected function ‪getSenderEmailAddress(): string
1035  {
1036  return !empty(‪$GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'])
1037  ? ‪$GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress']
1038  : 'no-reply@example.com';
1039  }
1040 
1046  protected function ‪getSenderEmailName(): string
1047  {
1048  return !empty(‪$GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName'])
1049  ? ‪$GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName']
1050  : 'TYPO3 CMS install tool';
1051  }
1052 
1058  protected function ‪getEmailSubject(): string
1059  {
1060  $name = !empty(‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'])
1061  ? ' from site "' . ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . '"'
1062  : '';
1063  return 'Test TYPO3 CMS mail delivery' . $name;
1064  }
1065 
1069  protected function ‪getImageTestResponse(array $testResult): ResponseInterface
1070  {
1071  $responseData = [
1072  'success' => true,
1073  ];
1074  foreach ($testResult as $resultKey => $value) {
1075  if ($resultKey === 'referenceFile' && !empty($testResult['referenceFile'])) {
1076  $referenceFileArray = explode('.', $testResult['referenceFile']);
1077  $fileExt = end($referenceFileArray);
1078  $responseData['referenceFile'] = 'data:image/' . $fileExt . ';base64,' . base64_encode((string)file_get_contents($testResult['referenceFile']));
1079  } elseif ($resultKey === 'outputFile' && !empty($testResult['outputFile'])) {
1080  $outputFileArray = explode('.', $testResult['outputFile']);
1081  $fileExt = end($outputFileArray);
1082  $responseData['outputFile'] = 'data:image/' . $fileExt . ';base64,' . base64_encode((string)file_get_contents($testResult['outputFile']));
1083  } else {
1084  $responseData[$resultKey] = $value;
1085  }
1086  }
1087  return new ‪JsonResponse($responseData);
1088  }
1089 
1094  {
1095  return new ‪FlashMessage(
1096  'ImageMagick / GraphicsMagick handling is enabled, but the execute'
1097  . ' command returned an error. Please check your settings, especially'
1098  . ' [\'GFX\'][\'processor_path\'] and ensure Ghostscript is installed on your server.',
1099  'Image generation failed',
1100  ContextualFeedbackSeverity::ERROR
1101  );
1102  }
1103 
1109  protected function ‪isImageMagickEnabledAndConfigured(): bool
1110  {
1111  $enabled = ‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_enabled'];
1112  $path = ‪$GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_path'];
1113  return $enabled && $path;
1114  }
1115 
1120  {
1121  return new ‪FlashMessage(
1122  'ImageMagick / GraphicsMagick handling is disabled or not configured correctly.',
1123  'Tests not executed',
1124  ContextualFeedbackSeverity::ERROR
1125  );
1126  }
1127 
1132  protected function ‪getImagesPath(): string
1133  {
1134  $imagePath = ‪Environment::getPublicPath() . '/typo3temp/assets/images/';
1135  if (!is_dir($imagePath)) {
1136  ‪GeneralUtility::mkdir_deep($imagePath);
1137  }
1138  return $imagePath;
1139  }
1140 }
‪TYPO3\CMS\Install\Controller\EnvironmentController\isImageMagickEnabledAndConfigured
‪bool isImageMagickEnabledAndConfigured()
Definition: EnvironmentController.php:1109
‪TYPO3\CMS\Install\Controller\EnvironmentController\folderStructureFixAction
‪folderStructureFixAction()
Definition: EnvironmentController.php:197
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageGenerationFailedMessage
‪imageGenerationFailedMessage()
Definition: EnvironmentController.php:1093
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingCombineJpgMaskAction
‪imageProcessingCombineJpgMaskAction()
Definition: EnvironmentController.php:675
‪TYPO3\CMS\Install\Controller\EnvironmentController\initializeImageProcessor
‪GraphicalFunctions initializeImageProcessor()
Definition: EnvironmentController.php:906
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingReadJpgAction
‪imageProcessingReadJpgAction()
Definition: EnvironmentController.php:354
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGifToGifAction
‪imageProcessingGifToGifAction()
Definition: EnvironmentController.php:515
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingJpgToWebpAction
‪imageProcessingJpgToWebpAction()
Definition: EnvironmentController.php:609
‪TYPO3\CMS\Install\Controller\EnvironmentController\systemInformationGetDataAction
‪systemInformationGetDataAction(ServerRequestInterface $request)
Definition: EnvironmentController.php:79
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibSimpleAction
‪imageProcessingGdlibSimpleAction()
Definition: EnvironmentController.php:710
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingReadGifAction
‪imageProcessingReadGifAction()
Definition: EnvironmentController.php:362
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibNiceTextAction
‪imageProcessingGdlibNiceTextAction()
Definition: EnvironmentController.php:801
‪TYPO3\CMS\Core\Core\Environment\getPublicPath
‪static getPublicPath()
Definition: Environment.php:187
‪TYPO3\CMS\Install\Controller\EnvironmentController
Definition: EnvironmentController.php:53
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibNiceTextShadowAction
‪imageProcessingGdlibNiceTextShadowAction()
Definition: EnvironmentController.php:846
‪TYPO3\CMS\Core\Mail\MailerInterface
Definition: MailerInterface.php:28
‪TYPO3\CMS\Install\FolderStructure\DefaultFactory
Definition: DefaultFactory.php:25
‪TYPO3\CMS\Install\Controller\EnvironmentController\TEST_REFERENCE_PATH
‪const TEST_REFERENCE_PATH
Definition: EnvironmentController.php:55
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibFromFileAction
‪imageProcessingGdlibFromFileAction()
Definition: EnvironmentController.php:738
‪TYPO3\CMS\Install\Controller\EnvironmentController\IMAGE_FILE_EXT
‪const IMAGE_FILE_EXT
Definition: EnvironmentController.php:54
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingWritePngAction
‪imageProcessingWritePngAction()
Definition: EnvironmentController.php:454
‪TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus\STATUS_OK
‪const STATUS_OK
Definition: InformationStatus.php:40
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility
Definition: ExtensionManagementUtility.php:40
‪TYPO3\CMS\Core\Type\ContextualFeedbackSeverity
‪ContextualFeedbackSeverity
Definition: ContextualFeedbackSeverity.php:25
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingReadTifAction
‪imageProcessingReadTifAction()
Definition: EnvironmentController.php:378
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingReadAiAction
‪imageProcessingReadAiAction()
Definition: EnvironmentController.php:394
‪TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck
Definition: DatabaseCheck.php:71
‪TYPO3\CMS\Install\Controller\EnvironmentController\convertImageFormatsToJpg
‪convertImageFormatsToJpg(string $inputFormat)
Definition: EnvironmentController.php:939
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageMagickDisabledMessage
‪imageMagickDisabledMessage()
Definition: EnvironmentController.php:1119
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility\extPath
‪static extPath(string $key, string $script='')
Definition: ExtensionManagementUtility.php:120
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions
Definition: GraphicalFunctions.php:37
‪TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus\STATUS_WARNING
‪const STATUS_WARNING
Definition: InformationStatus.php:45
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingReadPdfAction
‪imageProcessingReadPdfAction()
Definition: EnvironmentController.php:386
‪TYPO3\CMS\Core\Utility\GeneralUtility\fixPermissions
‪static mixed fixPermissions($path, $recursive=false)
Definition: GeneralUtility.php:1594
‪TYPO3\CMS\Core\Utility\GeneralUtility\mkdir_deep
‪static mkdir_deep($directory)
Definition: GeneralUtility.php:1753
‪TYPO3\CMS\Core\Mail\FluidEmail
Definition: FluidEmail.php:35
‪TYPO3\CMS\Core\Imaging\GraphicalFunctions\gifCompress
‪static string gifCompress($theFile, $type)
Definition: GraphicalFunctions.php:2526
‪TYPO3\CMS\Install\Controller
Definition: AbstractController.php:18
‪TYPO3\CMS\Install\Controller\EnvironmentController\getDatabaseConnectionInformation
‪getDatabaseConnectionInformation()
Definition: EnvironmentController.php:981
‪TYPO3\CMS\Install\Controller\EnvironmentController\mailTestGetDataAction
‪mailTestGetDataAction(ServerRequestInterface $request)
Definition: EnvironmentController.php:211
‪TYPO3\CMS\Install\Controller\EnvironmentController\getImageTestResponse
‪getImageTestResponse(array $testResult)
Definition: EnvironmentController.php:1069
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGetDataAction
‪imageProcessingGetDataAction(ServerRequestInterface $request)
Definition: EnvironmentController.php:292
‪TYPO3\CMS\Core\Utility\CommandUtility\exec
‪static exec(string $command, ?array &$output=null, int &$returnValue=0)
Definition: CommandUtility.php:85
‪TYPO3\CMS\Install\Controller\EnvironmentController\phpInfoGetDataAction
‪phpInfoGetDataAction(ServerRequestInterface $request)
Definition: EnvironmentController.php:98
‪TYPO3\CMS\Install\SystemEnvironment\ServerResponse\ServerResponseCheck
Definition: ServerResponseCheck.php:45
‪TYPO3\CMS\Install\Controller\EnvironmentController\folderStructureGetStatusAction
‪folderStructureGetStatusAction(ServerRequestInterface $request)
Definition: EnvironmentController.php:152
‪TYPO3\CMS\Install\Controller\EnvironmentController\determineImageMagickVersion
‪string determineImageMagickVersion()
Definition: EnvironmentController.php:922
‪TYPO3\CMS\Install\Controller\EnvironmentController\mailTestAction
‪mailTestAction(ServerRequestInterface $request)
Definition: EnvironmentController.php:234
‪TYPO3\CMS\Install\Controller\EnvironmentController\getImagesPath
‪getImagesPath()
Definition: EnvironmentController.php:1132
‪TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus
Definition: InformationStatus.php:24
‪TYPO3\CMS\Install\Service\LateBootService
Definition: LateBootService.php:27
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingCombineGifMaskAction
‪imageProcessingCombineGifMaskAction()
Definition: EnvironmentController.php:640
‪TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck
‪TYPO3\CMS\Install\Controller\AbstractController\initializeView
‪initializeView(ServerRequestInterface $request)
Definition: AbstractController.php:39
‪TYPO3\CMS\Core\Messaging\FlashMessage
Definition: FlashMessage.php:27
‪TYPO3\CMS\Core\FormProtection\FormProtectionFactory
Definition: FormProtectionFactory.php:44
‪TYPO3\CMS\Install\SystemEnvironment\Check
Definition: Check.php:45
‪TYPO3\CMS\Core\Http\JsonResponse
Definition: JsonResponse.php:28
‪TYPO3\CMS\Core\Core\Environment\isRunningOnCgiServer
‪static isRunningOnCgiServer()
Definition: Environment.php:303
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Install\Controller\EnvironmentController\getApplicationContextInformation
‪getApplicationContextInformation()
Definition: EnvironmentController.php:1016
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:41
‪TYPO3\CMS\Install\Controller\EnvironmentController\getSenderEmailAddress
‪string getSenderEmailAddress()
Definition: EnvironmentController.php:1034
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGifToJpgAction
‪imageProcessingGifToJpgAction()
Definition: EnvironmentController.php:577
‪TYPO3\CMS\Core\Utility\CommandUtility\imageMagickCommand
‪static string imageMagickCommand(string $command, string $parameters, string $path='')
Definition: CommandUtility.php:98
‪TYPO3\CMS\Install\SystemEnvironment\SetupCheck
Definition: SetupCheck.php:38
‪TYPO3\CMS\Core\Utility\MathUtility
Definition: MathUtility.php:24
‪TYPO3\CMS\Install\Controller\AbstractController
Definition: AbstractController.php:35
‪TYPO3\CMS\Core\Utility\GeneralUtility\inList
‪static bool inList($list, $item)
Definition: GeneralUtility.php:532
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingWriteGifAction
‪imageProcessingWriteGifAction()
Definition: EnvironmentController.php:402
‪TYPO3\CMS\Install\Controller\EnvironmentController\environmentCheckGetStatusAction
‪environmentCheckGetStatusAction(ServerRequestInterface $request)
Definition: EnvironmentController.php:110
‪TYPO3\CMS\Install\Controller\EnvironmentController\getSenderEmailName
‪getSenderEmailName()
Definition: EnvironmentController.php:1046
‪TYPO3\CMS\Core\Database\ConnectionPool
Definition: ConnectionPool.php:51
‪TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange
‪static int forceIntegerInRange(mixed $theInt, int $min, int $max=2000000000, int $defaultValue=0)
Definition: MathUtility.php:34
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:51
‪TYPO3\CMS\Install\Controller\EnvironmentController\cardsAction
‪cardsAction(ServerRequestInterface $request)
Definition: EnvironmentController.php:67
‪TYPO3\CMS\Core\Utility\StringUtility
Definition: StringUtility.php:24
‪TYPO3\CMS\Install\Controller\EnvironmentController\__construct
‪__construct(private readonly LateBootService $lateBootService, private readonly FormProtectionFactory $formProtectionFactory, private readonly MailerInterface $mailer,)
Definition: EnvironmentController.php:57
‪TYPO3\CMS\Core\Utility\CommandUtility
Definition: CommandUtility.php:54
‪TYPO3\CMS\Core\Messaging\FlashMessageQueue
Definition: FlashMessageQueue.php:30
‪TYPO3\CMS\Core\Core\Environment\getContext
‪static getContext()
Definition: Environment.php:128
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingPngToPngAction
‪imageProcessingPngToPngAction()
Definition: EnvironmentController.php:546
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingReadPngAction
‪imageProcessingReadPngAction()
Definition: EnvironmentController.php:370
‪TYPO3\CMS\Install\Controller\EnvironmentController\getEmailSubject
‪getEmailSubject()
Definition: EnvironmentController.php:1058
‪TYPO3\CMS\Core\Utility\StringUtility\getUniqueId
‪static getUniqueId(string $prefix='')
Definition: StringUtility.php:29
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingTrueTypeAction
‪imageProcessingTrueTypeAction()
Definition: EnvironmentController.php:320
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibRenderTextAction
‪imageProcessingGdlibRenderTextAction()
Definition: EnvironmentController.php:766
‪TYPO3\CMS\Install\FolderStructure\DefaultPermissionsCheck
Definition: DefaultPermissionsCheck.php:27
‪TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingWriteWebpAction
‪imageProcessingWriteWebpAction()
Definition: EnvironmentController.php:484
‪TYPO3\CMS\Core\Core\Environment\isWindows
‪static isWindows()
Definition: Environment.php:287