• I’ve started getting these PHP Fatal errors pointing to wordfence-waf.php.. As I am still fresh to this I have a feeling I’ve missconfigured something in PHP, is/has anyone else experienced anything like this?

    PHP Error log:

    [20-Jan-2025 15:35:20 Europe/Oslo] PHP Fatal error: Maximum call stack size of 18446744073709518848 bytes (zend.max_allowed_stack_size – zend.reserved_stack_size) reached during compilation. Try splitting expression in C:\…\htdocs\”sitepath”\wordfence-waf.php on line 4
    [20-Jan-2025 16:00:41 Europe/Oslo] PHP Fatal error: Maximum call stack size of 18446744073709518848 bytes (zend.max_allowed_stack_size – zend.reserved_stack_size) reached during compilation. Try splitting expression in C:\…\htdocs\”sitepath”\wordfence-waf.php on line 4

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @aethoss,

    The maximum stack size reported in bytes, which equals a staggering 18446.74 petabytes may just be the default largest size when zend.max_allowed_stack_size = -1 is set in php.ini (-1 is effectively “no limit” but this huge number could be where that ends).

    zend.max_allowed_stack_size was added in PHP 8.3 to limit the size of the call stack.

    I feel it’s unrealistic that you or your host actually has this much space for the stack size to be reached so it could be worth checking in with your host or system administrator to see if the memory limit of your server is being reached, or if your server’s operating system (or PHP, and possibly OPcache) needs to be restarted to clear any memory reporting issues. Sometimes we’ve seen issues of resources being exhausted on shared servers, but I’m not certain if that’s the case for you here.

    Let us know what you find out,
    Peter.

    Thread Starter aethoss

    (@aethoss)

    Thank you for the reply.

    I noticed that zend.max_allowed_stack_size wasn’t defined at all in my php.ini so effectively “no limit” as you mentioned. After setting a limit the error doesn’t seem to be popping up anymore, thank you for your advice!

    Additional question, I might’ve maybe missed it while looking through your guides and documentations, but do you have any tips/advice on what to have enabled/what limits set in php.ini (aswell as modsec conf), for Wordfence to function smoothly?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP Fatal error: Maximum call stack size reached during compilation’ is closed to new replies.