• I tried to access my blog this morning and I’m getting the following error message:

    Parse error: syntax error, unexpected T_STRING in /home2/bohesca/public_html/blog/wp-includes/formatting.php on line 83

    I haven’t touched it in days and it was fine yesterday. My homepage is fine. Is this a WordPress issue? Sorry, I don’t remember which version of WordPress I’m using and I can’t access my admin panel to find it. My website is https://www.bohemiancreations.ca/blog

    Please help. Thanks in advance

Viewing 8 replies - 1 through 8 (of 8 total)
  • something has changed the contents of that file. — if you didn’t do it yourself, I’d probably start to be a little concerned.

    in the mean time, I suggest using FTP to upload formatting.php into that directory… but please make sure you do it from a fresh copy of the SAME VERSION of wordpress you’re using.

    if you don’t know what that is, you can find your version by downloading the file version.php from your wp-includes folder, and opening it in your favourte text editor.

    look for the line beginning with $wp_version.

    If you don’t have this file, you may be using an extremely old version of wordpress.

    Thread Starter bohemiangirl

    (@bohemiangirl)

    So I have to download a fresh copy of WordPress (the version I’m currently using) and only upload the formatting.php file into wp-includes?

    I don’t have access to FTP right now but I’ll try working on it this evening. Thx.

    yep, that’s what I’d suggest – unless you already have it downloaded.

    depending on the version, you might want to consider upgrading to the latest version once you get this one working to your satisfaction (but not before)

    Thread Starter bohemiangirl

    (@bohemiangirl)

    thx

    Thread Starter bohemiangirl

    (@bohemiangirl)

    Hello again,

    I did as you told me and now when I try to access my blog I get a new Parse error:

    Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in /home2/bohesca/public_html/blog/wp-includes/classes.php on line 732

    I noticed that as the page is loading it points to telicolakerealty not bohemiancreations. Not good.

    I also noticed that most if not all files in my wp-includes folder were changed this morning around 2am.

    Please help.
    P.S. I’m using WordPress version 2.1.2

    sounds like you might have been hacked.

    if you can, get some help from someone you trust to do the following:

    1) use FTP to make a copy of your .htaccess file from your public_html folder

    2) use FTP to make a copy of your wp-content folder to your hard drive.

    3) look in your wp-content\plugins folder, make a list of the plugins you have there, then go download fresh copies of them all.

    4) delete the wp-content\plugins folder on your hard drive (you can’t trust any of the php files which were on your website, anymore)

    5) look in wp-content\themes, make a list of the themes you have then go download fresh copies – or find a new theme you like.

    6) delete the wp-content\themes folder on your hard drive, again, you can’t trust php files.

    7) look for wp-content\uploads if you have one (I can’t recall if wp2.1 actually has that or not). If you do, check that there are only jpg, gif, mp3 or whatever files in there, no file types you don’t recognise! certainly not .php files in there.

    8) if in step 7, there’s no uploads folder then find the folder you use to store all your uploaded pictures etc, download that to your hard drive and remove all unknown file types from there.

    9) once you’ve done all this, make a copy of your wp-config.php from your public_html folder – you’ll need this to fill in the information for your new wordpress installation.

    10) remove *everything* from your public_html directory on your hosting space. It’s a fire sale, everything must go!

    11) download and install a fresh copy of wordpress as per the instructions on this website. Please note, you will be performing an upgrade, so you must follow the upgrade instructions. Use the settings from your old wp-config.php in your NEW wp-config.php

    12) upload the .htaccess file you downloaded in step 1.

    13) upload your *cleaned up* wp-content folder which you downloaded in step 2, into your public_html folder thereby overwriting the one that’s already there from the new wordpress installation.

    14) login to your wordpress installation using your old username and password.

    15) upload your newly downloaded theme to wp-content\themes then activate.

    16) upload your newly downloaded plugins to wp-content\plugins and activate.

    17) spend the next week getting things just right, again… and kick yourself for not keeping your wordpress up-to-date, and thereby allowing your website to be compromised.

    lots of steps, but it needs to be done — if you shortcut this, you will probably end up with stray hacked files sitting there waiting to compromise your site again.

    Thread Starter bohemiangirl

    (@bohemiangirl)

    Yeap – kicking myself BIG TIME (lesson learned). I can’t thank you enough for all your help. I’ll be doing the work myself but it shouldn’t be a problem because your instructions are so user-friendly (just might take some time :). One last question – am I going to lose all previous posts over the past year?

    Mille mercis.

    you’re welcome.

    no, you shouldn’t lose any posts in this process – I always like to tell people to backup their databases, so if you have an easy way to do that, via your host’s control panel, then you should definitely do that as well.

    However, nothing you’re doing here will actually touch your posts, which are located in your DB.

    The only thing you have to be careful of, is to make sure you keep all your pictures and such backed up – those WILL be deleted on the server if you follow the above steps, so make sure you copy them down first (and make sure you look in those folders for stray files you don’t recognise).

    being hacked is a huge pain… make sure you take it nice and easy when doing all this, so you don’t miss any steps.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Parse error: syntax error, unexpected T_STRING’ is closed to new replies.