Composer Require Runs Out of Memory. PHP Fatal Error: Allowed Memory Size of 1610612736 Bytes Exhausted

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. /etc/php5/cli/php.ini for Debian-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

To get loaded php.ini files location try:

php --ini

Another quick solution:

php composer.phar COMPOSER_MEMORY_LIMIT=-1 require hwi/oauth-bundle php-http/guzzle6-adapter php-http/httplug-bundle

Or just:

COMPOSER_MEMORY_LIMIT=-1 composer require hwi/oauth-bundle php-http/guzzle6-adapter php-http/httplug-bundle

PHP Fatal error: Allowed memory size of 1610612736 bytes composer update

Run

which composer

This will give you the path to composer like "/usr/bin/composer"

Then use that path in the command below to overcome the memory limit using the php flag for no memory limit, like this:

php -d memory_limit=-1 /usr/bin/composer update

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

Looks like you are using xampp.
you can try to change the memory_limit in php.ini.
Sample Image

Find this:

;memory_limit=512M 

Change to :

memory_limit =-1

Then restart the Apache from xampp

Fatal error: Allowed memory size of 1610612736 bytes exhausted but already allocated 1.75G

Running this command fixed it for me

php -d memory_limit=-1 /usr/local/bin/composer install

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. /etc/php5/cli/php.ini for Debian-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

To get loaded php.ini files location try:

php --ini

Another quick solution:

php composer.phar COMPOSER_MEMORY_LIMIT=-1 require hwi/oauth-bundle php-http/guzzle6-adapter php-http/httplug-bundle

Or just:

COMPOSER_MEMORY_LIMIT=-1 composer require hwi/oauth-bundle php-http/guzzle6-adapter php-http/httplug-bundle


Related Topics



Leave a reply



Submit