Skip to content

Instantly share code, notes, and snippets.

@redleafar
Created February 12, 2018 18:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save redleafar/bc9935729abc9e7805ca8f9c287e9a0f to your computer and use it in GitHub Desktop.
Save redleafar/bc9935729abc9e7805ca8f9c287e9a0f to your computer and use it in GitHub Desktop.
Composer error: Fatal error: Allowed memory size of ... bytes exhausted

This happens when trying to install a new dependency and there is not enough memory, so you can raise the memory (in this case to 3GB) temporarily using :

php -d memory_limit=3G C:\ProgramData\ComposerSetup\bin\composer.phar require  excelwebzone/r

Check the actual memory limit with:

php -r "echo ini_get('memory_limit').PHP_EOL;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment