作曲家更新=>致命错误:内存不足 [英] Composer update => Fatal error: Out of memory

查看:58
本文介绍了作曲家更新=>致命错误:内存不足的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在本地计算机上使用XAMPP。我无法通过删除PHP内存限制来解决此问题。

I'm using XAMPP on a local machine. I couldn't solve this issue by removing the PHP memory limit.

我已经尝试过的方法:


  • 修改了我的php.ini,以删除内存限制=>
    memory_limit = -1

  • modified my php.ini to remove the memory limit => memory_limit=-1

检查我是否运行PHP 5.6

Checked I was running PHP 5.6

,并自动将作曲家更新到最新版本

and self-updated composer to the last version

但是它似乎根本没有任何作用。

But it doesn't seem to have any effect at all. Does anyone have a suggestion?

我的 composer.json

{
    "name": "erwin/symff",
    "license": "proprietary",
    "type": "project",
    "autoload": {
        "psr-4": {
            "AppBundle\\": "src/AppBundle"
        },
        "classmap": [
            "app/AppKernel.php",
            "app/AppCache.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        },
        "files": [
            "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php"
        ]
    },
    "require": {
        "php": ">=5.5.9",
        "bmatzner/fontawesome-bundle": "~4.4",
        "bmatzner/jquery-bundle": "~1.9",
        "bmatzner/jquery-mobile-bundle": "~1.4.5",
        "bmatzner/jquery-ui-bundle": "~1.10.3",
        "boekkooi/jquery-validation-bundle": "~1.2.1",
        "divi/ajax-login-bundle": "dev-master",
        "doctrine/doctrine-bundle": "^1.6",
        "doctrine/doctrine-fixtures-bundle": "^3.0.2",
        "doctrine/orm": "^2.5",
        "egeloen/google-map-bundle": "^3.0.1",
        "egeloen/serializer-bundle": "^1.0.0",
        "friendsofsymfony/comment-bundle": "^2.2.0",
        "friendsofsymfony/jsrouting-bundle": "^2.2.1",
        "friendsofsymfony/user-bundle": "^2.1.2",
        "incenteev/composer-parameter-handler": "^2.0",
        "ivkos/pushbullet": "^3.3.0",
        "javiereguiluz/easyadmin-bundle": "^1.17",
        "jmose/command-scheduler-bundle": "^2.0.0",
        "jms/security-extra-bundle": "^1.6.1",
        "php-http/guzzle6-adapter": "^1.1.1",
        "php-http/httplug-bundle": "^1.11.0",
        "rapidwebltd/php-google-contacts-v3-api": "^2.0.0",
        "sensio/distribution-bundle": "^5.0.19",
        "sensio/framework-extra-bundle": "^3.0.2",
        "symfony/assetic-bundle": "dev-master",
        "symfony/monolog-bundle": "^3.1.0",
        "symfony/polyfill-apcu": "^1.0",
        "symfony/swiftmailer-bundle": "^2.3.10",
        "symfony/symfony": "3.4.*",
        "twig/extensions": "1.0.*",
        "twig/twig": "^1.0||^2.0",
        "vich/uploader-bundle": "^1.0.1"
    },
    "require-dev": {
        "sensio/generator-bundle": "^3.0",
        "symfony/phpunit-bridge": "^3.0"
    },
    "scripts": {
        "symfony-scripts": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
        ],
        "post-install-cmd": [
            "@symfony-scripts"
        ],
        "post-update-cmd": [
            "@symfony-scripts"
        ]
    },
    "config": {
        "sort-packages": true
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-bin-dir": "bin",
        "symfony-var-dir": "var",
        "symfony-web-dir": "web",
        "symfony-tests-dir": "tests",
        "symfony-assets-install": "relative",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": null
    }
}

当我运行以下命令:

composer update

我得到以下输出:

"C:\DEV\xampp\php\php.exe" "C:\DEV\xampp\htdocs\symfony\composer.phar" "--ansi" "--no-interaction" "update"
Loading composer repositories with package information
Updating dependencies (including require-dev)

Fatal error: Out of memory (allocated 1584922624) (tried to allocate 268435456 bytes) in phar://C:/DEV/xampp/htdocs/symfony/composer.phar/src/Composer/DependencyResolver/Solver.php on line 220
PHP Fatal error:  Out of memory (allocated 1584922624) (tried to allocate 268435456 bytes) in phar://C:/DEV/xampp/htdocs/symfony/composer.phar/src/Composer/DependencyResolver/Solver.php on line 220

我希望会发生这种情况:

And I expected this to happen:

以前曾经发生过的简单更新。

A simple update as used to happen earlier.

据我了解,似乎显示内存不足错误

From what I understand, the "Out of memory" error seems to indicate a physical memory limit and not a configured one.

Windows上的PHP是32位(我认为至少是这样),并且32位进程不能使用超过2GB的内存。 RAM。

PHP on windows is 32bits (I think so at least...) and 32Bit Processes cannot use more than 2GB of RAM.

所以我想我遇到了实际的身体限制。

So I guess I'm hitting a real physical limitation.

我现在的问题是:我仍如何在32位PHP上更新我的软件包?

My question now would be : How can I still update my packages on a 32bits PHP ?

我尝试过按每个软件包进行更新

I tried updating on a per package approach

C:\DEV\xampp\htdocs\symfony>php -d memory_limit=-1 composer.phar update bmatzner/fontawesome-bundle
Loading composer repositories with package information
Updating dependencies (including require-dev)
PHP Fatal error:  Out of memory (allocated 1592000512) (tried to allocate 268435456 bytes) in phar://C:/DEV/xampp/htdocs/symfony/composer.phar/src/Composer/DependencyResolver/Solver.php on line 220

但是您可以看到,我遇到了同样的问题。

but as you can see, I encounter the same problem.

推荐答案

升级t PHP7达到了目的。

在内存消耗方面似乎更有效率。

It seems more efficient when it comes to RAM consumption.

感谢所有尝试在这里帮助我的人。

Thanks to everyone who tried to help me here.

这篇关于作曲家更新=>致命错误:内存不足的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆