[TYPO3-dev] Determination of PATH_thisScript - your opinion please.

Nikolas Hagelstein lists at shr.cc
Tue Jul 27 17:10:47 CEST 2010


Hi,

While trying to add php-fpm support to typo3 i came
accross the fact that the whole bootstrap 
(frontend/backend/installer/ajax etc) is a real mess.

This is -  in short - what i was trying to archiv orginally:

PHP-FPM ships with PHP as of version 5.3.3. It identifies itself as 
"fpm-fcgi" in PHP_SAPI.

To make TYPO3 recognize it correctly it was/would be neccessary to 
adjust the determination of PATH_thisScript. [1]

While doing this i discovered that there are a bunch of files within the 
core defining PATH_thisScript by repeating a "monster clause" over and 
over again.
It turned out that actually t3lib_div::getIndpEnv('SCRIPT_FILENAME') 
could be used to define PATH_thisScript [2]

Unfortunatly t3lib_div is not available at this point (i.e. during the 
early stage of the bootstrap).

Sothere are IMHO 3 options to bring fpm support to the core:

1. Just add PHP_SAPI == 'fpm-fcgi' || .. to every 
define('PATH_thisScript', ..) - would be ok for 4.4 i guess.

2. Change define('PATH_thisScript' ... to use 
t3lib_div::getIndpEnv('SCRIPT_FILENAME') and place a 
requiere_once(__DIR__ ....) in front of it.

3.  Your opinion

If i remember right  Francois Suter and probably some more guys where 
about to refactor init.php durring t3dd10. It would be nice if you guys 
could join this discussion and share you findings :).


Furthermore i would like to ask you if you could join the following 
discussions.

[1]:
http://lists.typo3.org/pipermail/typo3-team-core/2010-July/041459.html

[2]:
http://lists.typo3.org/pipermail/typo3-team-core/2010-July/041495.html




More information about the TYPO3-dev mailing list