Project

General

Profile

Actions

Bug #57785

closed

Wrong SCRIPT_NAME with hhvm / fastcgi

Added by Kevin Häfeli almost 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2014-04-09
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

In the following core files there is a check for PHP_SAPI

./typo3/sysext/core/Classes/Utility/GeneralUtility.php
./typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php
./typo3/sysext/install/Classes/Controller/Action/Tool/ImportantActions.php

if ($cgiPath && (PHP_SAPI === 'fpm-fcgi' || PHP_SAPI === 'cgi' || PHP_SAPI === 'isapi' || PHP_SAPI === 'cgi-fcgi')) {

this check sets the path / SCRIPT_NAME correct if your hoster is using mod_fastcgi /fcgid. Otherwise the install tool or backend login redirects you to:

www.domain.com/path/to/your/webroot/typo3/backend.php instead of:
www.domain.com/typo3/backend.php

some days ago facebook introduced HHVM with fastcgi support and it's amazing fast.
so, TYPO3 should support it :-)

one step is to extend the PHP_SAPI check with "srv" (hiphop vm's php-sapi name):

if ($cgiPath && (PHP_SAPI === 'fpm-fcgi' || PHP_SAPI === 'cgi' || PHP_SAPI === 'isapi' || PHP_SAPI === 'cgi-fcgi' || PHP_SAPI === 'srv')) {

Actions

Also available in: Atom PDF