Project

General

Profile

Actions

Bug #103842

open

TYPO3 not running under PHP 8 with disabled function ini_set

Added by jku jku 6 months ago. Updated about 1 month ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
System/Bootstrap/Configuration
Target version:
-
Start date:
2024-05-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint

Description

Context

We are running TYPO3 for years in a strictly secured environment, so PHP function ini_set among others is disabled via global PHP configuration.

disable_function=ini_set

We know that there are several lines of code with ini_set, but we were able to run TYPO3 until now.

  • At Bootstrap.php ini_set is prefixed with @-oparator => so this worked under PHP 7
  • At SessionService.php there is no @-operator, but we needed no install tool at our production server

Problem now

PHP 8 changed the behaviour of the @-operator, so TYPO3 completely fails at the first usage of ini_set at Bootstrap.php. So we cannot run TYPO3 with disabled ini_set.

Proposal

It would be helpful to wrap all usages of ini_set in the TYPO3 core with conditions or try/catch blocks.

  • At SessionService.php it could be wrapped with a check, if the required PHP settings are already done.
  • At Bootstrap.php it could be wrapped with a try/catch block.
Actions #1

Updated by Gerrit Code Review 6 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84377

Actions #2

Updated by Gerrit Code Review 6 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84377

Actions #3

Updated by Georg Ringer 5 months ago

  • Sprint Focus set to On Location Sprint
Actions #4

Updated by Gerrit Code Review 5 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84377

Actions #5

Updated by Gerrit Code Review about 1 month ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84377

Actions

Also available in: Atom PDF