PHP Parse error: syntax error, unexpected end of file in /home/theactio/public_html/wp-includes/cla

My Multi site is down and just displays white page ---

PHP Parse error: syntax error, unexpected end of file in /home/theactio/public_html/wp-includes/class-http.php on line 921

any ideas

  • mindset

    For some reason - this file got truncated --

    This happened before when I was using the WMCS plugin integration and I got rid of the plugin cause we could not get it resolved.

    I am not using that plugin anymore -- but something else caused the /public_html/wp-includes/class-http.php to become truncated --

    What happens is your site will not come up -- it just goes to a blank screen --
    to get your site back up --- find the file in another wp install and replace it -- if I figure out what caused it to get truncated, I will update this -

    If support has any input -- it would be greatly appreciated

  • Vaughan

    Hi mindset,

    Hope you're well?

    This has cropped up a few times here, and we have never ever managed to figure out an actual cause, it's rather random & sporradic and it's not just people using our plugins either. Google is quite full of posts like this.

    I don't know what causes it, we've all discussed this too with other developers and we've been at a loss ourselves, there doesn't seem to be a common element between all cases which makes it harder to narrow down the cause, but if you do ever come across the culprit, we would appreciate if you let us know, just for our peace of mind, and the ability to inform other users both on DEV and at wordpress.org.

    This one has been a mystery for a long while now.

  • be

    Just a thought here..

    W3C cache has been the cause of many inexplicable issues and is really good at serving super fast "white pages" to the public and been known to "shut out" sites

    If you have/are using it and it is not crucial I would suggest removing that and testing.
    NOTE: you must remove using the steps required -
    if you simply deactivate or just delete it, it WILL leave all manner of ht access and permission, restrictions all over the place that you will never be able to source..
    DEactivating does NOT remove restrictions etc it has in place when it is active ..
    If you have deactivated or deleted it at some time in the past you can REinstall it and then remove it as per the specific instructions for that plugin.

    Of course if you don't use W3C (or another WP Caching plugin - ignore all of the above..

    Do you use something like Wordfence or Bulletproof?
    I know it can be incredibly frustrating trouble shooting these random issues..

    Also = these inexplicable truncations along with missing program data is in my experience - related to incomplete or WP installs or updates that have not completed correctly..
    Everything seems to run kind of OK with odd exceptions.. Reinstalling WP or Updating again has in my experience fixed this problem..
    There is always the possibility of the Plugin Combinations causing the failure - but it can never seem to be nailed down..
    Is some process running during update? does the cache and security hit the same htaccess issue at once etc..
    The protection services - like Cache and security that do not play nice together and are mostly doing what they are meant to do which is stop anyone adding anything etc..

  • be

    OK - please advise.:_
    1 - this is ONE multisite (this issue is with)
    2 - Can you backup your live site and restore to a Dev install
    What
    CACHE plugins have you installed now or previously on the site in question
    SECURITY plugins have you installed now or previously on the site in question..

    Note here I am just another user however have had much time troubleshooting similar issues across many sites..

    Also W3 does indeed rewrite - add rules etc to HTaccess and config files - this is not something that you have done manually and you must uninstall as per their stepped instructions or you will have inexplicable and unidentifiable intermittent problems forever...

    While I understand what you are saying re WHMCS triggering the issue - it would be highly unlikely that this plugin is the cause but rather one of the first to hit the problem that is unresolved and halt the site..
    This problem occurs across varied sites using varied plugins and configurations it does however from my troubleshooting to date ALWAYS with sites using
    CACHE - SECURITY and Incomplete WP updates or installs.
    Mostly W3C and Wordfence/Bulletproof but NOT always..

  • mindset

    I have no idea what you mean - when you say restore to dev --
    is that a device???

    I have 300 subsites+ so that would be a relatively humongous task

    Well, it is happening every 5-15 minutes for the last day --

    I did re-install w3 just now - I also have wordfence running --

    the class.php being truncated started after I disabled W3 -
    I disabled W3 because my importing of files keeps crashing --
    and I thought it could be W3

    so lets see what happens now --

  • be

    HI Mindset..
    Dev site - meaning move a copy of live to a DEV platform where you can safely test..
    It can be highly "dangerous" to trouble shoot live.. and it usually proves highly unreliable as a business case..

    In my experience..
    Note have had this issue on 8 separate sites all Multi ALL running W3 and Wordfence or Bulletproof with varied plugin configurations (hence I ask those questions )
    Of course I cannot speak to every user experience or site setup just what I have been involved with..

    Without seeing the setup I would suggest..

    MOST importantly - Devoting the time and effort to a DEV platform - ie copy the LIVE site (you can use SNAPSHOT for this as we do successfully across many sites) and deploy/install it to a dev platform..(another site just for testing and development)

    1 - Reinstall of W3 as you have done and complete UNinstall as per each required W3 step so it is GONE without remnant anything anywhere..

    2 - There is then the next issue of truncation - most often in my experience relating to failed WP updates..(these can leave partial php files etc)
    To reinstall WP (this is a call you have to make) on a live site may or may not repair the issue
    WP Installs and updates can fail or hang causing bizarre operating of sites - not only multisites - however the fix becomes more complex especially with large Parent/Child sites..

    3 - Then the question of Security plugins.. - Wordfence - seek support (not sure how helpful they are in this circumstance)
    While it may well be a configuration issue that is a "business case" issue that only you can decide.

    When we could not source the issue with Wordfence we removed it (again paying particular attention to wordfence requirements for UNinstall) from the sites running it and the problems have not reappeared..

  • be

    Don't mean to confuse the issue.
    Dev is a development site - another domain used to house copies of sites so you can test etc without affecting the live site.

    Reinstalling W3 resolving issues means it was not uninstalled as required - it will be the cause of White pages being served...

    The big decision is do you need caching or do you need security ?(if its a tradeoff)

    What types of sites are they? do they serve static data, are they dynamic as in lots of changes regularly etc..

    Dropping security and keeping caching may not resolve all issues - depends on what is failing in what order..
    If you drop security what measures do you have in place to stop brute force attacks etc..

    Are files are not uploading or importing still?

  • mindset

    Thank you for your description -- I do not have a development site cause this site is so big - I do have a similar install without all the sites -- that I test new plugins on - to me dev is a null device - it would be a mount place -- not development - I should have guessed what you meant -- My pond was full of alligators and I was in the middle

    Well it happened again today -- while we are loading content -- at least it is not happening every 5 minutes LOL

    well I was told by wiretree my hosting -- that I really did not need wordfence because they protect agaist brute force - but it did not hurt --

    I have network deactivated it -- but I think it is still active on some sites -- a feature of multisite I do not like -- you have no control over the plugins and who uses them other than (pro-sites) - but if you network deactivate it for some reason -- a user can then activate it on their site -- and then you lose all control -- becasue it will stay activated on that site -- until you login to every site and deactivate --

    well all I can do is to keep moving forward and try to narrow down a pattern

    Yes, I did not uninstall w3 properly. I just deleted the plugin and deleted db.php and object.php -- did not undo .htacess --- lesson learned -

    business directories, classifieds, real estate, social network, training sites, and member blogs -- so presently they are fairly static - as we are only doing about 30 sales a month. We are just getting going.

  • be

    In my opinion if anyone is running directories or social networks you would not want caching as it will serve old data and folks will simply think the site is not creating anything new
    (we had one site with issues when we looked the directory was serving data due to its caching that was 2 YEARS old to the front end)
    Clearly not the desired outcome..
    Caching in notoriously difficult to get right especially on dynamic data sites..
    If the sites are setup properly there is no need for caching IMHO ...

    If you have server level protection then sacrificing security plugins is something you need to decide on..

    Do you get any error messages or logs with the file import (if that's when it is happening..)
    Without seeing the setup it Sounds suspiciously like a failed WP update

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.