Ergebnis 1 bis 17 von 17

Thema: 1&1 Homepage Basic - Cannot modify header information

  1. #1
    Contao-Nutzer
    Registriert seit
    22.08.2011.
    Beiträge
    75

    Standard 1&1 Homepage Basic - Cannot modify header information

    Hallo,

    ich habe ein Problem mit dem oben genannten Hostingpaket von 1und1.
    Ich habe eine Seite auf den 1und1 Server migriert, die zuvor problemlos auf einem anderen Server lief (Contao 3.0).
    Unmittelbar nach dem Umzug der Datenbank und der Daten und den entsprechenden Änderungen in der localconfig.php und der .htaccess (Contao liegt jetzt in einem Unterverzeichnis) hat alles noch funktioniert.
    Ein Tag später erhielt ich dann folgenden Fehler beim Versuch mich im BE anzumelden:

    Code:
    Warning: Cannot modify header information - headers already sent by (output started at /homepages/11/d242611614/htdocs/webseite/system/config/default.php:364) in …/system/modules/core/library/Contao/Template.php on line 277
    #0 [internal function]: __error(2, 'Cannot modify h...', '/homepages/11/d...', 277, Array)
    #1 …/system/modules/core/library/Contao/Template.php(277): header('Vary: User-Agen...', false)
    #2 …/system/modules/core/classes/BackendTemplate.php(156): Contao\Template->output()
    #3 …/contao/index.php(118): Contao\BackendTemplate->output()
    #4 …/contao/index.php(127): Index->run()
    #5 {main}
    
    Warning: Cannot modify header information - headers already sent by (output started at /homepages/11/d242611614/htdocs/webseite/system/config/default.php:364) in …/system/modules/core/library/Contao/Template.php on line 278
    #0 [internal function]: __error(2, 'Cannot modify h...', '/homepages/11/d...', 278, Array)
    #1 …/system/modules/core/library/Contao/Template.php(278): header('Content-Type: t...')
    #2 …/system/modules/core/classes/BackendTemplate.php(156): Contao\Template->output()
    #3 …/contao/index.php(118): Contao\BackendTemplate->output()
    #4 …/contao/index.php(127): Index->run()
    #5 {main}
    Das FE wird gar nicht mehr angezeigt.

    Der Contao-Check findet keine Probleme. Die Installation kann erfolgreich validiert werden.
    Allerdings wir auch hier eine Fehlermeldung angezeigt:
    Code:
    Warning: Invalid argument supplied for foreach() in /homepages/11/d242611614/htdocs/webseite/check/controller/validator.php on line 190
    Der BOM-Checker findet auch keine Problem.

    Hat noch jemand eine Idee wo ich nach dem Problem suchen könnte?

    thx. rttmax

  2. #2
    Contao-Urgestein
    Registriert seit
    30.01.2011.
    Ort
    Stuttgart
    Beiträge
    4.138

    Standard

    contao/install.php aufgerufen? bzw pathconfig.php gecheckt?

  3. #3
    Contao-Nutzer
    Registriert seit
    22.08.2011.
    Beiträge
    75

    Standard

    Nach der Anmeldung im Install Tool bekomme ich Folgendes zu sehen:

    Code:
    Warning: Cannot modify header information - headers already sent by (output started at /homepages/11/d242611614/htdocs/webseite/system/config/default.php:367) in …/system/modules/core/library/Contao/System.php on line 640
    #0 [internal function]: __error(2, 'Cannot modify h...', '/homepages/11/d...', 640, Array)
    #1 …/system/modules/core/library/Contao/System.php(640): setcookie('TL_INSTALL_AUTH', 'f185098f0ca7c0f...', 1384522342, '/', '', false, true)
    #2 …/contao/install.php(725): Contao\System::setCookie('TL_INSTALL_AUTH', 'f185098f0ca7c0f...', 1384522342, NULL, NULL, false, true)
    #3 …/contao/install.php(378): InstallTool->setAuthCookie()
    #4 …/contao/install.php(118): InstallTool->loginUser()
    #5 …/contao/install.php(936): InstallTool->run()
    #6 {main}
    Die pathconfig.php gibt's wohl erst ab Version 3.0.6 (Link). Den Wert websitePath in der localconfig.php hab ich auf '/webseite' gesetzt.
    Egal was ich dort eintrage - keine Änduerung!

  4. #4
    Contao-Urgestein Avatar von Kahmoon
    Registriert seit
    22.06.2009.
    Ort
    München
    Beiträge
    5.280

    Standard

    War diese Fehlermeldung nicht erst vor ein paar Tagen in einem Thread? Da war es der fehlende Safemodehack bzw. die htaccess Einstellung für 1und1 damit man den SMH nicht braucht.

    vg

  5. #5
    Contao-Nutzer
    Registriert seit
    22.08.2011.
    Beiträge
    75

    Standard

    Den Safe Mode Hack habe ich eingerichtet:

    Code:
    $GLOBALS['TL_CONFIG']['useFTP'] = true;
    $GLOBALS['TL_CONFIG']['ftpHost'] = 'ftp.host';
    $GLOBALS['TL_CONFIG']['ftpPath'] = '/webseite/';
    $GLOBALS['TL_CONFIG']['ftpUser'] = '***********';
    $GLOBALS['TL_CONFIG']['ftpPass'] = '***********';
    Meine .htacces entspricht bis auf die RewriteBase der default.htaccess:
    Code:
    ##
    # Contao Open Source CMS
    #
    # Copyright (c) 2005-2013 Leo Feyer
    #
    # @package Core
    # @link    https://contao.org
    # @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
    ##
    
    ##
    # Prevent access to the Contao template files
    ##
    <FilesMatch "\.(tpl|html5|xhtml)$">
      <IfModule !mod_authz_core.c>
        Order deny,allow
        Deny from all
      </IfModule>
      <IfModule mod_authz_core.c>
        Require all denied
      </IfModule>
    </FilesMatch>
    
    ##
    # Allow access from all domains for webfonts
    # @see https://github.com/h5bp/html5-boilerplate
    ##
    <IfModule mod_headers.c>
      <FilesMatch "\.(ttf|ttc|otf|eot|woff|font\.css)$">
        Header set Access-Control-Allow-Origin "*"
      </FilesMatch>
    </IfModule>
    
    ##
    # Disable ETags
    # @see http://developer.yahoo.com/performance/rules.html#etags
    ##
    FileETag None
    <IfModule mod_headers.c>
      Header unset ETag
    </IfModule>
    
    ##
    # Set the proper MIME types
    # @see https://github.com/h5bp/html5-boilerplate
    ##
    <IfModule mod_mime.c>
      AddType application/javascript              js jsonp
      AddType application/json                    json
      AddType audio/ogg                           oga ogg
      AddType audio/mp4                           m4a f4a f4b
      AddType video/ogg                           ogv
      AddType video/mp4                           mp4 m4v f4v f4p
      AddType video/webm                          webm
      AddType video/x-flv                         flv
      AddType image/svg+xml                       svg svgz
      AddEncoding gzip                            svgz
      AddType application/vnd.ms-fontobject       eot
      AddType application/x-font-ttf              ttf ttc
      AddType font/opentype                       otf
      AddType application/x-font-woff             woff
      AddType image/x-icon                        ico
      AddType image/webp                          webp
      AddType text/cache-manifest                 appcache manifest
      AddType text/x-component                    htc
      AddType application/xml                     rss atom xml rdf
      AddType application/x-web-app-manifest+json webapp
      AddType text/x-vcard                        vcf
      AddType application/x-shockwave-flash       swf
    </IfModule>
    
    ##
    # Gzip compression
    # @see https://github.com/h5bp/html5-boilerplate
    ##
    <IfModule mod_deflate.c>
      <IfModule mod_filter.c>
        AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
        AddOutputFilterByType DEFLATE application/javascript
        AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
        AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
        AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
      </IfModule>
    </IfModule>
    
    ##
    # Expires headers (for better cache control)
    # @see https://github.com/h5bp/html5-boilerplate
    ##
    <IfModule mod_expires.c>
      ExpiresActive on
    
      ##
      # Productional website
      ##
      ExpiresByType text/cache-manifest           "access plus 0 seconds"
      ExpiresByType text/html                     "access plus 0 seconds"
      ExpiresByType text/xml                      "access plus 0 seconds"
      ExpiresByType application/xml               "access plus 0 seconds"
      ExpiresByType application/json              "access plus 0 seconds"
      ExpiresByType application/rss+xml           "access plus 1 hour"
      ExpiresByType application/atom+xml          "access plus 1 hour"
      ExpiresByType image/gif                     "access plus 1 month"
      ExpiresByType image/png                     "access plus 1 month"
      ExpiresByType image/jpeg                    "access plus 1 month"
      ExpiresByType image/x-icon                  "access plus 1 month"
      ExpiresByType video/ogg                     "access plus 1 month"
      ExpiresByType audio/ogg                     "access plus 1 month"
      ExpiresByType video/mp4                     "access plus 1 month"
      ExpiresByType video/webm                    "access plus 1 month"
      ExpiresByType text/x-component              "access plus 1 month"
      ExpiresByType application/x-font-ttf        "access plus 1 month"
      ExpiresByType font/opentype                 "access plus 1 month"
      ExpiresByType application/x-font-woff       "access plus 1 month"
      ExpiresByType image/svg+xml                 "access plus 1 month"
      ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
      ExpiresByType text/css                      "access plus 1 year"
      ExpiresByType application/javascript        "access plus 1 year"
    
      ##
      # Disable caching during development
      # @see https://github.com/contao/core/issues/4364
      ##
      #ExpiresByType text/cache-manifest           "access"
      #ExpiresByType text/html                     "access"
      #ExpiresByType text/xml                      "access"
      #ExpiresByType application/xml               "access"
      #ExpiresByType application/json              "access"
      #ExpiresByType application/rss+xml           "access"
      #ExpiresByType application/atom+xml          "access"
      #ExpiresByType image/gif                     "access"
      #ExpiresByType image/png                     "access"
      #ExpiresByType image/jpeg                    "access"
      #ExpiresByType image/x-icon                  "access"
      #ExpiresByType video/ogg                     "access"
      #ExpiresByType audio/ogg                     "access"
      #ExpiresByType video/mp4                     "access"
      #ExpiresByType video/webm                    "access"
      #ExpiresByType text/x-component              "access"
      #ExpiresByType application/x-font-ttf        "access"
      #ExpiresByType font/opentype                 "access"
      #ExpiresByType application/x-font-woff       "access"
      #ExpiresByType image/svg+xml                 "access"
      #ExpiresByType application/vnd.ms-fontobject "access"
      #ExpiresByType text/css                      "access"
      #ExpiresByType application/javascript        "access"
    
    </IfModule>
    
    ##
    # Header adjustments
    ##
    <IfModule mod_headers.c>
    
      ##
      # Disable caching during development
      # @see https://github.com/contao/core/issues/4364
      ##
      #Header unset Cache-Control
      #Header append Cache-Control must-revalidate
    
      ##
      # Do not cache the cron.txt file
      # @see https://github.com/contao/core/issues/5105
      ##
      <FilesMatch "cron\.txt$">
        Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform"
      </FilesMatch>
    
      ##
      # Add a Vary Accept-Encoding header for the compressed resources. If you
      # modify the file types above, make sure to change them here accordingly.
      # @see http://developer.yahoo.com/performance/rules.html#gzip
      #
      # Note: If you are using a case-sensitive file system like HFS+ or ext4, you
      # have to change the <FilesMatch> directive as follows:
      #
      # <FilesMatch "\.(?i:js|css|xml|gz)$">
      #
      # For more information see: https://github.com/contao/core/issues/4364
      ##
      <FilesMatch "\.(js|css|xml|gz|svgz)$">
        Header append Vary Accept-Encoding
      </FilesMatch>
    
    </IfModule>
    
    ##
    # Disable MultiViews if you are having issues with requests returning the wrong
    # page. Requires AllowOverride Options=All,MultiViews to be set here.
    # @see https://github.com/contao/core/issues/3521
    ##
    #Options -MultiViews
    
    ##
    # URL rewriting
    ##
    <IfModule mod_rewrite.c>
      RewriteEngine On
    
      ##
      # Change the RewriteBase if your Contao installation is in a subdirectoy and
      # the rewrite rules are not working properly. Usage examples:
      #
      #   RewriteBase /contao-3.0.0
      #   RewriteBase /path/to/contao
      #
      # Depending on your server, you might have to remove the line entirely.
      ##
      RewriteBase /webseite/
    
      ##
      # Uncomment the following lines to add "www." to the domain:
      #
      #   RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
      #   RewriteRule (.*) http://www.example.com/$1 [R=301,L]
      #
      # Uncomment the following lines to remove "www." from the domain:
      #
      #   RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
      #   RewriteRule (.*) http://example.com/$1 [R=301,L]
      #
      # Make sure to replace "example.com" with your domain name.
      ##
    
      ##
      # If you cannot use mod_deflate, uncomment the following lines to load a
      # compressed .gz version of the aggregated Contao JavaScript and CSS files.
      ##
      #AddEncoding gzip .gz
      #<FilesMatch "\.js\.gz$">
      #  AddType "application/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]
    
      ##
      # Do not rewrite requests for static files or folders such as style sheets,
      # images, movies or text documents. Do not add the URL suffix here!
      #
      # Note: If you are using a case-sensitive file system like HFS+ or ext4, you
      # have to change the <FilesMatch> directive as follows:
      #
      # <FilesMatch "\.(?i:htm|php|js|css| … |gz)$">
      #
      # For more information see: https://github.com/contao/core/issues/4364
      ##
      <FilesMatch "\.(htm|php|js|css|htc|png|gif|jpe?g|ico|xml|csv|txt|swf|flv|mp4|webm|ogv|mp3|ogg|oga|eot|woff|svg|svgz|ttf|pdf|gz)$">
        RewriteEngine Off
      </FilesMatch>
    
      ##
      # 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 .*\.txt$ index.php [L]    # URL suffix .txt
      #   RewriteRule .*\.json$ index.php [L]   # URL suffix .json
      #
      # If you do not want to use an URL suffix at all, you have to add a second
      # line to prevent URLs that point to folders from being rewritten (see #4031).
      #
      #   RewriteCond %{REQUEST_FILENAME} !-d
      #   RewriteRule .* index.php [L]
      #
      # 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.
      ##
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule .*\.html$ index.php [L]
    
      ##
      # The following rules are required if you want to pass the language as first
      # URL parameter (added in Contao 2.11). The first rule rewrites an empty URL
      # to the front end controller, the second one adds a missing trailing slash.
      ##
      RewriteRule ^[a-z]{2}(\-[A-Z]{2})?/$ index.php [L]
      RewriteRule ^([a-z]{2}(\-[A-Z]{2})?)$ $1/ [R=301,L]
    
    </IfModule>
    Hast du einen Link zu dem anderen Thread?

  6. #6

  7. #7
    Contao-Urgestein
    Registriert seit
    30.01.2011.
    Ort
    Stuttgart
    Beiträge
    4.138

    Standard

    schaust du bitte hier

    übrigens die Rewriterule sollte ohne slash am Ende sein sonst könnten die überall doppelt auftauchen...

    Welche php Version zeigt den der check an?

    Und noch zu guter letzt solltest Du im Backend die php Version geändert haben, wird die .htaccess neu geschrieben und eventuell ist die angelegt Version dann weg... also aufpassen!!!
    Geändert von magicsepp (15.11.2013 um 13:57 Uhr)

  8. #8
    Contao-Nutzer
    Registriert seit
    22.08.2011.
    Beiträge
    75

    Standard

    Auch ohne SMH klappt's leider nicht. PHP Version ist 5.4.21..
    Den slash in der htaccess habe ich verschwinden lassen.

    Komisch ist, das die Seite ja schon lief - ohne das ich aktiv etwas verändert habe plötzlich nicht mehr.

  9. #9
    Contao-Urgestein Avatar von Kahmoon
    Registriert seit
    22.06.2009.
    Ort
    München
    Beiträge
    5.280

    Standard

    Schau mal hier steht ein Zusatz für 1und1 und die htaccess

    http://de.contaowiki.org/1_und_1_Internet#Upload_Contao

    AddType x-mapp-php5 .php
    AddHandler x-mapp-php5 .php

    Hinweis: Die beiden Zeilen Addtype
    und AddHandler werden ab php5.4 nicht mehr benötigt. Damit wird die php
    Version 5.2.xx unabhängig von den Control-Center Einstellungen
    vorgenommen.

    #AddType x-mapp-php5 .php
    AddHandler x-mapp-php6 .php3 .php4 .php .phtml
    Geändert von Kahmoon (15.11.2013 um 14:14 Uhr)

  10. #10
    Contao-Urgestein
    Registriert seit
    30.01.2011.
    Ort
    Stuttgart
    Beiträge
    4.138

    Standard

    das riecht nach Cache der durch den daily cron erneuert wurde....

  11. #11
    Contao-Nutzer
    Registriert seit
    22.08.2011.
    Beiträge
    75

    Standard

    Welcher Cache? Und was kann ich dagegen tun?

  12. #12
    Contao-Urgestein
    Registriert seit
    30.01.2011.
    Ort
    Stuttgart
    Beiträge
    4.138

    Standard

    Der System Cache - Contao richtig einstellen ist vermutlich die Lösung.

  13. #13
    Contao-Nutzer
    Registriert seit
    22.08.2011.
    Beiträge
    75

    Standard

    Ok. Und was muss ich wo einstellen?
    Danke für eure Hilfe.

  14. #14
    Contao-Urgestein
    Registriert seit
    30.01.2011.
    Ort
    Stuttgart
    Beiträge
    4.138

    Standard

    für die Nachwelt: hier hatte sich üble Malware im System breit gemacht.

  15. #15
    Contao-Nutzer
    Registriert seit
    10.04.2010.
    Ort
    Stuttgart
    Beiträge
    25

    Standard

    Könntest du kurz beschreiben, wo die sich im System breit gemacht hat?

    Ich sitze nämlich gerade an einem ähnlichen Problem.
    Viele Grüße
    Oliver Schroth

  16. #16
    Contao-Urgestein
    Registriert seit
    30.01.2011.
    Ort
    Stuttgart
    Beiträge
    4.138

    Standard

    In sämtlichen index Files war zusätzlicher Code der per iframe eine Webseite aufgerufen hat und weitere Files waren korrupt die schnell mit dem Contao-Check ausfindig gemacht werden konnten.
    Geändert von magicsepp (26.11.2013 um 09:47 Uhr)

  17. #17
    Contao-Nutzer
    Registriert seit
    28.11.2013.
    Ort
    Haltern
    Beiträge
    1

    Standard

    hast du danach trotzdem ein sauberes Backup eingespielt, oder es so gelassen?
    Diese Frame-injections sind sehr tückisch, hatte ich auch schon mal Ärger mit..

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
  •