0

I keep getting this error every time i run anything related to composer (install, update, require, etc.)

enter image description here

Ive tried almost every website or solution I could find to no avail. Can anyone tell me how to find that 2MB limit that's causing so many issues for my composer to function properly?

in my php.ini I've set the memory limit to 550MB but still doesn't work. I cant even install composer via the installer because it gives the same error.

asked Nov 11, 2021 at 9:31

3 Answers 3

1

First of all, download composer.phar to your Magento root folder:

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

And then run composer commands like this:

php -d memory_limit=-1 composer.phar install
answered Nov 11, 2021 at 16:35
0

You need to try this command :

php -dmemory_limit=-1 composer install

answered Nov 11, 2021 at 13:23
0

You can also try

COMPOSER_MEMORY_LIMIT=-1 composer install

answered Nov 11, 2021 at 20:10

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.