Support » Plugin: Wordfence Security » Wordfence not working on PHP 7.1.0 or PHP 7.0.14 on SiteGround

  • Resolved fjalestad

    (@fjalestad)


    Today when implementing Wordfence after an attack from a russian IP range I tried to install it without success.

    It hangs the site and chrome reported 500 – Internal Server Error

    Error logs shows
    [13-Jan-2017 22:21:53 UTC] PHP Warning: array_merge(): Argument #2 is not an array in /home/{account}/public_html/{site}/se/wp-includes/load.php on line 63
    [13-Jan-2017 22:21:53 UTC] PHP Notice: Undefined index: REQUEST_URI in /home/{account}/public_html/{site}/se/wp-includes/load.php on line 153

    After changing to PHP 5.6.29 the error disappears and everything appears to work normally.

    Master @hristo-sg – Any tips for resolution as I’m rather keen on using PHP 7 again.

    • This topic was modified 11 months ago by  fjalestad.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @fjalestad,

    Iā€™m part of the Senior Technical Support team at SiteGround. Can you please provide me with the ticket ID related to the issue, I might also be able to help you with some useful information about the problem:)

    fjalestad

    (@fjalestad)

    @iv3rson76 – Ticket ID is 2062869. Thx

    For anyone having the same issue we think the root cause is the Theme (The7)

         0.000129 lstat("/home/refine12/staging/1/se/wp-content/themes/dt-the7/inc/admin/theme-options/options-header.php", {st_mode=S_IFREG|0644, st_size=119536, ...}) = 0
         0.000048 lstat("/home/refine12/staging/1/se/wp-content/themes/dt-the7/inc/admin/theme-options", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
         0.000041 lstat("/home/refine12/staging/1/se/wp-content/themes/dt-the7/inc/admin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
         0.000040 lstat("/home/refine12/staging/1/se/wp-content/themes/dt-the7/inc", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
         0.000040 lstat("/home/refine12/staging/1/se/wp-content/themes/dt-the7", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
         0.000044 lstat("/home/refine12/staging/1/se/wp-content/themes", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
         0.000042 open("/home/refine12/staging/1/se/wp-content/themes/dt-the7/inc/admin/theme-options/options-header.php", O_RDONLY) = 9
    

    Causing PHP Fatal Error:

         0.000075 write(9, "[16-Jan-2017 16:06:36 UTC] PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 140307088798600 bytes) in /home/refine12/staging/1/se/wp-includes/pomo/entry.php on line 74\n", 205) = 205
    

    /Mattias

    @fjalestad, indeed there seems to be a memory leak most probably caused by incompatibility between PHP 7.x and the theme you’re using right now. As far as I could see, the information in your support ticket is detailed and allows you to pinpoint the exact problem.

    As a side note, your staging site is being password protection and this might be the reason WordFence to be unable to reach it at some point.

    Hello Ivan, I’m having a similar issue on siteground using php 7.x with Avada theme and types plugin. I get all those errors, and it looks like a memory leak to me too. Basic chat support don’t know how to help me šŸ™

    @rimkashox

    My name is Ivan Atanasov, I am part of the Senior Technical team at SiteGround. If you can pass me the ticket ID where you reported the issue I will gladly take a look myself.

    Hello Ivan, thank you! The ticket id is 2172908, it has been solved by switching over to 5.6, which is not an ideal solution but works for the short term.

    I feel like there is a deeper issue at play here involving PHP 7.X and memory leaks. If in the future you can provide a solution it would be great. On my localhost it works fine with PHP 7.0.15.

    I also opened a ticket at the plugin dev site here, but this seems like a more global issue! https://wp-types.com/forums/topic/toolset-types-is-not-working-with-php-7-x-on-siteground-com-hosting/

    It seems that some PHP code in many plugins causes a memory leak on PHP 7.X. Maybe on localhost we just don’t notice it because we have so much local memory?!

    You know the weird thing Ivan is that, even if I set in php.ini memory_limit=256M, all debug tools give me back Memory Limit set at 768M. This shouldn’t be right? I have also set wp_max_memory_limit to 256 in wp-config.php but this doesn’t change much.

    This is correct. It is because the memory_limit variable is defined globally for the entire server.

    Any value you enter in a custom php.ini file for a globally limited variable will be overridden.

    On a side note: I left a detailed response in your ticket making sure to provide you with a testing area (a complete clone of your website) where the issue has been resolved.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Wordfence not working on PHP 7.1.0 or PHP 7.0.14 on SiteGround’ is closed to new replies.