[TYPO3-dev] Run TYPO3 in different Context: production, development, etc..

Fabien Udriot fabien.udriot at ecodev.ch
Wed Aug 1 12:03:53 CEST 2012


Thanks for you feedback.

> i use
>
> http://typo3.org/extensions/repository/view/contextswitcher

The drawback of this approach is that you can not take advantage of the context in TS.

Though, good to have such settings in the public domain. I may have two more settings for performance:

$TYPO3_CONF_VARS['SYS']['syslogErrorReporting'] = '0';
$TYPO3_CONF_VARS['SYS']['belogErrorReporting'] = '0';

Cheers,

Fabien


On 7/31/12 4:18 PM, Kay Strobach wrote:
> Hi Fabien,
> 
> i use
> 
> http://typo3.org/extensions/repository/view/contextswitcher
> 
> Regards
> Kay
> 
> Am 31.07.2012 16:14, schrieb Stefan Geith:
>> Am 31.07.2012 10:04, schrieb Fabien Udriot:
>>> [...]
>>> Typically, you would find in your htaccess:
>>>
>>>      SetEnv TYPO3_CONTEXT Production
>>>
>>> Connected somehow with the "context" issue, [...]
>>
>> I often used this construct im my localconf.php
>> with websites where I have a Life-, a Preview- and
>> a Dev-Version:
>>
>> if (!defined('TYPO3_CONTEXT')) {
>>     if (getenv('TYPO3_CONTEXT')) {
>>         define('TYPO3_CONTEXT', getenv('TYPO3_CONTEXT'));
>>     } elseif (ini_get('TYPO3_ENV')) {
>>         define('TYPO3_CONTEXT', ini_get('TYPO3_CONTEXT'));
>>     } else {
>>         define('TYPO3_CONTEXT', 'UNCONFIGURED');
>>     }
>> }
>>
>> ...
>> $TYPO3_CONF_VARS['SYS']['sitename'] = 'Sitename ('.TYPO3_CONTEXT.')';
>> ...
>> if (strcmp(TYPO3_CONTEXT,'www')==0) {
>>         $typo_db_username = ...
>>         $TYPO3_CONF_VARS['EXT']['extConf']['googleMapApiKey'] = ...
>> } elseif (strcmp(TYPO3_CONTEXT,'preview')==0) {
>>         $typo_db_username = ...
>>         $TYPO3_CONF_VARS['EXT']['extConf']['googleMapApiKey'] = ...
>> } elseif (strcmp(TYPO3_CONTEXT,'dev')==0) {
>>         $typo_db_username = ...
>>         $TYPO3_CONF_VARS['EXT']['extConf']['googleMapApiKey'] = ...
>> }
>>
>> So it would be great if Typo3 could react on some CONTEXT-Variables to
>> use a specific typo3conf like e.g.
>>        'LocalConfiguration' . TYPO3_CONTEXT. '.php'
>>
>>
>> /Stefan
>>
>>
>>
>>
> 
> 



More information about the TYPO3-dev mailing list