Ergebnis 1 bis 6 von 6

Thema: hilfe!!! nach installation wird keine php-datei mehr aufgerufen (Strato).

  1. #1
    Contao-Fan
    Registriert seit
    04.02.2010.
    Ort
    Berlin
    Beiträge
    264

    Standard hilfe!!! nach installation wird keine php-datei mehr aufgerufen (Strato).

    hi zusammen,

    ich hänge gerade hier auf einem kundenserver mit einem großen problem.
    ich habe contao 2.9.1 von der lokalen installation auf einen webserver bei strato (strato basicweb xl) umgezogen. die htaccess angepasst, sprich also php5 eingeschaltet, die rewrite base angepasst, da ich die installation vorsichtshalber noch in einen unterordner laufen habe und nun hänge ich. wenn ich die install.php aufrufen will, oder jede andere php-datei, dann wird diese datei nicht im browser geöffnet, sonder der browser will sie downloaden??? hab ich noch nie gehabt. kann mir jemand helfen!

    lg charleen

    edit: ich konnte das problem eingrenzen: ohne .htaccess funktioniert alles, mit .htaccess werden die php.dateien gedownloadet oder als code im browser angezeigt.

    hier die .htaccess:

    Code:
    AddHandler application/x-httpd-php5 .php
    
    ##
    # Contao Open Source CMS
    # Copyright (C) 2005-2010 Leo Feyer
    #
    # Formerly known as TYPOlight Open Source CMS.
    #
    # This program is free software: you can redistribute it and/or
    # modify it under the terms of the GNU Lesser General Public
    # License as published by the Free Software Foundation, either
    # version 3 of the License, or (at your option) any later version.
    # 
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    # Lesser General Public License for more details.
    # 
    # You should have received a copy of the GNU Lesser General Public
    # License along with this program. If not, please visit the Free
    # Software Foundation website at <http://www.gnu.org/licenses/>.
    #
    # PHP version 5
    # @copyright  Leo Feyer 2005-2010
    # @author     Leo Feyer <http://www.contao.org>
    # @license    LGPL
    ##
    
    <IfModule mod_deflate.c>
    
      ##
      # Use mod_deflate to compress JavaScript, CSS and XML files. Do not add
      # PHP and HTML files, because those have already been compressed by Contao.
      ##
      <FilesMatch "\.(css|js|xml)$">
        SetOutputFilter DEFLATE
      </FilesMatch>
    
    </IfModule>
    
    <IfModule mod_headers.c>
    
      ##
      # Add a Vary Accept-Encoding header for the compressed resources. If you
      # modify the file types above, make sure to change them here accordingly.
      ##
      <FilesMatch "\.(js|css|xml|gz)$">
        Header append Vary Accept-Encoding
      </FilesMatch>
    
    </IfModule>
    
    <IfModule mod_expires.c>
      ExpiresActive On
    
      ##
      # Specify an expiration one week in the future for images, JavaScripts and
      # CSS files (as recommended by Google Page Speed). Edit or remove the lines
      # to set up your own expiration logic.
      ##
      ExpiresByType image/png A604800
      ExpiresByType image/gif A604800
      ExpiresByType image/jpg A604800
      ExpiresByType image/jpeg A604800
      ExpiresByType text/javascript A604800
      ExpiresByType application/x-javascript A604800
      ExpiresByType text/css A604800
    
    </IfModule>
    
    <IfModule mod_rewrite.c>
      RewriteEngine On
    
      ##
      # Set the RewriteBase if your Contao installation is in a subdirectoy and
      # the rewrite rules are not working properly. Usage examples:
      #
      #   RewriteBase /contao-2.9.0
      #   RewriteBase /path/to/contao
      #
      # Uncomment the following line to set the RewriteBase.
      ##
      RewriteBase /website  
      # Contao usually does not pass absolute URLs via GET, therefore the
      # following rules block all requests that try to pass a URL or the /etc/
      # directory as parameter (malicious requests).
      ##
      RewriteCond %{REQUEST_URI} (ftp|https?):|/etc/ [NC,OR]
      RewriteCond %{QUERY_STRING} (ftp|https?):|/etc/ [NC]
      RewriteRule .* - [F,L]
    
      ##
      # Uncomment the following lines and replace "domain.com" with your domain
      # name to redirect requests without "www" to the correct domain. 
      ##
      #RewriteCond %{HTTP_HOST} ^domain\.com [NC]
      #RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
    
      ##
      # Do not rewrite requests for static files or folders such as style sheets,
      # images, movies or text documents.
      ##
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
    
      ##
      # By default, Contao adds ".html" to the generated URLs to simulate static
      # HTML documents. If you change the URL suffix in the back end settings, make
      # sure to change it here accordingly!
      #
      #   RewriteRule .*\.html$ index.php [L]   # URL suffix .html
      #   RewriteRule .* index.php [L]          # No URL suffix
      #   RewriteRule .*\.txt$ index.php [L]    # URL suffix .txt
      #
      # If you are using mod_cache, it is recommended to use the RewriteRule below,
      # which adds the query string to the internal URL:
      # 
      #   RewriteRule (.*\.html)$ index.php/$1 [L]
      #
      # Note that not all environments support mod_rewrite and mod_cache!
      ##
      RewriteRule .*\.html$ index.php [L]
    
    </IfModule>
    Geändert von xchs (09.11.2010 um 18:01 Uhr) Grund: Formatierung

  2. #2
    AG CMS-Garden
    Contao-Urgestein
    Avatar von lindesbs
    Registriert seit
    05.06.2009.
    Ort
    Oer-Erkenschwick
    Beiträge
    4.154
    Partner-ID
    keine
    User beschenken
    Wunschliste

    Standard

    Hast du nach dieser Anleitung gearbeitet : http://www.contao-community.de/showt...Installationen

    Suche nach diesem hier :
    Strato:
    Info vom Nutzer "thomask":
    von Willi Voltz aus PR 500: Henry George sagte einmal: »Kultur ist Zusammenarbeit.«


    Contao-Hosting: begeisterter Uberspace-Nutzer

  3. #3
    Contao-Fan
    Registriert seit
    04.02.2010.
    Ort
    Berlin
    Beiträge
    264

    Standard

    Zitat Zitat von lindesbs Beitrag anzeigen
    Hast du nach dieser Anleitung gearbeitet : http://www.contao-community.de/showt...Installationen

    Suche nach diesem hier :
    ja habe ich. ich habe schon öfter auf strato installiert - immer ohne probleme. ich habe jetzt eine htaccess von einer anderen stratoinstallation genommen. nun scheint es zu funktionieren. leider kenne ich mich mit htaccess nicht so aus. ich poste mal die funktionierende:
    Code:
    AddType application/x-httpd-php5 .php
    	
    ##
    # Contao Open Source CMS
    # Copyright (C) 2005-2010 Leo Feyer
    #
    # Formerly known as TYPOlight Open Source CMS.
    #
    # This program is free software: you can redistribute it and/or
    # modify it under the terms of the GNU Lesser General Public
    # License as published by the Free Software Foundation, either
    # version 3 of the License, or (at your option) any later version.
    # 
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    # Lesser General Public License for more details.
    # 
    # You should have received a copy of the GNU Lesser General Public
    # License along with this program. If not, please visit the Free
    # Software Foundation website at <http://www.gnu.org/licenses/>.
    #
    # PHP version 5
    # @copyright  Leo Feyer 2005-2010
    # @author     Leo Feyer <http://www.contao.org>
    # @license    LGPL
    ##
    
    <IfModule mod_rewrite.c>
      RewriteEngine On
    
      ##
      # Rewrite base
      #
      # Set the RewriteBase if your Contao installation is in a subdirectoy and
      # the rewrite rules are not working properly. Usage examples:
      #
      #   RewriteBase /contao-2.9.0
      #   RewriteBase /path/to/contao
      #
      # Uncomment the following line to set the RewriteBase.
      ##
      RewriteBase /website
    
      ##
      # Malicious requests
      #
      # Contao usually does not pass absolute URLs via GET, therefore the
      # following rules block all requests that try to pass a URL or the /etc/
      # directory as parameter.
      ##
      RewriteCond %{REQUEST_URI} (ftp|https?):|/etc/ [NC,OR]
      RewriteCond %{QUERY_STRING} (ftp|https?):|/etc/ [NC]
      RewriteRule .* - [F,L]
    
      ##
      # Require www
      #
      # Uncomment the following lines and replace "domain.com" with your domain
      # name to redirect requests without "www". 
      ##
      #RewriteCond %{HTTP_HOST} ^domain.com [NC]
      #RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
    
      ##
      # Compressed .js and .css files
      #
      # Most of the JavaScript and CSS files used in Contao are also available
      # as compressed .gz version, which requires less bandwidth and optimizes the
      # page loading time. The following rules load these compressed ressources.
      ##
      AddEncoding gzip .gz
      <FilesMatch "\.js\.gz$">
        AddType "text/javascript" .gz
      </FilesMatch>
      <FilesMatch "\.css\.gz$">
        AddType "text/css" .gz
      </FilesMatch>
      RewriteCond %{HTTP:Accept-encoding} gzip
      RewriteCond %{REQUEST_FILENAME} \.(js|css)$
      RewriteCond %{REQUEST_FILENAME}.gz -f
      RewriteRule ^(.*)$ $1.gz [QSA,L]
    
      ##
      # Static ressources
      #
      # Do not rewrite requests for static files or folders such as style sheets,
      # images, movies or text documents.
      ##
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
    
      ##
      # Contao URLs
      #
      # By default, Contao adds ".html" to the generated URLs to simulate static
      # HTML documents. If you change the URL suffix in the back end settings, make
      # sure to change it here accordingly!
      #
      #   RewriteRule .*\.html$ index.php [L]   # URL suffix .html
      #   RewriteRule .* index.php [L]          # No URL suffix
      #   RewriteRule .*\.txt$ index.php [L]    # URL suffix .txt
      #
      # If you are using mod_cache, it is recommended to use the RewriteRule below,
      # which adds the query string to the internal URL:
      # 
      #   RewriteRule (.*\.html)$ index.php/$1 [L]
      #
      # Note that not all environments support mod_rewrite and mod_cache!
      ##
      RewriteRule .*\.html$ index.php [L]
    
    </IfModule>
    Geändert von xchs (09.11.2010 um 18:02 Uhr) Grund: Formatierung

  4. #4
    Administrator Avatar von xchs
    Registriert seit
    19.06.2009.
    Beiträge
    14.557
    User beschenken
    Wunschliste
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Gegebenenfalls auch mal die Anmerkung von planepix probieren:
    Anmerkung von planepix: Alternativ kann man sich im Kundencenter von Strato einloggen und links im Menü unter "Homepagestaltung" die Option "Website-Konfigurator" wählen. Dort gibt es den Punkt "PHP-Konfiguration" mit dem man die PHP-Version fürs Verzeichnis auf PHP5 einstellen kann.
    Contao Community Administrator

    [Unterstützungsmöglichkeiten]

  5. #5
    Contao-Fan
    Registriert seit
    04.02.2010.
    Ort
    Berlin
    Beiträge
    264

    Standard

    vielen dank noch einmal an alle. jetzt funktioniert es. mit der zweiten .htaccess läuft alles reibungslos. ich weiß zwar immer noch nicht warum die erste .htaccess nicht funktioniert, aber hauptsache es läuft erstmal.

    lg charleen

  6. #6
    Contao-Nutzer
    Registriert seit
    21.01.2013.
    Beiträge
    1

    Standard Der Fehler

    Zitat Zitat von charleen Beitrag anzeigen
    vielen dank noch einmal an alle. jetzt funktioniert es. mit der zweiten .htaccess läuft alles reibungslos. ich weiß zwar immer noch nicht warum die erste .htaccess nicht funktioniert, aber hauptsache es läuft erstmal.

    lg charleen
    Dieser Forumbeitrag hat mir viel geholfen, daher habe ich mir die Mühe gemacht den Fehler auch zu suchen:

    Folgendes Code-Fragment ist falsch:

    <FilesMatch "\.(htm|html|php)$">
    SetHandler application/x-httpd-php5
    </FilesMatch>


    In Beispiel1 wird application/x-httpd-php5 angegeben. Der Fehler ist, dass x-httpd-php5 nicht existiert, aber x-httpd-php schon.


    Die Lösung bei mir:

    <FilesMatch "\.(htm|html|php)$">
    SetHandler application/x-httpd-php
    </FilesMatch>

    Werden diese Zeilen einfach auskommentiert, dann funktioniert es auch, weil mein Linux System automatisch diesen eintrag Global setzt.


    Ich glaube hier:

    /etc/apache2/mods-enabled/php5.conf




    <IfModule mod_php5.c>
    <FilesMatch "\.ph(p3?|tml)$">
    SetHandler application/x-httpd-php
    </FilesMatch>
    <FilesMatch "\.phps$">
    SetHandler application/x-httpd-php-source
    </FilesMatch>
    # To re-enable php in user directories comment the following lines
    # (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
    # prevents .htaccess files from disabling it.
    <IfModule mod_userdir.c>
    <Directory /home/*/public_html>
    php_admin_value engine Off
    </Directory>
    </IfModule>
    </IfModule>
    Geändert von xmlseed (21.01.2013 um 18:35 Uhr)

Aktive Benutzer

Aktive Benutzer

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

Ähnliche Themen

  1. ch_flowplayer wird nach entfernen noch im <head> (js) aufgerufen?!?!
    Von codestorm im Forum Sonstige Erweiterungen
    Antworten: 0
    Letzter Beitrag: 16.11.2010, 10:46
  2. Hilfe, Seite wird nicht mehr angezeigt!
    Von smung0r im Forum Installation / Update
    Antworten: 25
    Letzter Beitrag: 25.01.2010, 15:22
  3. Hilfe, CSS nicht mehr beschreibar nach Serverwechsel!
    Von Hueso im Forum Installation / Update
    Antworten: 5
    Letzter Beitrag: 24.01.2010, 13:30
  4. Antworten: 7
    Letzter Beitrag: 13.01.2010, 21:17

Lesezeichen

Lesezeichen

Berechtigungen

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