Issue Bug Closed

#60737Symlinks as Document roots are breaking the cache

Frederik Vosberg 08/01/14, 21:48 updated 10/02/18, 11:52

Description

Hi there,

my hoster uses symlinks to the document root to resolve the domain to the document root.

  1. If there is a host-specific pseudo-DocumentRoot, use it instead of the default one
RewriteCond %{REQUEST_URI} !^/f?cgi-bin/
RewriteCond /var/www/virtual/julia/%{HTTP_HOST} -d
RewriteRule (.*) /var/www/virtual/julia/%{HTTP_HOST}$1

That causes errors when trying to load file paths with GeneralUtility::getFileAbsFileName() because the PATH_typo3 constant contains the current document root. (the current domain of this request).

But the cache holds absolute paths to the symlink document root of the request which triggered the caching.

So the getFileAbsFileName returns empty filePaths, because the absolute file paths passed to it didnt start wih the PATH_typo3.

So we have to realpath them before checking.

Im going to push a patch to gerrit, give me a minute it is my first time ;)

Reviews 2