[TYPO3-german] TYPO3_context funktioniert nicht richtig?
Chris Wolff - AERTiCKET AG
cwolff at aer.de
Fri Dec 5 11:12:16 CET 2014
Danke Helmut,
für die Erläuterung.
Dass ist der Text im Installtool einfach irreführend. Der lässt es nämlich so klingen as würde die TYPO3_CONTEXT variable vorrang haben.
"TYPO3 can be run in a specific application context by using the environment variable "TYPO3_CONTEXT", which is usually set in your webserver configuration (e.g. in htaccess). Built-in contexts are "Production" (default), "Development" or "Testing". This can be used to provide specific configuration sets for each context.
However, if you don't set a context environment variable, you can still use the install tool to select a configuration preset for "Production" or "Development" context. The goal is to configure a production instance with maximum performance and no debug output that is possibly shown to users, while development instances should enable error output. The configuration preset for "Production" is set by default. As a third alternative, you can enter a custom configuration."
- Typo3 Install tool > Configuration Presets > Development / Production settings (version 6.2.7)
(habe ich habe gerade sofware zitiert...)
Dann werde ich ich das wohl in der AdditionalConfigration.php Machen. hatte nur gehoft ich komme drum rum.
Gruss chris
-----Ursprüngliche Nachricht-----
Von: typo3-german-bounces at lists.typo3.org [mailto:typo3-german-bounces at lists.typo3.org] Im Auftrag von Helmut Hummel
Gesendet: Donnerstag, 4. Dezember 2014 18:02
An: typo3-german at lists.typo3.org
Betreff: Re: [TYPO3-german] TYPO3_context funktioniert nicht richtig?
Hallo Chris,
On 04.12.14 13:28, Chris Wolff - AERTiCKET AG wrote:
> Hallo Liebe mailingliste. Ich habe Problem mit dem TYPO3_context.
> Vielleicht verstehe ich es auch nur nicht richtig.
>
> Ich setzt per apache conf auf dem virtual host:
> SetEnv TYPO3_CONTEXT Development
>
> Trozdem bekomme ich keine fehler ausgabe: im Frontend.
> Wenn ich im installt tool das Development Preset aktiviere funktioniert die Ausgabe.
Aktuell ändert ein anderer TYPO3_CONTEXT nichts an der Konfiguration.
Der Preset im Install Tool hat nichts mit dem TYPO3_CONTEXT zu tun, sondern ändert bestimmte Dinge einfach global.
> Ich möchte es aber gerne Per Environment Variable Setzten. Damit es
> sich automatisch ändert sobald das system auf Den staging bzw live server geht.
Das kannst Du aktuell nur dadurch erreichen, dass Du den Context in einer typo3conf/AdditionalConfiguration.php abfragst und dann eine andere Config setzt.
Meine AdditionalConfiguration.php besteht aus genau einer Zeile:
<?php
@include __DIR__ . '/../Configuration/' .
\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext() .
'/Settings.php';
Dafür habe ich einen Configuration Order auf der obersten Ebene mit jeweiligen Settings.php Dateien in entsprechenden Unterordnern:
also z.B.:
Configuration/Development/Local/Settings.php
oder:
Configuration/Production/Staging/Settings.php
Um Host Konfiguration (DB/Image magic pfad, etc) von Production/Development relevanten settings zu trennen ist bei mir in
Configuration/Development/Settings.php
und
Configuration/Production/Settings.php
Auch noch eine Settings.php Datei, die ich einbinde.
Also die Configuration/Development/Local/Settings.php fängt an mit:
<?php
@include __DIR__ . '/../Settings.php';
Ein wenig vorsichtig solltest Du sein mit den shutup operators (@ vor
dem include). Wenn Du in einer includierten Datei einen Fehler einbaust,
dann bekommst Du dann nämlich nix ausgegeben. Ich finde es aber OK und
bequem nicht immer kontrollieren zu müssen ob da auch wirklich eine
Datei liegt, bzw. könnte sie entfernen wenn ich sie nicht brauche.
Nur so als Anregung, vielleicht gefällt es ja :)
Kind regards,
Helmut
--
Helmut Hummel
Release Manager TYPO3 6.0
TYPO3 CMS Active Contributor, TYPO3 Security Team Member
TYPO3 .... inspiring people to share!
Get involved: typo3.org
_______________________________________________
TYPO3-german mailing list
TYPO3-german at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german
More information about the TYPO3-german
mailing list