Bug #103842
openTYPO3 not running under PHP 8 with disabled function ini_set
0%
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.
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
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
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
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