Skip to content

Instantly share code, notes, and snippets.

@eleazarbr
Created December 20, 2020 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eleazarbr/a07be458e497c29d8e8763301f049a1b to your computer and use it in GitHub Desktop.
Save eleazarbr/a07be458e497c29d8e8763301f049a1b to your computer and use it in GitHub Desktop.
How to solve: PHP Fatal error: Allowed memory size. (Composer)

We can run:

php -d memory_limit=-1 $(which composer) update

Or change the php.ini settings:

php -i | grep php.ini

<!-- Then we can see something like below: -->
Configuration File (php.ini) Path => /usr/local/php/etc
Loaded Configuration File => /usr/local/etc/php54/php.ini

Then change memory_limit variable:

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = -1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment