Bug #20656
closedt3lib_cache_backend_FileBacked violates open_basedir_restrictions
0%
Description
t3lib_cache_backend_FileBacked::set violates open_basedir_restrictions due to the fact that it tries to travers the cacheEntryPath from the very beginning using t3lib_div::mkdir_deep. Mkdir checks every part of the whole path for existens (is_dir) which obviosly fails when open base dir restrictions take place.
A common practice is to put all vhost beyond a certain directory usually /var/www/virtual or similar.
In this case mkdir_deep will fail at "/var" since open base_dir_restrictions are preventing it from accessing that directory (which is a good idea in general)
Currently the only workarround i am aware of is to add /var (or whatever) to "open base dir" which obviosly raises security issues.
Note: this error is pretty tricky to reproduce under certain circumstances ( if eaccelerator is enabled). Instead of "could not create cache directory' you will receive a Tx_Fluid_Core_ParsingException complaining about missing reflection information. To get the actuall error message clean the eAccelerator cache, stop/start the apache, clear the T3 cache and hit your webbrowser's reload button ;).
(issue imported from #M11386)
Files