Composer update show this error: VirtualAlloc() failed: [0x00000008]

1

Composer worked find yesterday, but today after I trying install: composer require --prefer-dist "himiklab/yii2-recaptcha-widget" "*"

While run composer update command it show me error:

VirtualAlloc() failed: [0x00000008] VirtualAlloc() failed: [0x00000008] PHP Fatal error: Out of memory (allocated 956301312) (tried to allocate 201326600 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleSet.php on line 84

Fatal error: Out of memory (allocated 956301312) (tried to allocate 201326600 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleSet.php on line 84

I try update composer on my other projects, it is worked fine. After some researching I increased memory_limit: 4096M(also -1) in php.ini file. Then I tried to increase virtual memory in Computer->Properties, but still show error.

I try to run next command: composer update -vvv --profile, result in attached image Composer error

Any help would be greatly appreciated.

composer-php
asked on Stack Overflow Apr 24, 2018 by Murat Kurbanov

1 Answer

3

You are probably using 32bit PHP. This version cannot allocate enough memory for composer even if you change the memory_limit to -1 (unlimited).

Please use 64 bit PHP with the Composer to get rid of these memory problems.

answered on Stack Overflow Aug 5, 2018 by pulzarraider

User contributions licensed under CC BY-SA 3.0