• Gelöst stormez

    (@stormez)


    Hallo,

    ich schon wieder 🙂

    Ich hatte ja nun erfolgreich SSL installiert. Alles gut so weit nach der Hilfe hier. Nun ist da aber ein andere Problem. Nach dem ich mit Yoast SEO meine seite Google freundlich gemacht habe bekomme ich nun 500 Error und kann nicht ins Admin Backend.

    Die Console spuckt nach folgendem Befehl diesen Log aus:

    sudo tail /var/log/apache2/error.log

    [Tue Feb 02 22:06:33.339896 2021] [php7:error] [pid 28354] [client 95.90.214.5:22324] PHP Parse error: syntax error, unexpected ‚if‘ (T_IF), expecting ‚)‘ in /var/www/html/wp-config.php on line 87, referer: https://nicks-fight-fitness.com/trainerteam/
    [Tue Feb 02 22:06:33.639870 2021] [php7:error] [pid 28344] [client 95.90.214.5:22347] PHP Parse error: syntax error, unexpected ‚if‘ (T_IF), expecting ‚)‘ in /var/www/html/wp-config.php on line 87, referer: https://nicks-fight-fitness.com/
    [Tue Feb 02 22:06:35.374618 2021] [php7:error] [pid 28439] [client 95.90.214.5:22332] PHP Parse error: syntax error, unexpected ‚if‘ (T_IF), expecting ‚)‘ in /var/www/html/wp-config.php on line 87, referer: https://nicks-fight-fitness.com/
    [Tue Feb 02 22:06:39.428115 2021] [php7:error] [pid 28446] [client 95.90.214.5:22383] PHP Parse error: syntax error, unexpected ‚if‘ (T_IF), expecting ‚)‘ in /var/www/html/wp-config.php on line 87
    [Tue Feb 02 22:06:54.717666 2021] [mpm_prefork:notice] [pid 28480] AH00173: SIGHUP received. Attempting to restart
    [Tue Feb 02 22:06:54.775657 2021] [ssl:warn] [pid 28480] AH01909: http://www.nicks-fight-fitness.com:443:0 server certificate does NOT include an ID which matches the server name
    [Tue Feb 02 22:06:54.782241 2021] [mpm_prefork:notice] [pid 28480] AH00163: Apache/2.4.25 (Debian) OpenSSL/1.0.2u configured — resuming normal operations
    [Tue Feb 02 22:06:54.782292 2021] [core:notice] [pid 28480] AH00094: Command line: ‚/usr/sbin/apache2‘
    [Tue Feb 02 22:06:58.036295 2021] [core:alert] [pid 28647] [client 95.90.214.5:22336] /var/www/html/.htaccess: Invalid command ‚Header‘, perhaps misspelled or defined by a module not included in the server configuration
    [Tue Feb 02 22:06:58.182468 2021] [core:alert] [pid 28650] [client 95.90.214.5:22357] /var/www/html/.htaccess: Invalid command ‚Header‘, perhaps misspelled or defined by a module not included in the server configuration, referer: https://nicks-fight-fitness.com/

    Ich kann mir darauf leider keinen Reim machen.

    Vielen Dank 🙂

    Die Seite, für die ich Hilfe brauche: [Anmelden, um den Link zu sehen]

Ansicht von 8 Antworten – 1 bis 8 (von insgesamt 8)
  • Moderator Bego Mario Garde

    (@pixolin)

    Moderator (nicht mehr aktiv)

    Poste doch mal den Inhalt der wp-config.php (vor dem Absenden die Zeilen mit Zugangsdaten und SALT-Keys löschen) und der .htaccess. Dann können wir uns das mal anschauen.

    Thread-Starter stormez

    (@stormez)

    <?php
    define( 'WP_MEMORY_LIMIT', '256M' );
    /**
     * The base configuration for WordPress
     *
     * The wp-config.php creation script uses this file during the
     * installation. You don't have to use the web site, you can
     * copy this file to "wp-config.php" and fill in the values.
     *
     * This file contains the following configurations:
     *
     * * MySQL settings
     * * Secret keys
     * * Database table prefix
     * * ABSPATH
     *
     * @link https://wordpress.org/support/article/editing-wp-config-php/
     *
     * @package WordPress
     */
    
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define( 'DB_NAME', 'wp' );
    
    /** MySQL database username */
    define( 'DB_USER', '' );
    
    /** MySQL database password */
    define( 'DB_PASSWORD', '' );
    
    /** MySQL hostname */
    define( 'DB_HOST', '' );
    
    /** Database Charset to use in creating database tables. */
    define( 'DB_CHARSET', '' );
    
    /** The Database Collate type. Don't change this if in doubt. */
    define( 'DB_COLLATE', '' );
    
    /**#@+
     * Authentication Unique Keys and Salts.
     *
     * Change these to different unique phrases!
     * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
     * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
     *
     * @since 2.6.0
     */
    define( 'AUTH_KEY',         '' );
    define( 'SECURE_AUTH_KEY',  '' );
    define( 'LOGGED_IN_KEY',    '' );
    define( 'NONCE_KEY',        '' );
    define( 'AUTH_SALT',        '' );
    define( 'SECURE_AUTH_SALT', '' );
    define( 'LOGGED_IN_SALT',   '' );
    define( 'NONCE_SALT',       '' );
    
    /**#@-*/
    
    /**
     * WordPress Database Table prefix.
     *
     * You can have multiple installations in one database if you give each
     * a unique prefix. Only numbers, letters, and underscores please!
     */
    $table_prefix = 'wp_';
    
    /**
     * For developers: WordPress debugging mode.
     *
     * Change this to true to enable the display of notices during development.
     * It is strongly recommended that plugin and theme developers use WP_DEBUG
     * in their development environments.
     *
     * For information on other constants that can be used for debugging,
     * visit the documentation.
     *
     * @link https://wordpress.org/support/article/debugging-in-wordpress/
     */
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false
    
    /* That's all, stop editing! Happy publishing. */
    
    /** Absolute path to the WordPress directory. */
    if ( ! defined( 'ABSPATH' ) ) {
    	define( 'ABSPATH', __DIR__ . '/' );
    }
    
    /** Sets up WordPress vars and included files. */
    require_once ABSPATH . 'wp-settings.php';
    
    define('FS_METHOD','direct');
    # BEGIN WordPress
    # Die Anweisungen (Zeilen) zwischen „BEGIN WordPress“ und „END WordPress“ sind
    # dynamisch generiert und sollten nur über WordPress-Filter geändert werden.
    # Alle Änderungen an den Anweisungen zwischen diesen Markierungen werden überschrieben.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    #StartPagespeedCache#
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/css 'access 1 month'
    ExpiresByType text/html 'access 1 month'
    ExpiresByType text/xml 'access 1 month'
    ExpiresByType text/javascript 'access 1 month'
    ExpiresByType text/x-javascript 'access 1 month'
    ExpiresByType image/jpg 'access 1 year'
    ExpiresByType image/jpeg 'access 1 year'
    ExpiresByType image/gif 'access 1 year'
    ExpiresByType image/png 'access 1 year'
    ExpiresByType image/webp 'access 1 year'
    ExpiresByType image/svg+xml 'access plus 1 month'
    ExpiresByType image/x-icon 'access 1 year'
    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 application/pdf 'access 1 month'
    ExpiresByType application/x-font-woff 'access 1 month'
    ExpiresByType application/x-font-woff2 'access 1 month'
    ExpiresByType application/vnd.ms-fontobject 'access 1 month'
    ExpiresByType application/x-shockwave-flash 'access 1 month'
    ExpiresByType application/vnd.ms-fontobject 'access 1 month'
    ExpiresByType application/xml 'access 1 month'
    ExpiresByType application/json 'access 1 month'
    ExpiresByType application/rss+xml 'access 1 month'
    ExpiresByType application/rss+xml 'access 1 month'
    ExpiresDefault 'access 2 month'
    </IfModule>
    # EndPagespeedCache#
    #StartPagespeedGzip
    <ifmodule mod_deflate.c>
      AddOutputFilterByType DEFLATE application/javascript
      AddOutputFilterByType DEFLATE application/rss+xml
      AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
      AddOutputFilterByType DEFLATE application/x-font
      AddOutputFilterByType DEFLATE application/x-font-opentype
      AddOutputFilterByType DEFLATE application/x-font-otf
      AddOutputFilterByType DEFLATE application/x-font-truetype
      AddOutputFilterByType DEFLATE application/x-font-ttf
      AddOutputFilterByType DEFLATE application/x-javascript
      AddOutputFilterByType DEFLATE application/xhtml+xml
      AddOutputFilterByType DEFLATE application/xml
      AddOutputFilterByType DEFLATE font/opentype
      AddOutputFilterByType DEFLATE font/otf
      AddOutputFilterByType DEFLATE font/ttf
      AddOutputFilterByType DEFLATE font/woff
      AddOutputFilterByType DEFLATE font/woff2
      AddOutputFilterByType DEFLATE image/svg+xml
      AddOutputFilterByType DEFLATE image/x-icon
      AddOutputFilterByType DEFLATE text/css
      AddOutputFilterByType DEFLATE text/html
      AddOutputFilterByType DEFLATE text/javascript
      AddOutputFilterByType DEFLATE text/plain
      AddOutputFilterByType DEFLATE text/xml
    
      # Remove browser bugs (only needed for really old browsers)
      BrowserMatch ^Mozilla/4 gzip-only-text/html
      BrowserMatch ^Mozilla/4\.0[678] no-gzip
      BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
      Header append Vary User-Agent
    </ifmodule>
    <filesMatch '.(ico|pdf|flv|jpg|jpeg|png|gif|svg|js|css|swf|woff|woff2)$'>
    Header set Cache-Control 'max-age=31557600, public'
    </filesMatch>
    <ifModule mod_headers.c>
    Header set Connection keep-alive
    Header set no-cache '1'
    Header set Set-Cookie 'NO_CACHE=1; path=/;'
    Header set Cache-Control 'max-age=31536000, public'
    </ifModule>
    #ENdPagespeedGzip
    # END WordPress

    Hoffe das passt so

    Hallo,
    das Problem könnte mit der .htaccess zusammenhängen. Der WordPress-Block sollte immer am Ende stehen.
    Teste doch mal bitte, was passiert, wenn du den folgenden Block ans Ende vor # END WordPress setzt:

    # BEGIN WordPress
    # Die Anweisungen (Zeilen) zwischen „BEGIN WordPress“ und „END WordPress“ sind
    # dynamisch generiert und sollten nur über WordPress-Filter geändert werden.
    # Alle Änderungen an den Anweisungen zwischen diesen Markierungen werden überschrieben.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    Hilfreich könnte auch eine neue .htaccess sein:

    • verbinde dich mit deinem Server über FTP
    • suche die .htaccess-Datei in deinem Stammordner
    • lade eine Kopie der Datei auf deinen Computer (als Sicherung)
    • lösche die .htaccess-Datei von deinem Server, nachdem du eine Sicherungskopie auf deinem lokalen Computer hast.

    Um WordPress zu zwingen, eine neue, saubere .htaccess-Datei zu erzeugen:

    • gehe zu den Einstellungen > Permalinks in deinem WordPress Dashboard
    • unten auf der Seite klicken: auf Änderungen speichern (du musst keine Änderungen vornehmen – klicke einfach auf die Schaltfläche).

    Sollte das nicht zum Erfolg führen, kannst du auch deine Zugangsdaten in eine frische wp-config-sample.php (ist im Installations-Paket von WordPress enthalten) eintragen und diese Datei (nach Sicherung der alten Datei) per FTP auf deinen Server übertragen.
    Viele Grüße
    Hans-Gerd

    Thread-Starter stormez

    (@stormez)

    Vielen Dank für die Antwort. Ich hatte mich jetzt dazu entschieden, WP neu aufzusetzen. Ich hatte eine Frische Backup Kopie von gestern, weshalb ich nicht so viel verloren habe. Aber das ist natürlich eine Gute Idee 🙂

    Ist es denn Grundsätzlich möglich das ein ein 500er Fehler kommt aufgrund von Yoast SEO?

    Aber ich denke dann hat sich das Thema oben gegessen 🙂 Daher immer schön Backups machen 🙂

    Hallo,

    Ist es denn Grundsätzlich möglich das ein ein 500er Fehler kommt aufgrund von Yoast SEO?

    Grundsätzlich kann man das sicher nicht bestätigen: Wir setzen YOAST (neben Rank Math) auf einigen Webseiten ein, ohne dass es Probleme gibt. Aber je nach Konfiguration kann es natürlich immer mal Schwierigkeiten geben.
    Backups sind immer extrem wichtig. Wir nutzen dazu UpdraftPlus und haben bis dato gute Erfahrungen damit gemacht.
    Denkst du bitte daran, das Thema dann auch als gelöst zu markieren, wenn das Thema für dich erledigt ist. Danke.
    Viele Grüße
    Hans-Gerd

    Thread-Starter stormez

    (@stormez)

    Vielen Dank für die Hilfe. Ich denke ich werde eh wieder mal ein Problem haben, spätestens dann hört Ihr wieder was von mir 🙂

    Moderator Bego Mario Garde

    (@pixolin)

    Moderator (nicht mehr aktiv)

    In der wp-config.php fehlt etwas bei

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false
    
    /* That's all, stop editing! Happy publishing. */

    Änder das mit einem geeigneten Code-Editor (z.B. VS Code, kostenlos für alle Betriebssysteme erhältlich) auf

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
    
    /* That's all, stop editing! Happy publishing. */

    Nachtrag: Ich hab zu spät gesehen, dass du die Installation neu aufgesetzt hast. So geht es natürlich auch.

    • Diese Antwort wurde geändert vor 4 Jahren, 1 Monat von Bego Mario Garde. Grund: Nachtrag

    Hallo @pixolin,

    Ändere das mit einem geeigneten Code-Editor (z.B. VS Code, kostenlos für alle Betriebssysteme erhältlich) auf

    stimmt – hatte ich übersehen.
    Viele Grüße
    Hans-Gerd

Ansicht von 8 Antworten – 1 bis 8 (von insgesamt 8)
  • Das Thema „Plötzlich 500 Error“ ist für neue Antworten geschlossen.