简体   繁体   English

错误:作曲家更新时内存不足

[英]Error: Out of memory on composer update

Run in cmd 在cmd中运行

$ php -d memory_limit=-1 -f composer.phar update
Loading composer repositories with package information
Updating dependencies

Fatal error: Out of memory (allocated 121896960) (tried to allocate 24 bytes) in E:\Releases\test\vendor\composer\composer\src\Composer\DependencyResolver\Rule.php on line 50

Test on OS: 在OS上测试:

  • Ubuntu 13.04 ok [PHP 5.4.24] Ubuntu 13.04 ok [PHP 5.4.24]
  • Windows 7 ok [PHP 5.4.25 nts VC9 x86] Windows 7 正常 [PHP 5.4.25 nts VC9 x86]
  • Windows XP fail [PHP 5.4.25 nts VC9 x86] Windows XP 失败 [PHP 5.4.25 nts VC9 x86]

php.ini php.ini中

memory_limit = 1024M

I forgot to say that the script is running in a wrapper. 我忘了说脚本在包装器中运行。 Directly into the console works, not working only in a wrapper 直接进入控制台工作,而不是仅在包装器中工作

if (defined('PHP_WINDOWS_VERSION_BUILD')) {
    pclose(popen('start /b '.$command, 'r'));
} else {
    exec($command.' &');
}

我已经遇到了这个问题,刚好达到了php.ini中的内存限制(对我来说,是1Go)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM