• Resolved holmpage

    (@holmpage)


    This has happened to me twice, once in a single-site installation and once in a multisite, both running WordFence and Falcon Engine. Both are on MediaTemple GS. I update my core and plugins regularly so the versions of WP and WordFence were probably the current ones at the time.

    Details:

    Starting August 20: Site https://www.theblockhouseschool.org, single-site installation running WordFence and Falcon Engine was giving a 500 error. Error_log showed:

    [Fri Aug 22 12:25:02 2014] [alert] [client 72.10.62.12] /home/xxxxxx/domains/theblockhouseschool.org/html/.htaccess: Invalid command ‘RewriteRu’, perhaps misspelled or defined by a module not included in the server configuration

    The .htaccess file had a fairly long list of banned IP addresses, which could only have been written there by WordFence. A RewriteRule near the end had been truncated. Easy enough to restore as I had a backup.

    Sept. 11: Multisite setup on holmpage.ca with about 20 low-traffic sites. All the sites that I checked were down. Error log was giving a repeated error “Invalid command ‘Rew’, perhaps misspelled or defined by a module not included in the server configuration”. In this case, there wasn’t a long list of banned IPs. Same issue in .htaccess; a truncation in the middle of “RewriteRule”.

    I restored the end of the .htaccess file and added a few lines starting with “#” at the end to mitigate future truncations, as per a suggestion I found in another support thread, and sites were back immediately.

    I mentioned this in another thread and was asked to repost in a new thread with more details.

    https://www.ads-software.com/plugins/wordfence/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Can you verify Wordfence version. I need to check something.

    Thanks!

    tim

    Thread Starter holmpage

    (@holmpage)

    It’s 5.2.3 now, but just got updated today (Sept. 12) via InfiniteWP. It’s on automatic updates, however. My IWP activity log goes back to Sept. 2 and doesn’t show any updates to Wordfence in that time, but it was probably getting updated automatically. So I can’t say for sure what version was active yesterday, but I would guess 5.2.2. (Unless that info is in the database? I can look if I know where it would be.)

    Another question. Do you have any other caching or security plugins running?

    Tim

    Thread Starter holmpage

    (@holmpage)

    Not specifically. Jetpack is network-enabled but none of the components seem to be for caching or security. I don’t have W3 Total Cache or WP Super Cache or anything like that. IWP as I mentioned, backup plugins, Akismet, but nothing else strictly for security or caching.

    OK. We had an issue with this but it was over 4 months ago. One of the devs went through the code while we were on the call together and saw the fix in place. Can you post a list of plugins so I can look?

    tim

    Thread Starter holmpage

    (@holmpage)

    Thanks so much for your help. I’ve posted a screenshot of the network plugins at https://holmpage.ca/images/Plugins-2014-09-12.png

    Note that some are not activated at all.

    About the WordPress MU Domain Mapping, was it activated and working before the Wordfence install? Had you made any updates in it lately? That should write to your htaccess file too, I’m thinking, and I wonder if somewhere between us and them it got janked.

    tim

    Thread Starter holmpage

    (@holmpage)

    MU Domain Mapping has been working since December last year. Wordfence is more recent. Last site I added was on Sept. 7 but it isn’t domain mapped. Previous one was June 10 and is domain mapped. Comparing previous versions of htaccess, there doesn’t seem to be anything pertaining to domain mapping there that changes when sites are added. That seems to happen in wp-admin/includes/, which is referenced in htaccess near the end.

    What is in the .htaccess file of the multisite:
    1. #WFIPBLOCKS
    2. an xmlrpc block (since about Aug 31)
    <files xmlrpc.php>
    Order Deny,Allow
    Deny from all
    </files>
    3. #WFCACHECODE
    4. a few manual 301 redirects for a site I moved to this network
    5. WP’s Rewrite Rules that are the same as when I set up the site, before Wordfence.

    There was also the Aug. 22 case on a single site. Could there have been a cached version somewhere of an old Wordfence file from before the correction was made 4 months ago? CloudFlare, some archive or mirror site… does that ever happen?

    Plugin Author Wordfence Security

    (@mmaunder)

    Hi @holmpage

    The issue you’re experiencing is identical in every way to an issue we fixed in an earlier version. I’ve read the thread above and it looks like you aren’t sure which version you were running and you haven’t had the issue since updating. If I misunderstood let me know, but if not lets wait and see if this occurs again.

    We haven’t had any other reports of this issue since we fixed it. The problem we had previously is that we were misreading the file size of .htaccess under certain conditions due to a quirk in PHP (caused by the stat() cache) but that has been fixed and we’ve had no reports of this since.

    So let me know if the current version causes the same issue.

    Thanks.

    Mark.

    Regards,

    Mark.

    Thread Starter holmpage

    (@holmpage)

    Will do. Thanks for looking into it and I will let you know if it happens again.

    Plugin Author Wordfence Security

    (@mmaunder)

    OK marking this resolved for now. Please post again if you see this issue again and you can reference this conversation.

    Regards,

    Mark.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Truncated .htaccess’ is closed to new replies.