Ergebnis 1 bis 1 von 1

Thema: Contao 4.4.1 Local mit XAMPP installieren (Win 7 auch für Win 10) so haut es hin.

  1. #1
    Contao-Fan
    Registriert seit
    17.11.2011.
    Ort
    Basel (Schweiz)
    Beiträge
    295

    Standard Contao 4.4.1 Local mit XAMPP installieren (Win 7 auch für Win 10) so haut es hin.

    Guten Morgen

    Ich habe eine Contao 4.4.1 Version lokal auf XAMPP 7.1.7 installiert welche funktioniert.

    1. XAMPP downloaden
    https://www.apachefriends.org/de/index.html
    xampp-win32-7.1.7-0-VC14-installer.xxx)
    und installieren

    2. XAMPP httpd-vhosts.conf konfigurieren

    Inhalt von httpd-vhosts.conf in
    c:\xampp\apache\conf\extra\httpd-vhosts.conf oder anderes Volumen wo Eure Xampp installation sich befindet
    Code:
    # Virtual Hosts
    #
    # Required modules: mod_log_config
    
    # If you want to maintain multiple domains/hostnames on your
    # machine you can setup VirtualHost containers for them. Most configurations
    # use only name-based virtual hosts so the server doesn't need to worry about
    # IP addresses. This is indicated by the asterisks in the directives below.
    #
    # Please see the documentation at 
    # <URL:http://httpd.apache.org/docs/2.4/vhosts/>
    # for further details before you try to setup virtual hosts.
    #
    # You may use the command line option '-S' to verify your virtual host
    # configuration.
    
    #
    # Use name-based virtual hosting.
    #
    ##NameVirtualHost *:80
    #
    # VirtualHost example:
    # Almost any Apache directive may go into a VirtualHost container.
    # The first VirtualHost section is used for all requests that do not
    # match a ##ServerName or ##ServerAlias in any <VirtualHost> block.
    #
    ##<VirtualHost *:80>
    		##ServerAdmin webmaster@dummy-host.example.com
    		##DocumentRoot "C:/xampp/htdocs/dummy-host.example.com"
    		##ServerName dummy-host.example.com
    		##ServerAlias www.dummy-host.example.com
    		##ErrorLog "logs/dummy-host.example.com-error.log"
    		##CustomLog "logs/dummy-host.example.com-access.log" common
    ##</VirtualHost>
    
    ##<VirtualHost *:80>
    		##ServerAdmin webmaster@dummy-host2.example.com
    		##DocumentRoot "C:/xampp/htdocs/dummy-host2.example.com"
    		##ServerName dummy-host2.example.com
    		##ErrorLog "logs/dummy-host2.example.com-error.log"
    		##CustomLog "logs/dummy-host2.example.com-access.log" common
    ##</VirtualHost>
    
    
    ## Dies funktioniert
    	<VirtualHost *:80>
    		DocumentRoot C:\xampp\htdocs\contao_4\web
    		ServerName contao4.localhost   // muss nicht mit z.B contao_4 (Root der Contao Installation) übereinstimmen, DocumentRoot C:\xampp\htdocs\contao_44x\web ist massgebend.
    		DirectoryIndex index.html index.php
    		<Directory "C:\xampp\htdocs\contao_4">
    			Options Indexes FollowSymLinks Includes ExecCGI
    			Order allow,deny
    			Allow from all
    			AllowOverride All
    		</Directory>
     </VirtualHost>
    3. php.ini in c:\xampp\php\php.ini oder in anderem Volumen, wo sich Eure XAMPP installation befindet modifizieren:
    Code:
    	
    max_execution_time=300
    memory_limit=256M
    post_max_size=256M         // ist für sql Datenbank import wichtig
    upload_max_filesize=256M 	//  ist für sql Datenbank import wichtig
    
    ; Windows Extensions
    ; Note that ODBC support is built in, so no dll is needed for it.
    ; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5+)
    ; extension folders as well as the separate PECL DLL download (PHP 5+).
    ; Be sure to appropriately set the extension_dir directive.
    ;
    ; aktiviert am 21.07.2017 gukam
    extension=php_intl.dll
    
    ; The MIBS data available in the PHP distribution must be installed.
    ; See http://www.php.net/manual/en/snmp.installation.php
    
    ;extension=php_snmp.dll
    ; aktiviert am 21.07.2017 gukam
    extension=php_soap.dll
    4. hosts in c:\Windows\System32\drivers\etc\hosts sieht bei mir so aus.
    Code:
    	
    # Copyright (c) 1993-2009 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    #      102.54.94.97     rhino.acme.com          # source server
    #       38.25.63.10     x.acme.com              # x client host
    
    # localhost name resolution is handled within DNS itself.
    # 127.0.0.1       localhost   /  muss nicht auskommentiert werden
    #	::1             localhost
    5. Composer downloaden brauchen wir wenn wir Erweiterungen installieren (wollen, müssen)
    https://getcomposer.org/download/ (Den Windows Installer wählen!)
    und loakal installieren

    6. Die zip Version von Contao 4.4.x von contao.org donwloaden und
    nach C:\xampp\htdocs\contao_441\ entpacken (Verzeichnnis muss mit DocumentRoot C:\xampp\htdocs\contao_441\ in Windows\System32\drivers\etc\hosts übereinstimmen!
    sonst haut es nicht hin

    7. XAMPP im Admin Modus starten und eine Datenbank erstellen

    8. Jetzt Contao installieren
    Im Broswer http://localhost/app_dev.php/contao/install eingeben.
    Das Install Tool wird jetzt wie gewohnt, also z.B. wie in Contao 3.5.xx erscheinen

    Benutzer ist root
    Passwort leer lassen oder wenn gewünscht Euer Passwort / Ich benutze Local immer keines

    Erweiterungen installieren
    Es gibt dazu auch ein Video auf Youtube https://www.youtube.com/watch?v=oZMjVofBKls

    Will man jetzt oder auch später Erweiterungen installieren (gilt nur für Contao 4.4.x kompatible Erweiterunegn), geht dies folgendermassen:

    Es gibt eine Webseite https://packagist.org
    Dort kann man Erweiterungen oder jetzt heissen die Dinger ja Packete, suchen. Wenn gefunden kann man oben links den Befehl für den composer kopieren und in der cmd Konsole (Windows Eingabe Aufforderung) einfügen.

    Windows Eingabe Aufforderung als Admin starten und mit
    cd c:\xampp\htdocs\contao_4 (oder Eurer Verzeichnis) immer ins Root Verzeichnis der Contao Installation, nicht in das /web Verzeichnis wechseln !!!

    Die Windows Eingabe Aufforderung kann während der ganzen Installations Prozedur geöffnet bleiben

    Beispiel:
    composer in der Eingabe Aufforderung starten, also einfach composer eingeben, dann weiss man dass composer local verfügbar ist.
    Und jetzt wenn man z.B die rocksolid-columns Erweiterung installieren möchte,
    composer require madeyourday/contao-rocksolid-columns

    Nach jeder Installation einer Erweiterung (Packet) oder Deinstallation unbedingt das Install Tool aufrufen und Datenbank aktualisieren!!!

    usw.
    composer require madeyourday/contao-rocksolid-slider
    composer require madeyourday/contao-rocksolid-frontend-helper
    composer require madeyourday/contao-rocksolid-theme-assistant

    Will man eine Contao 4.4.x Erweiterung wieder loswerden geht dies folgendermassen:
    composer remove (Paketname) also z.B. composer remove madeyourday/contao-rocksolid-slider

    Direktes Login in das Contao 4.4.x Backend:
    Im Browser http://localhost/contao/login eingeben

    Auch noch nützlich, Tip von BugBuster, Danke!
    Wenn man den Cache leeren möchte oder muss.
    php vendor/bin/contao-console cache:clear -e=prod --no-warmup
    php vendor/bin/contao-console cache:warmup -e prod

    Wichtig ist auch noch:

    In c:\xampp\htdocs\contao_4\app\config\
    dürfen in der Datei parameters.yml keine TABS (Tabulatoren) benutzt werden!
    Wird bei Verwendung von php vendor/bin/contao-console cache:clear -e=prod --no-warmup moniert!

    Achtung !!!
    Eine local auf Xampp laufende Contao 4.4.x Version mit Win 7, Win 10 weiss ich nicht und will ich auch nicht, unter keinen Umständen mit Windows Explorer oder auch z.B mit Total Commander, den ich schon seit Windows 3.11 (1992) benutze , in einen anderes Verzeichnis kopieren/verschieben. Damit gibt es Probleme mit den (ich hasse sie) Sym-Links!!! Es gibt aber eine elegante Lösung.

    Die elegante Lösung:
    Windows Eingabeauforderung als Admin öffnen.
    xcopy /? starten, zeigt dann die Optionen:

    Und nun das Kopieren in ein anderes Volumen (z.B für Backup) mit:
    xcopy d:\xampp717\htdocs\contao_441_1 c:\xampp\htdocs\contao_441_1 /S /E /I /H /B /J
    (Pfade natürlich an Eure Gegebenheiten anpassen)

    Es funktioniert tatsächlich, null Probleme mit den Sym-Links. Das liebe xcopy macht es möglich. Jetzt mach es langsam Spass mit Contao 4.4.1 lokal zu arbeiten.

    Viel Spass
    pumukel
    (Rechtschreibefehler (Text) möge man mir nachsehen, aber jetzt gehe ich schlafen.
    Geändert von pumukel (02.09.2017 um 17:10 Uhr) Grund: Fehler Korrektur: in php.ini war extension=php_soap.dll zweimal aktiviert.

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •