#103842TYPO3 not running under PHP 8 with disabled function ini_set
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.
Reviews 2
History 415
-
Gerrit Code Review pushed patch set 1 for main to change 84377 status
NewUnder Review 05/23/24, 19:44 -
Gerrit Code Review pushed patch set 2 for main to change 84377 05/23/24, 19:45
-
Georg Ringer changed Sprint Focus On Location Sprint 06/11/24, 20:11
-
Gerrit Code Review pushed patch set 3 for main to change 84377 06/26/24, 04:11
-
Gerrit Code Review pushed patch set 4 for main to change 84377 10/18/24, 13:41
-
Gerrit Code Review pushed patch set 5 for main to change 84377 04/11/25, 21:11
-
Gerrit Code Review pushed patch set 6 for main to change 84377 04/12/25, 10:24
-
Benni Mack changed Sprint Focus
On Location Sprint05/05/25, 19:27 -
Gerrit Code Review pushed patch set 7 for main to change 84377 04/22/26, 06:54
-
Gerrit Code Review pushed patch set 8 for main to change 84377 09/01/26, 21:03
-
Gerrit Code Review pushed patch set 9 for main to change 84377 09/02/26, 09:19
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 95573 09/02/26, 16:14
-
Georg Ringer commented and changed status
Under ReviewResolved done0 %100 % 09/02/26, 20:40 -
Gerrit Code Review pushed patch set 2 for 14.3 to change 95573 status
ResolvedUnder Review 09/02/26, 20:41 -
Georg Ringer commented and changed status
Under ReviewResolved 09/02/26, 21:15Applied in changeset commit:ed47582d17d8fb2674f47bc6b782b9dde83c8f4e.
Applied in changeset commit:7f0245d296e2e04ce681e8516ac68cbd1a376683.