• Today I noticed that one of my self hosted WordPress sites was failing, after attempting to load the page myself there was only a message “There has been a critical error on your website. Please check your site admin email inbox for instructions.” (Due to some ssl problems the email is currently unavailable). After enabling debug mode I can see this error “Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in /var/www/rhondafmeadows.com/wp-content/plugins/jetpack/src/class-tracking.php on line 2”. This error is the reason I posted this on the Jetpack support forum instead of General Support. I’ve tried doing some Google searches but have came up mostly empty, any suggestions and/or explanations about why this might be happening would be much appreciated.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support darnelldibbles

    (@darnelldibbles)

    Hi there,

    There may potentially be a conflict between Jetpack and another one of your plugins. However, before we look into plugin conflicts, I’ve seen that fully uninstalling and reinstalling Jetpack has resolved this particular error in the past. If you haven’t already, can you attempt a fresh Jetpack install following the instructions on our support page?:

    https://jetpack.com/support/reconnecting-reinstalling-jetpack/

    Please let me know if this works for you.

    Thanks!

    Thread Starter Jacob Meadows

    (@jwem)

    Sorry for the late reply after some further digging I determined there was malware embedded in the class-tracking.php file of Jetpack, it seemed to have spread to the other sites and most of the files had been modified in some way or another. The only conclusion I can come to is that somehow access to the www-data user was gained on the server hosting wordpress (weather through an exploit of wordpress, jetpack, or something else is unknown). After learning the extent of the infection I determined the best course of action was to wipe the install removing any possibility of the infection lingering somewhere and restore from backups. The malware was hiding on line 1 of the class-tracking.php file with quite a number of spaces between the expected <?php> code and the malware to make it invisible at first glance. I believe it had been there for between 1 and 3 weeks and an update most likely to Jetpack made the code no longer work and so the site stopped working.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal erro: Namespace declaration’ is closed to new replies.