Skip to content

"Not enough memory" error on Windows and PHP 7.1+ #4593

@Rarst

Description

@Rarst

I am getting Not enough memory. error immediately on WP CLI launch, outside of WP context altogether.

I seem to get it consistently on PHP 7.1 in my dev stack and clean vanilla download of PHP 7.2

C:\server>php --version && php ext/wp-cli.phar

PHP 7.1.1 (cli) (built: Jan 18 2017 18:51:14) ( ZTS MSVC14 (Visual C++ 2015) x86 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

Not enough memory.
C:\server>"php72/php" --version && "php72/php" ext/wp-cli.phar

PHP 7.2.0 (cli) (built: Nov 29 2017 00:17:00) ( ZTS MSVC15 (Visual C++ 2017) x86 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies

Not enough memory.

No error on clean vanilla download of PHP 7.0

C:\server>"php70/php" --version && "php70/php" ext/wp-cli.phar

PHP 7.0.26 (cli) (built: Nov 22 2017 13:18:45) ( ZTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies

NAME

  wp

DESCRIPTION

  Manage WordPress through the command-line.
...

Unaffected by memory_limit configuration.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions