My production site is down -- Critical

Parse error: syntax error, unexpected $end, expecting ')' in /home/theactio/public_html/wp-includes/class-http.php on line 588

My prod site is totally down -- what do I do -- I am stuck

  • Vaughan
    • Support/SLS MockingJay


    this could be a plugin or theme

    can you try navigating to wp-content/ using FTP

    then rename the plugin folder to plugins-temp

    then create a new folder called plugins

    then try & access your site.

    if it works, simply copy each plugin out of the renamed plugins folder 1 at a time, checking each time until the issue returns. then you'll know which plugin is causing it.

    hope this helps

  • mindset
    • The Crimson Coder


    This is the strangest thing I have ever seem --

    I moved all the plugins -- I always do that first thing - when things like this happens ---
    but that did nothing ---

    so I went to the actual code -- and the last line of the code was an "if" statement-- and nothing else ----

    Half of the code was gone --- the WP file has 1955 lines of code --- and my file only had 588 --- and the rest was gone --

    How in the hell could cause that? I can't even imagine how it ran? --
    I have not updated the wp install since 3.7.1 which was a week or more ago --
    and what this code is never executed????

    or did something cause half the file to disappear --- very strange -- but it is working now ---


  • mindset
    • The Crimson Coder

    Alright -- I need serious help and expertise here ----

    For the third time today -----

    the class-http.php file in the includes directory has been truncated

    the original file has 1955 lines --

    earlier today -- I started getting the syntax area -- and I tracked it down -- and that file only had 588 lines in it -- the last line was an if statement with nothing after it ---

    then this afternoon -- it happened again -- and there were only 467 lines in the file ---

    then it just happened again -- now the file only has 1157 lines in the file --

    Once I put the file back -- everything works again ---

    How could this be happening -- What is that file used for -- it looks like it handles cookies and stuff ----

    I have no idea what to do -- to even start looking for the issue HELP HELP

  • DavidM
    • DEV MAN’s Mascot

    Hi mindset,

    I've not heard of that myself before, indeed it is really strange. Have you checked the permissions on that particular file on your server?

    I wonder if it's set to be writable? Maybe you could set it to not be writable at all (777 I believe) then if something attempts to write to it, it would result in an error in your logs?

    Have you asked your hosting provider about that as well? I wonder if they might be able to help sort it?

    Oh, I didn't ask, have you turned on debugging in your wp-config.php file?

    Then you could check the error logs to see what shows up. I guess for that matter maybe the error logs already show something?


  • mindset
    • The Crimson Coder


    777 is read write execute for everyone --

    what we would want is 644 but even then the owner can write --
    it would not let me change it to 444 --

    by the log -- could not tell what caused the syntax error to start -- when it truncated the file -- no pattern -- that I could see -- I do have some DB errors though and I dont knwo what they are -- so maybe someone here does --

    [06-Nov-2013 02:41:22] WordPress database error Table 'theactio_wrdp1.wp_14__wsd_plugin_alerts' doesn't exist for query INSERT INTO wp_14__wsd_plugin_alerts
    'WordPress version is displayed for all users',
    '<p>Displaying your WordPress version on frontend and in the backend\'s footer to all visitors\r\n and users of your website is a security risk because if a hacker knows which version of WordPress a website is running, it can make it easier for him to target a known WordPress security issue.</p>',
    '<p>This plugin can automatically hide your WordPress version from frontend, backend and rss feeds if the option \"Hide WordPress version for all users but administrators\" is checked on the plugin\'s settings page.</p>',
    ); made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), include_once('/plugins/secure-wordpress/index.php'), SwpaScheduler::registerClassTasks, call_user_func, SwpaSecurity::fix_hideWpVersion, SwpaPlugin::alert

    I have a ton of these --- for different tables


  • DavidM
    • DEV MAN’s Mascot

    Hi mindset,

    Thanks for that correction on the permissions. It's been a while since I set permissions, so I got the permissions reversed there with the 777. :slight_smile:

    Have you by any chance tried downloading the latest version of wordpress and overwriting your /wp-includes/ and /wp-admin/ folders?

    That's usually safe to do since you wouldn't normally edit any files in those folders.

    Another thing I was wondering, have you tried a virus check?
    There are some free scanners, like AVG's:

    I'd hate to think it's virus related but it'd be a good thing to test for. I'll keep searching for other possible issues but I think those two things would be good to check.


  • mindset
    • The Crimson Coder

    yes david --

    I have wordfence running ----- and there are no viruses detected ----
    and there are no patterns of errors prior to the syntax errors that start because of the file truncation. ---

    I took the whmcs integration and provisioning plugins out -- and it has not happened since -- so I have to assume there are problems with one of those two plugins --

  • mindset
    • The Crimson Coder

    I have not had this issue -- since I deleted the WHMCS plugins --

    though I would like the feature --- I guess I will have to do without them --
    if they are going to crash my site 5 times a day ---

    and no one seems interested in resolving the problems ----

  • mindset
    • The Crimson Coder

    Hey david -- thanks for letting me know -- and keeping me up to date --

    I have plenty of other challenges to resolve -- so just let me know --

    I am so frustrated -- sometimes I just want to give up on MU -- and go back to single installs --- LOL


  • Arnold
    • El Macho WP

    Hi Mindset,

    What's happening is that Integration needs to patch the class-http file. It's apparently trying to but something prevents it from writing the rest of the file. Quick fix is to disable the plugin and either reinstall the Wordpress with the Update reinstall button or copy a fresh copy of class-http.php to wp-includes via FTP.

    Now the real question is why the patch doesn't work and fails half way through. What version of Wordpress are you using? Are you using any protection programs that might prevent a file from being written to. The patch works on al versions up to the 3.8 beta and it shouldn't chop a file in two like that.

  • catalyst
    • Design Lord, Child of Thor

    Are you running security programs like "Better WP Security" that prevent certain actions? Normally modifying files is something you wouldn't want to allow so if it's a patch process, it might be stopped (too late though as it shouldn't be allowed to run at all).

    Patching the file: what is the plugin's procedure? It might also be it tries to use a command not allowed by the server.

  • Arnold
    • El Macho WP

    From the looks of your errors, you probably have a plugin "Secure Wordpress" which is generating most of them. The tables being reported aren't standard WordPress tables and are probably created by this plugin. You could try disabling it and see if things run better.

  • Arnold
    • El Macho WP

    Also on Wordfence. There descriptions says.

    Wordfence is the only WordPress security plugin that can verify and repair your core, theme and plugin files, even if you don't have backups.

    It looks like they are trying to repair the patches and messing up. I don't know if they have some means of disabling it for certain files or a way of informing it to use the patched version.

  • Kyle
    • WPMU DEV Initiate

    this is also happening to me. I am using 2 of the WPMU WHMCS plugins, the integration and some other one. my file gets truncated pretty much half way through the document. 3rd time now, about 1.5 weeks apart.

    Replacing w a new class-http.php file fixes it. im setting up a monitor to see what plugin is interacting with it the next time I see this parse error.

    Renaming the plugins folder did not fix. I am just noticing the commonalities this user above was having with mine :slight_smile:

    Servint Hosting VPS, WP 4.0, MultiSite.

  • mindset
    • The Crimson Coder

    It was happening to me also back in March-- and I never got any help with it -- so I obviously had to shut the functionality off --- I would have thought support would have dealt with this issue by now -- you guys are normally on top of things -- At that time -- there were quite a few tickets on the issue -- and I think everyone just gave up -- and stopped using it --

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.