DEV Community

StuartCreed
StuartCreed

Posted on • Edited on

2

How to fix PHP Composer memory limit issues

If composer is installed globally on MacOS Catalina run:

php -d memory_limit=-1 /usr/local/bin/composer update --no-plugins

https://stackoverflow.com/questions/49212475/composer-require-runs-out-of-memory-php-fatal-error-allowed-memory-size-of-161

OR

Putting COMPOSER_MEMORY_LIMIT=-1 in your .zshrc (not .bashrc as since 2019 MACOS ships with zsh shell as default) file works for some people -> although I have not tested this version of the fix myself.

OR

Override temporarily with:
COMPOSER_MEMORY_LIMIT=-1 composer install

Top comments (0)

Image of Stellar post

How a Hackathon Win Led to My Startup Getting Funded

In this episode, you'll see:

  • The hackathon wins that sparked the journey.
  • The moment José and Joseph decided to go all-in.
  • Building a working prototype on Stellar.
  • Using the PassKeys feature of Soroban.
  • Getting funded via the Stellar Community Fund.

Watch the video

👋 Kindness is contagious

Value this insightful article and join the thriving DEV Community. Developers of every skill level are encouraged to contribute and expand our collective knowledge.

A simple “thank you” can uplift someone’s spirits. Leave your appreciation in the comments!

On DEV, exchanging expertise lightens our path and reinforces our bonds. Enjoyed the read? A quick note of thanks to the author means a lot.

Okay