Actions
Bug #58358
closedUse REDIRECT_TYPO3_CONTEXT as fallback for TYPO3_CONTEXT environment variable
Start date:
2014-04-30
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
On certain server setups, setting ApplicationContext fails, because the environment variable TYPO3_CONTEXT is never set.
The reason is that variables set by mod_rewrite get prefixed with REDIRECT_
This seems to appear in PHP-FPM setups, which is quite popular these days.
htaccess file: RewriteCond %{HTTP_HOST} ^dev\.example\.com$ RewriteRule (.*) $1 [E=TYPO3_CONTEXT:Development]
Test: echo $_SERVER['TYPO3_CONTEXT']; echo $_SERVER['REDIRECT_TYPO3_CONTEXT']; Development
Flow solves this by using REDIRECT_FLOW3_CONTEXT as fallback in index.php:
$context = getenv('FLOW3_CONTEXT') ?: (getenv('REDIRECT_FLOW3_CONTEXT') ?: 'Development');
We should backport this fallback to Bootstrap.
Actions