Project

General

Profile

Actions

Bug #55252

closed

PHP 5.5 and require LocalConfiguration

Added by Alexander Opitz about 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Category:
Miscellaneous
Target version:
Start date:
2014-01-22
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

I tracked down an issue on the 123 installer with dbal #53997 to the point that LocalConfiguration isn't included correctly with "require" on PHP 5.5 wit OPcache. As the OPcache is default on, we should fix this.

TYPO3\CMS\Core\Utility\ConfigurationManager is responsible for handling the LocalConfiguration.php, the DBAL autoloader requests to add adodb and dbal to the required extensions, which fails (or do not work correctly) and this courses an endless redirect loop.

What happens in ConfigurationManager on a write (by adding adodb):

- require LocalConfiguration.php
- Merge array with new configuration for 'EXT/extListArray'
- write LocalConfiguration.php

After this, the old configuration still exists in the OPcache. If we now add dbal:

- require LocalConfiguration.php (The old one from start of process so without adodb)
- Merge array with new configuration for 'EXT/extListArray'
- write LocalConfiguration.php (with dbal but without adodb)

=> Issue 1: We are missing adodb!

The OPcache only checks every 10 seconds (or so) the timestamps (to be fast) so the dbal redirect comes to the point that dbal isn't installed, installs it and does the redirect, till the browser ends this loop after 20 steps.

=> Issue 2: Our written config isn't there after reload.

3 ways to fix, if OPcache is available:
- opcache_compile_file => Available from PHP 5.5.5 onwards, so no option
- opcache_reset => This do not help against issue 1 as the second require will get the same data as the first require, even though opcache_​get_​status tells us, that no file is in cache. Beside of it clears to much.
- opcache_invalidate is the way to go, after writing the PHP file, which we require self.

IMHO this issue also needs to be fixed for the CachingFramework for the PHP cache and maybe in more places.

To resolve this issue, I would propose to create a new Utility Class, which will provide clearing cache for a file for OPcache, APC and maybe more.


Files

opcodecache_warning.png (67.6 KB) opcodecache_warning.png Alexander Opitz, 2014-01-23 13:19

Related issues 10 (0 open10 closed)

Related to TYPO3 Core - Bug #53997: 123 Installer tries to find database before the user is asked to select one.Closed2013-11-27

Actions
Related to TYPO3 Core - Bug #46957: EM: can't install/uninstall extensionsClosed2013-04-05

Actions
Related to TYPO3 Core - Bug #55352: TYPO3 breaks if docblock is removed by opcode cacheClosedAlexander Opitz2014-01-27

Actions
Related to TYPO3 Core - Bug #55392: Missing opcode cache throws warning (instead of notice) and triggers mailClosed2014-01-28

Actions
Related to TYPO3 Core - Bug #56532: PackageState.php gets rewritten on every ExtensionManager call (InvalidPackageKeyException)ClosedDaniel Siepmann2014-03-04

Actions
Related to TYPO3 Core - Bug #56546: PHP5.3 OpcodeCache issue: "Cannot access static:: when no class scope is active"ClosedAlexander Opitz2014-03-04

Actions
Related to TYPO3 Core - Bug #56554: OpCache XCACHE cannot be cleared if xcache.admin.enable_auth is setClosedErnesto Baschny2014-03-04

Actions
Related to TYPO3 Core - Bug #56799: Install tool doesn't work on PHP 5.5.9 and MySQL 5.5.xClosed2014-03-12

Actions
Related to TYPO3 Core - Feature #56969: Clear opcode cache after remove/update extensionClosedAlexander Opitz2014-03-16

Actions
Precedes TYPO3 Core - Task #56526: Link to a wiki page from installer, if opcode cache isn't optimalClosedAlexander Opitz2014-03-04

Actions
Actions #1

Updated by Markus Klein about 10 years ago

Impressive finding Alex!

+1 for adding the utility class to handle php-side caches.

The consequence is that we need to add extra handling for any upcoming caching technology in our code.

(a pity the caches do not inject themselves into the file-stream drivers to detect write operations to files and do the cache invalidation automatically)

Actions #2

Updated by Alexander Opitz about 10 years ago

State of the patch in screenshot, only Exception Messages are left, so patch will be submited shortly after lunch.

Actions #3

Updated by Gerrit Code Review about 10 years ago

  • Status changed from Accepted to Under Review

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

Actions #4

Updated by Gerrit Code Review about 10 years ago

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

Actions #5

Updated by Gerrit Code Review about 10 years ago

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

Actions #6

Updated by Gerrit Code Review about 10 years ago

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

Actions #7

Updated by Gerrit Code Review about 10 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27024

Actions #8

Updated by Gerrit Code Review about 10 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27024

Actions #9

Updated by Gerrit Code Review about 10 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27024

Actions #10

Updated by Gerrit Code Review about 10 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27024

Actions #11

Updated by Gerrit Code Review about 10 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27024

Actions #12

Updated by Gerrit Code Review about 10 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27024

Actions #13

Updated by Gerrit Code Review about 10 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27024

Actions #14

Updated by Gerrit Code Review about 10 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27024

Actions #15

Updated by Gerrit Code Review about 10 years ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27024

Actions #16

Updated by Gerrit Code Review about 10 years ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27024

Actions #17

Updated by Gerrit Code Review about 10 years ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27024

Actions #18

Updated by Gerrit Code Review about 10 years ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27024

Actions #19

Updated by Gerrit Code Review about 10 years ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27024

Actions #20

Updated by Gerrit Code Review about 10 years ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27024

Actions #21

Updated by Gerrit Code Review about 10 years ago

Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27024

Actions #22

Updated by Alexander Opitz about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #23

Updated by Gerrit Code Review about 10 years ago

  • Status changed from Resolved to Under Review

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

Actions #24

Updated by Alexander Opitz about 10 years ago

  • Status changed from Under Review to Resolved
  • Target version set to 6.2.0
Actions #25

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF