[Typo3-dev] Re: changes required for PHPSuexec to work in Typo3

Fernando de Alcantara Correia fernando at correiabr.net
Sat Jun 26 17:16:38 CEST 2004


<< 14-06 21:29  by  Martin-Pierre Frenette,   typo3(AT)frenette.qc.ca   
Please note that only the zipfile version will work with PHPSuexec, since symlinks are not supported. >>


I'm still trying to make Typo3 work under PHPsuexec, but I found out that while it won't run symlinks, it will run hardlinks.

Maybe a shell script to delete symlinks and replace them with hardlinks would be useful.


<< PHPSuexec reports that the php_sapi_name is 'cgi' YET, 'PATH_TRANSLATED'  is not defined and SCRIPT_FILENAME needs to be used.

As such, I simply modified the =='cgi' with =='xcgi' in all the occurances, and it works well. >>


Really, (1) php_sapi_name is 'cgi'  and (2) SCRIPT_FILENAME needs to be used because 'PATH_TRANSLATED' is blank.

I think the best solution would be to rewrite this check:

define('PATH_thisScript',str_replace('//','/', str_replace('\\','/', 
php_sapi_name()=='cgi'||php_sapi_name()=='isapi'||php_sapi_name()=='cgi-fcgi' 
? 
$HTTP_SERVER_VARS['PATH_TRANSLATED']:$HTTP_SERVER_VARS['SCRIPT_FILENAME'])));

And also to put it in a subroutine so it would not be repeated in so many source files.

Just my opinion.

Fernando Correia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.typo3.org/pipermail/typo3-dev/attachments/20040626/3a17d1e5/attachment.htm>


More information about the TYPO3-dev mailing list