Skip to content

Instantly share code, notes, and snippets.

@hassanrazadev
Forked from huzaifa-a/comopserinstall.md
Last active May 1, 2023 17:13
Show Gist options
  • Save hassanrazadev/e76fb79c74b8d3268f1c11d3d976189f to your computer and use it in GitHub Desktop.
Save hassanrazadev/e76fb79c74b8d3268f1c11d3d976189f to your computer and use it in GitHub Desktop.
composer install with php memory limit

we can get the composer path from composer help command

 php -d memory_limit=-1 /usr/sbin/composer install  --no-interaction --prefer-dist --optimize-autoloader

============ RUN composer with multiple versions of PHP

To run composer with specific version of PHP use

PATH_TO_PHP\php.exe PATH_TO_COMPOSER\composer.phar install

For example

D:\SERVER\php\7.2.0\php.exe C:\ProgramData\ComposerSetup\bin\composer22\composer.phar install --ignore-platform-req=php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment