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

Also available in: Atom PDF