[TYPO3-core] RFC: Fix #1007: Access to file resources does not work with mod_fcgid

Benjamin Mack benni at typo3.org
Sat Apr 5 15:41:25 CEST 2008


Hey michael,

nice patch. Also, it's really one of the old bugs (wow, #1007 :)).

+1 after reading, could you please change the $OK variable to boolean (1 
= true, 0 = false), and even rename the variable to $pathIsAllowed = 
false; etc. -- what do you think?

Could we also use t3lib::isFirstPartOfStr() instead of 
strcmp(substr($file,0,6),'media/') ? (to make it more "TYPO3-like", 
while we're touching the code) :)

However, I would like to give this one a test run with FastCGI before I 
could give a full +1.

Michael Stucki wrote:
> This is a SVN patch request.
> 
> Problem:
> The function $TSFE->tmpl->getFileName() expects that the current working
> directory is set to the directory of the request file. However, it seems
> that when running PHP with mod_fcgid, this is not set.
> 
> Now when checking for the existance of some (relative) file resource, the
> file is not found.
> 
> Solution:
> Prefix all files with PATH_site.
> 
> Branches: TYPO3_4-2
> 
> Bugtracker reference:
> http://bugs.typo3.org/view.php?id=1007
> 
> - michael
> 

-- 
greetings,
benni.
-SDG-


More information about the TYPO3-team-core mailing list