how to solve PHP Fatal error: Out of memory, when I try this command "composer require laravel/ui" for auth file.?

0

I try memory_limit=-1 or 526M or 1000M, but showing same error repeated.Please help me!!!!

D:\xampp\htdocs\elevenMedia>composer require laravel/ui Using version ^2.0 for laravel/ui ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev)

VirtualAlloc() failed: [0x00000008] Not enough storage is available to process t his command.

VirtualFree() failed: [0x000001e7] Attempt to access invalid address.

VirtualAlloc() failed: [0x00000008] Not enough storage is available to process t his command.

VirtualFree() failed: [0x000001e7] Attempt to access invalid address.

PHP Fatal error: Out of memory (allocated 908066816) (tried to allocate 4096 by tes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Depen dencyResolver/Solver.php on line 223

Fatal error: Out of memory (allocated 908066816) (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Dependency Resolver/Solver.php on line 223

laravel
cmd
composer-php
asked on Stack Overflow Jun 25, 2020 by candy layy

3 Answers

0

You can try to increase de Memory Limit to 2 Gigabytes, as Laravel suggest, in your php.ini. On XAMPP it is located at C:\xampp\php\php.ini

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 2G
0

In my case, it was a problem with missing swap partition. More info: https://github.com/composer/composer/issues/7348#issuecomment-414178276

answered on Stack Overflow Apr 28, 2021 by М.Б.
-1

You can try installing this package that enables parallelization of the downloads.

composer global require hirak/prestissimo

Also when running your composer command use the -vvv flag if you are running into issues.

  composer require laravel/ui -vvv
answered on Stack Overflow Jun 26, 2020 by Kurt Friars

User contributions licensed under CC BY-SA 3.0