Composer Memory Limit

后端 未结 3 943
清酒与你
清酒与你 2021-01-29 05:02

I installed composer global at a Webhosting-Server. Now I can call it via

composer

But if I want to install something I get a memory limit er

相关标签:
3条回答
  • 2021-01-29 05:13
    alias composer='php -d memory_limit=1024M -d suhosin.executor.include.whitelist=phar,http://,https:// /is/htdocs/xxxxxx_xxxxx/script/composer/composer.phar'
    

    Worked for me

    I use an alias for composer so I don't need to call the whole path if I want to use composer. But with this alias I am not able to call composer via "composer.phar". So I added the memory limit command to the alias function which worked for me.

    0 讨论(0)
  • 2021-01-29 05:25

    When calling Composer binary by using php CLI directly, you need to provide the full path to the Composer phar, e.g., if it were installed in /usr/local/bin, you would call it with:

    php -d memory_limit=1024M /usr/local/bin/composer.phar
    
    0 讨论(0)
  • 2021-01-29 05:27

    In my case, I had a VM and increasing the memory lmit of my VM solved my problem

    0 讨论(0)
提交回复
热议问题