Support » Fixing WordPress » Parse error: syntax error, unexpected end of file in …

  • Hi, could you please help me out with this message? It shows up when I go to my url.

    Parse error: syntax error, unexpected end of file in /homepages/45/d4295164981/htdocs/dominik-matzka.de/wp-includes/pluggable.php on line 547

    I’ve checked out the described file and compared it to older versions, but couldn’t find any difference in line 547.

    Here’s the code, from line 535 to 548:

    /**
    * Filters whether a set of user login credentials are valid.
    *
    * A WP_User object is returned if the credentials authenticate a user.
    * WP_Error or null otherwise.
    *
    * @since 2.8.0
    * @since 4.5.0 $username now accepts an email address.
    *
    * @param null|WP_User|WP_Error $user WP_User if the user is authenticated.
    * WP_Error or null otherwise.
    * @param string $username Username or email address.
    * @param string $password User password
    */

    Thanks in advance!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • There is no end of file in wp-includes/pluggable.php:547, that file in fact is 2887 lines long.

    On line 547 is not the code that you mention, but this code:
    https://github.com/WordPress/WordPress/blob/master/wp-includes/pluggable.php#L547

    Thus, is very likely that your WordPress install is somehow corrupted or very, very outdated.

    The code you mention instead is on line 580 forwards…

    I would, if you can reach the WP Admin Area somehow, try to re-install WordPress under the Dashboard > Updates menu, and if you can’t reach the WP Admin area, then log in to your FTP account, locate the Install and replace everything unless the below listed files and folders with a fres WordPress Install.

    1. You can get a fresh WordPress Install here https://wordpress.org/download/
    2. You should replace all files and folders on your FTP WordPress Install with the files and folders from the fresh download, UNLESS these:
    – wp-content folder
    – wp-config.php file
    – .htaccess file

    Please make a good backup of the FTP Files before you proceed.

    Thread Starter hinemann

    (@hinemann)

    Hello Beda, thanks a lot!
    Just done the replacement work, and the situation has changed. While I still can’t log into my admin page, several new error messages keep appearing.
    This one shows up when I go to my url:

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function WPGlobus_YoastSEO::filter__wpseo_schema_person(), 2 passed in /homepages/45/d4295164981/htdocs/dominik-matzka.de/wp-includes/class-wp-hook.php on line 303 and exactly 4 expected in /homepages/45/d4295164981/htdocs/dominik-matzka.de/wp-content/plugins/wpglobus/includes/vendor/yoast-seo/class-wpglobus-yoastseo140.php:274 Stack trace: #0 /homepages/45/d4295164981/htdocs/dominik-matzka.de/wp-includes/class-wp-hook.php(303): WPGlobus_YoastSEO::filter__wpseo_schema_person(Array, Object(Yoast\WP\SEO\Context\Meta_Tags_Context)) #1 /homepages/45/d4295164981/htdocs/dominik-matzka.de/wp-includes/plugin.php(189): WP_Hook->apply_filters(Array, Array) #2 /homepages/45/d4295164981/htdocs/dominik-matzka.de/wp-content/plugins/wordpress-seo/src/generators/schema-generator.php(146): apply_filters('wpseo_schema_pe...', Array, Object(Yoast\WP\SEO\Context\Meta_Tags_Context)) #3 /homepages/45/d4295164981/htdocs/dominik-matzka.de/wp-content/plugins/wordpress-seo/src/generato in /homepages/45/d4295164981/htdocs/dominik-matzka.de/wp-content/plugins/wpglobus/includes/vendor/yoast-seo/class-wpglobus-yoastseo140.php on line 274

    On the admin page, I get these:

    Warning: array_key_exists() expects parameter 2 to be array, string given in /homepages/45/d4295164981/htdocs/dominik-matzka.de/wp-content/plugins/mp3-music-player-by-sonaar/admin/class-sonaar-music-admin.php on line 1284
    
    Warning: Cannot modify header information - headers already sent by (output started at /homepages/45/d4295164981/htdocs/dominik-matzka.de/wp-content/plugins/mp3-music-player-by-sonaar/admin/class-sonaar-music-admin.php:1284) in /homepages/45/d4295164981/htdocs/dominik-matzka.de/wp-includes/pluggable.php on line 1340
    
    Warning: Cannot modify header information - headers already sent by (output started at /homepages/45/d4295164981/htdocs/dominik-matzka.de/wp-content/plugins/mp3-music-player-by-sonaar/admin/class-sonaar-music-admin.php:1284) in /homepages/45/d4295164981/htdocs/dominik-matzka.de/wp-includes/pluggable.php on line 1343

    Is it possible that not only my wordpress version, but also some of my plugins (WP Globus and MP3 Music Player) need an update? Actually, the whole error message cycle started when I updated those two plugins… Thus I am not shure whether this is really the problem. What do you think?

    Thread Starter hinemann

    (@hinemann)

    Here’s an update to this post.
    I have to apologize for not having read the FAQ for Debugging in WordPress carefully enough. Once I had deactivated all plugins, I could eliminate the problems concerning my page. However, the second error message (see above) still keeps coming…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Parse error: syntax error, unexpected end of file in …’ is closed to new replies.