[TYPO3-core] RFC #11289: Bug: t3lib_cache_backend_FileBackend doesn't work properly with TYPO3 running in a subdirectory to the document root

Niels Pardon mail at niels-pardon.de
Sat Jun 6 22:49:27 CEST 2009


Hi Olly!

Yes, I encountered this on Windows. I don't think it is related to #10689.

t3lib_cache_backend_FileBackend->setCacheDirectory() uses
t3lib_div::getIndpEnv('TYPO3_DOCUMENT_ROOT') which returns the document
root and not the site path.

I have the following scenario: TYPO3 runs in C:\xampp\htdocs\seminars
where C:\xampp\htdocs is Apache's DocumentRoot.

In this case t3lib_div::getIndpEnv('TYPO3_DOCUMENT_ROOT') will return
"C:\xampp\htdocs" and will use this as the base for the cache directory.
(resulting in C:\xampp\htdocs\typo3temp\cache\)

But what I expect is that it uses C:\xampp\htdocs\seminars as base for
the cache directory. (resultung in
C:\xampp\htdocs\seminars\typo3temp\cache\)

I guess that this behavior is the same on LINUX/UNIX/Mac as soon as you
run your TYPO3 installation in a subdirectory of Apache's DocumentRoot
but I didn't test it.

Does this make sense to you?

Greets,

Niels


Oliver Hader schrieb:
> Hi Niels,
> 
> Niels Pardon schrieb:
>> This is an SVN patch request.
>>
>> Type: Bugfix
>>
>> Bugtracker references:
>> http://bugs.typo3.org/view.php?id=11289
>>
>> Branches:
>> trunk
>>
>> Problem:
>> I'm running several TYPO3 installations within subdirectories of
>> Apache's DocumentRoot. Currently the file backend creates the typo3temp
>> directory outside of the subdirectory TYPO3 is running as it uses
>> t3lib_div::getIndpEnv('TYPO3_DOCUMENT_ROOT') instead of PATH_site.
>>
>> Solution:
>> Use PATH_site instead of t3lib_div::getIndpEnv('TYPO3_DOCUMENT_ROOT').
> 
> Are you running your TYPO3 site on Windows? If so, this issue might be
> related to #10689 which is already in the Core list.
> 
> olly


More information about the TYPO3-team-core mailing list