PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, February 9, 2022

[FIXED] Composer require runs out of memory. PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted Voyager

 February 09, 2022     composer-php, laravel, php, voyager     No comments   

Issue

Hi, I am trying solve some problem when I am install voyager. When I try to run composer require I am getting the out of memory error. I am not understand what exably happend. Its result on my console:

@DESKTOP->>>>> /c/xampp/htdocs/ (master) $ composer require tcg/voyager Using version ^1.4 for tcg/voyager ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 134217736 bytes) in phar://C:/composer/composer.phar/src/Composer/DependencyResolver/RuleSet.php on line 83```

Maybe there's a problem with the composer.JSON, something I need to check out. What you should pay attention to what is the problem My composer.json file``` {

{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
    "framework",
    "laravel"
],
"license": "MIT",
"require": {
    "php": "^7.2",
    "convertapi/convertapi-php": "^1.1",
    "fideloper/proxy": "^4.0",
    "laravel/framework": "^6.2",
    "laravel/socialite": "^4.3",
    "laravel/tinker": "^1.0",
    "openpayu/openpayu": "^2.2",
    "paypal/rest-api-sdk-php": "^1.14",
    "pragmarx/tracker": "^3.5",
    "spatie/laravel-backup": "^6.8",
    "spatie/pdf-to-image": "^2.0",
    "tcg/voyager": "^1.3"
},
"require-dev": {
    "facade/ignition": "^1.4",
    "fzaninotto/faker": "^1.4",
    "mockery/mockery": "^1.0",
    "nunomaduro/collision": "^3.0",
    "phpunit/phpunit": "^8.0",
    "tanmuhittin/laravel-google-translate": "^1.0"
},
"config": {
    "optimize-autoloader": true,
    "preferred-install": "dist",
    "sort-packages": true
},
"extra": {
    "laravel": {
        "dont-discover": []
    }
},
"autoload": {
    "psr-4": {
        "App\\": "app/"
    },
    "files": [
        "app/Helpers/HelperFunctions.php"
    ],
    "classmap": [
        "database/seeds",
        "database/factories"
    ]
},
"autoload-dev": {
    "psr-4": {
        "Tests\\": "tests/"
    }
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
    "post-autoload-dump": [
        "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
        "@php artisan package:discover --ansi"
    ],
    "post-root-package-install": [
        "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "@php artisan key:generate --ansi"
    ]
},
"repositories": {
    "hooks": {
        "type": "composer",
        "url": "https://larapack.io"
    }
}

}


Solution

Looks like you are using xampp. you can try to change the memory_limit in php.ini. enter image description here

Find this:

;memory_limit=512M 

Change to :

memory_limit =-1

Then restart the Apache from xampp



Answered By - Andy Song
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing