Laravel:内存限制

时间:2019-03-26 19:07:32

标签: php laravel-5

我一直试图使用Laravel为我的项目提供服务,但是每次都会遇到相同的错误,我应该增加内存限制。 我正在使用macOS和Laravel 5.4。我正在尝试在该php.ini.default上的文件path:/etc/php.ini.default中增加它。 这是错误:

     Fatal error: Allowed memory size of 1610612736 bytes exhausted 
     (tried to allocate 32 bytes) in 
 phar:///usr/local/Cellar/composer/1.8.0/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52

这是我的composer.jason文件:

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"minimum-stability":"dev",
"require": {
    "php": ">=5.6.4",
    "barryvdh/laravel-dompdf": "^0.8.0@dev",
    "barryvdh/laravel-snappy": "^0.4.0@dev",
    "dingo/api": "1.0.x@dev",
    "fedeisas/laravel-mail-css-inliner": "dev-master",
    "intervention/image": "^2.3@dev",
    "intervention/imagecache": "2.*",
    "jeroennoten/laravel-adminlte": "^1.19",
    "laravel/framework": "5.7.*",
    "laravel/passport": "^7.0",
    "laravel/tinker": "~1.0",
    "mercuryseries/flashy": "dev-master"
},
"require-dev": {
"zizaco/entrust": "5.2.x-dev",
    "fzaninotto/faker": "~1.4",
    "laracasts/generators": "^1.1",
    "mockery/mockery": "0.9.*",
    "maatwebsite/excel": "~2.1.0",
    "phpunit/phpunit": "~5.7"
},
"autoload": {
    "classmap": [
        "database"
    ],
"files": [
        "app/Helpers/string.php" 
    ],
    "psr-4": {
        "App\\": "app/"
    }
},
"autoload-dev": {
    "psr-4": {
        "Tests\\": "tests/"
    }
},
"scripts": {
    "post-root-package-install": [
        "php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ],
    "post-install-cmd": [
        "Illuminate\\Foundation\\ComposerScripts::postInstall",
        "php artisan optimize"
    ],
    "post-update-cmd": [
        "Illuminate\\Foundation\\ComposerScripts::postUpdate",
        "php artisan optimize"
    ]
},
"config": {
    "preferred-install": "dist",
    "sort-packages": true,
    "optimize-autoloader": true
}

}

如果有人可以帮助我解决这个问题,我将很感激。

0 个答案:

没有答案