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
.
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
Using $_Post to Get Select Option Value from Html
Forcing a Simplexml Object to a String, Regardless of Context
How to Handle the Warning of File_Get_Contents() Function in PHP
How to Create a Simple 'Hello World' Module in Magento
Convert Backslash-Delimited String into an Associative Array
Call to a Member Function Prepare() on a Non-Object PHP Help
PHP Mail Not Working For Some Reason
Warning About '$Http_Raw_Post_Data' Being Deprecated
File_Put_Contents - Failed to Open Stream: Permission Denied
What Does $$ (Dollar Dollar or Double Dollar) Mean in PHP
Turning Multidimensional Array into One-Dimensional Array
How to Minify PHP Page HTML Output
How to Check Whether an Array Is Empty Using PHP
PHP Preg_Match to Find Multiple Occurrences