[TYPO3-core] RFC: Bug #6158: index.php assumes current working directory to be PATH_site

Oliver Hader oh at inpublica.de
Mon Feb 4 17:36:38 CET 2008


This is a SVN patch request.

Problem:
On linked sources the current working directory is set to the linked 
source and not to the originally called one (as provided in PATH_site).
Thus, releative file calls (e.g. loading a HTML template file) will not 
work anymore ("crashes") and a blank page is shown.
This only happens when the following conditions are met:
* PHP 5.2.4-xxx (fixed in PHP 5.2.5)
* running in CGI mode (e.g. fcgid)
* PHP settings cgi.fix_pathinfo enabled
* linked source

Solution:
Check for the conditions above in t3lib/config_default.php and execute a 
chdir(PATH_site) to get relative file operations working again.

Comments:
This issue is marked as fixed in PHP 5.2.5 but however some 
distributions still deliver this bug (e.g. I got this on latest 
Debian/testing 5.2.4-2+b1).

Bugtracker references:
http://bugs.typo3.org/view.php?id=6158

Branch: TYPO3_4-1 & Trunk


olly
-- 
Oliver Hader
http://inpublica.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006158.patch
Type: text/x-patch
Size: 1218 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080204/555ddbfc/attachment.bin 


More information about the TYPO3-team-core mailing list