Ich versuche Contao 3.0.3 gemäß der Anleitung https://contao.org/de/manual/3.0/installation.html auf einem CentOS 5.9 Server zu installieren. Leider scheint in dieser Anleitung irgend etwas wichtiges zu fehlen.
Auf dem Server ist installiert (Auszug aus "rpm -qa"):
Code:
centos-release-5-9.el5.centos.1
httpd-2.2.3-76.el5.centos
mysql-5.5.29-1.el5.remi
php-5.4.11-1.el5.remi
php-cli-5.4.11-1.el5.remi
php-common-5.4.11-1.el5.remi
php-gd-5.4.11-1.el5.remi
php-ldap-5.4.11-1.el5.remi
php-mbstring-5.4.11-1.el5.remi
php-mcrypt-5.4.11-1.el5.remi
php-mysql-5.4.11-1.el5.remi
php-pdo-5.4.11-1.el5.remi
php-php-gettext-1.0.11-4.el5.remi
php-soap-5.4.11-1.el5.remi
phpMyAdmin-3.5.5-1.el5.remi
Es handelt sich um einen Multiuser-Webserver mit name based virtual hosts. Die Benutzer haben ssh-Zugriff, und jeder ist Eigentümer der DocumentRoot(s) seiner Domain(s). Ich habe mich deshalb für das in https://contao.org/de/manual/3.0/ins...o-installieren genannte curl-Kommando entschieden.
Die erste (kleine) Hürde war, dass dieses Kommando alles in ein Unterverzeichnis contao-3.0.3 entpackt hat. Das habe ich durch Umbenennen des ganzen Verzeichnisses korrigiert, sodass der gesamte Schritt 1 bei mir so aussah:
Code:
cd example.com/
curl -L http://install.contao.org | tar -xzp
mv contao-3.0.3 ..
cd ..
mv example.com example.com.OLD
mv contao-3.0.3 example.com
Die zweite (bis jetzt unüberwindliche) Hürde ist, dass sich das Installtool (Schritt 1.a.) nicht aufrufen lässt. Wenn ich im Browser http://www.example.com/contao/install.php aufrufe, erscheint die Fehlerseite:
Code:
Fatal error: Uncaught exception Exception with message Cannot create file "system/cache/language/en/default.php" thrown in /home/ts/example.com/system/modules/core/library/Contao/File.php on line 101
#0 /home/ts/example.com/system/modules/core/library/Contao/System.php(379): Contao\File->__construct('system/cache/la...')
#1 /home/ts/example.com/contao/install.php(52): Contao\System::loadLanguageFile('default')
#2 /home/ts/example.com/contao/install.php(935): InstallTool->__construct()
#3 {main}
und im Apache-Errorlog steht
Code:
[Thu Jan 24 11:56:30 2013] [error] [client 2001:4dd0:f004:8:990b:8060:293c:8ac8] PHP Fatal error: Uncaught exception 'Exception' with message 'Cannot create file "system/cache/language/en/default.php"' thrown in /home/acap/a-cappella-ev.de/system/modules/core/library/Contao/File.php on line 101
Nach dem Hinweis wesentlich weiter hinten im Abschnitt 6. "Den Live-Server konfigurieren" der Installationsanleitung habe ich Contao-Check (contao-check-5.4-0-g8695cba.zip) installiert und ausgeführt. Der Aufruf von http://www.example.com/check/ funktioniert auch und meldet:
Code:
PHP 5.4.11
You can install Contao 2.x
You can install Contao 3.x
Requirements
You can use the Extension Repository. More information …
You can use the Live Update. More information …
You do need the Safe Mode Hack. More information …
Installation
Install the latest Contao version
Validate an existing Contao installation
Der Link "More information" hinter "You do need the Safe Mode Hack" liefert das Ergebnis:
Code:
php.ini settings
The PHP safe_mode is not enabled.
Creating a test folder
The test folder could not be created.
It seems that the PHP process does not have enough permissions to create folders on your server.
Creating a test file
The test file could not be created.
It seems that the PHP process does not have enough permissions to create files on your server.
You do need the Safe Mode Hack on this server.
Den Safe Mode Hack soll ich laut Abschnitt 2. der Installationsanleitung im Installtool aktivieren. Hier beißt sich die Katze in den Schwanz, denn das Installtool kann ich ja nicht aufrufen.
In der FAQ findet sich unter https://contao.org/de/faq/fatal-erro...eate-file.html noch ein alternatives Verfahren, den Safe Mode Hack zu aktivieren. Das lässt sich aber leider auch nicht umsetzen, da weder die Datei system/config/localconfig.php noch die Verzeichnisse system/html und system/log existieren. Im Forum fand ich dazu den Hinweis, die Datei localconfig.php würde durch den Aufruf des Installtools angelegt, womit sich die Katze zum zweitenmal in den Schwanz beißt. (Armes Tier!)
Aus Jux und Dollerei habe ich dann mal probiert, Contao von Contao-Check installieren zu lassen. Zunächst kommt da nur die Meldung, es sei schon installiert, also habe ich die ursprüngliche DocumentRoot (ohne Contao) wiederhergestellt und Contao-Check dort installiert:
Code:
mv example.com example.com.BAD
mv example.com.OLD example.com
mv example.com.BAD/check example.com
dann wieder
http://www.example.com/check/ aufgerufen (Ergebnis wie oben) und auf den Link "Install the latest Contao version" geklickt. Ergebnis:
Code:
Web installer
The automatic installation is not possible on your server due to safe_mode or file permission restrictions.
Letzter Versuch: "chmod 777" auf meiner DocumentRoot (entgegen der ausdrücklichen Warnung in der FAQ) und erneuter Aufruf des Install-Links. Leider auch das ohne Erfolg. Der "More Information"-Link sagt jetzt:
Code:
Safe Mode Hack
php.ini settings
The PHP safe_mode is not enabled.
Creating a test folder
The test folder does not have the correct owner or chmod settings.
The test folder is owned by 48 (should be 512) and has the chmod settings 755 (should be 775, 755 or 750).
Creating a test file
The test file does not have the correct owner or chmod settings.
The test file is owned by 48 (should be 512) and has the chmod settings 644 (should be 664, 644, 660 or 640).
You do need the Safe Mode Hack on this server.
Es bleibt dabei: ich brauche den Safe Mode Hack, habe aber keine Möglichkeit ihn zu aktivieren.
Was habe ich übersehen?
Lesezeichen