In Magento 2, when trying to install 3rd party extension via composer, like:
composer require vendor_name/module_name
server shows memory allocated error, like PHP Fatal error: Allowed memory size of xxxxx bytes exhausted
problem was that server is configured to php70 and even increase of memory in pgp.ini does not help,
Solution:
there is ability to run composer command via php, like:
php70 composer.phar require vendor_name/module_name
If it will say something like: could not open input file composer.phar
it means that it is not installed or something, so try to install it by command
curl -sS https://getcomposer.org/installer | phpit will place composer.phar file right in curent folderafter this, you can try to execute command like:
php composer.phar require vendor_name/module_name
to change memory limit execute like
to change memory limit execute like
php -d memory_limit=2G composer.phar require vendor/modulealso, try to skip requirements like
composer require vendor/module --ignore-platform-reqs