Issue Bug Resolved

#103842TYPO3 not running under PHP 8 with disabled function ini_set

jku jku 05/15/24, 11:06 updated 09/02/26, 21:15

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

  1. Gerrit Code Review pushed patch set 1 for main to change 84377 status New Under Review 05/23/24, 19:44

  2. Gerrit Code Review pushed patch set 2 for main to change 84377 05/23/24, 19:45

  3. Georg Ringer changed Sprint Focus On Location Sprint 06/11/24, 20:11

  4. Gerrit Code Review pushed patch set 3 for main to change 84377 06/26/24, 04:11

  5. Gerrit Code Review pushed patch set 4 for main to change 84377 10/18/24, 13:41

  6. Gerrit Code Review pushed patch set 5 for main to change 84377 04/11/25, 21:11

  7. Gerrit Code Review pushed patch set 6 for main to change 84377 04/12/25, 10:24

  8. Benni Mack changed Sprint Focus On Location Sprint 05/05/25, 19:27

  9. Gerrit Code Review pushed patch set 7 for main to change 84377 04/22/26, 06:54

  10. Gerrit Code Review pushed patch set 8 for main to change 84377 09/01/26, 21:03

  11. Gerrit Code Review pushed patch set 9 for main to change 84377 09/02/26, 09:19

  12. Gerrit Code Review pushed patch set 1 for 14.3 to change 95573 09/02/26, 16:14

  13. Georg Ringer commented and changed status Under Review Resolved done 0 % 100 % 09/02/26, 20:40

    Applied in changeset commit:7f0245d296e2e04ce681e8516ac68cbd1a376683.

  14. Gerrit Code Review pushed patch set 2 for 14.3 to change 95573 status Resolved Under Review 09/02/26, 20:41

  15. Georg Ringer commented and changed status Under Review Resolved 09/02/26, 21:15

    Applied in changeset commit:ed47582d17d8fb2674f47bc6b782b9dde83c8f4e.