[BUGFIX] Fix class cache corruption in chroot environment 01/36301/2
authorMartin Helmich <m.helmich@mittwald.de>
Mon, 26 Jan 2015 13:30:29 +0000 (14:30 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 27 Jan 2015 22:13:23 +0000 (23:13 +0100)
This commit fixes an issue that occurs in the rare edge case when the
TYPO3 cli dispatcher is called in a chroot environment and the site
is delivered via a non-chrooted web server.

In this case, all classes in the class cache will be stored with
`PATH_typo3` as base path, except the `TYPO3\Flow` classes in the
"core" extension. These are based on the __DIR__ constant, which
according to [1] resolves symlinks that generate directory paths that
are invalid outside of the chroot environment.

[1] http://php.net/manual/en/language.constants.predefined.php

Change-Id: I34a15c7a9913afc11cdd1d179a14331b157cbd29
Releases: 6.2
Fixes: #64508
Reviewed-on: http://review.typo3.org/36301
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/ext_autoload.php

index efdf42b..2506367 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // Adapt this file if things need to be available in the bootstrap
-$flowClassesPath = __DIR__ . '/Resources/PHP/TYPO3.Flow/Classes/';
+$flowClassesPath = PATH_typo3 . 'sysext/core/Resources/PHP/TYPO3.Flow/Classes/';
 return array(
        'ext_posmap_pages' => PATH_typo3 . 'move_el.php',
        'ext_posmap_tt_content' => PATH_typo3 . 'move_el.php',