0

From Mac terminal when I run php -r "echo ini_get('memory_limit').PHP_EOL;", the output is being 128M but when running sudo nano /Applications/MAMP/bin/php/php5.5.26/conf/php.ini, I can see different memory information, which is memory_limit = 1G (which I set myself before). The problem is I want to make sure that greater amount of memory is set, because I keep having this error:

PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 33 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php on line 138

when running command like composer require symfony/var-dumper

Any suggestions?

Patrick
  • 129
  • 16
  • You might have two versions of php installed. Check this answer to find where the second install might be. https://stackoverflow.com/questions/8684609/dude-wheres-my-php-ini – Orlando P. Apr 08 '18 at 15:36
  • @OrlandoP. Thanks! Running `php --ini` has endeed helped me know where `128M` is coming from. Now I've been able to set memory_limit to -1 resolving the error – Patrick Apr 08 '18 at 16:00
  • You can also set the `COMPOSER_MEMORY_LIMIT` environment variable if you only want to change the memory limit that is used when running Composer. – xabbuh Apr 09 '18 at 13:28

0 Answers0