Monday, January 9, 2023

Composer require runs out of memory. PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted

To get the current memory_limit value, run:
php -r "echo ini_get('memory_limit').PHP_EOL;"


Try increasing the limit in your php.ini file (ex. C:\xampp\php\php.ini for Windows-like systems):
; Use -1 for unlimited or define an explicit value like 2G
memory_limit = -1


Or, you can increase the limit with a command-line argument:
php -d memory_limit=-1 composer.phar require hwi/oauth-bundle php-http/guzzle6-adapter php-http/httplug-bundle

No comments:

Post a Comment