We're on v4.4.10 and keep having to restart the web server due to this issue. I've read various other posts and increased the wp-config.php memory, but still get this error.

[23-May-2017 11:39:43 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 7146491840906359738 bytes) in D:\htdocs\wordpress\wp-includes\functions.php on line 4886

Line 4886 function is:

function wp_is_stream( $path ) {
    $wrappers = stream_get_wrappers();
    $wrappers_re = '(' . join('|', $wrappers) . ')';

    return preg_match( "!^$wrappers_re://!", $path ) === 1;

Is there a way to test for the current length and if it's over a certain amount do something with it?

  • I can only imagine that a plugin or other script is calling stream_wrapper_register() far, far too often. Commented May 23, 2017 at 18:39
  • 3
    After reading bugs.php.net/bug.php?id=72451 it looks like an Apache issue. You might want to update your question with your exact platform details. Odds are that this is not WordPress or PHP. Commented May 23, 2017 at 18:47

1 Answer 1


Ater months of searching I stubmled upon this


The bug is resolved in PHP 7.1.

  • You should probably have added this as a comment rather than an answer. Commented May 23, 2017 at 18:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.