I am trying to install instamojo payment gateway to my magento2 store, as per the instructions givne by instamojo page https://docs.instamojo.com/page/instamojo-integeration-for-magento-2
i tried the command using CLI (ssh) at my ubuntu host
composer update instamojo/instamojo-magento-2
Loading composer repositories with package information
Updating dependencies (including require-dev)
Killed
I searched Google and found that , it happens because composer runs out of memory, but how could i increase the memory at remote server (I am running the website on live server at Godaddy)
Is there any other way of doing this ??
4 Answers 4
Try this with more memory
php -d memory_limit=4G /usr/local/bin/composer update
OR
php -d memory_limit=-1 /usr/local/bin/composer update
you can try something like this too:
php -d memory_limit=512M /usr/local/bin/composer update
Where /usr/local/bin/composer is the path where your composer is installed. And 512M is yor memory limit.
-
php -d memory_limit=-1M /opt/cpanel/composer/bin/composer update instamojo/instamojo-magento-2 i tried again, and got message "KilledAmul Bhatia– Amul Bhatia2018年08月13日 18:30:05 +00:00Commented Aug 13, 2018 at 18:30
If composer runs out of memory, you'll have to increase memory limit for php , you can locate your php.ini by executing following command in your ssh terminal ;
php -i | grep "Configuration File (php.ini) Path"
Open up the ini file , search and increase value for memory_limit until error resolves or you can set value to -1 to remove memory limit.
Note that you must restart apache/nginx service after your change php configuration.
EDIT :
Try following command ;
php -r "readfile('getcomposer.org/installer');"; | php
-
but its have shared hosting, cant restart server .. any idea ?Amul Bhatia– Amul Bhatia2018年08月13日 17:46:35 +00:00Commented Aug 13, 2018 at 17:46
-
check edit and see if it works for you.Vivek Kumar– Vivek Kumar2018年08月13日 18:04:04 +00:00Commented Aug 13, 2018 at 18:04
-
sorry, i just copied that command.. nothing worked error syntax error near unexpected token `|'Amul Bhatia– Amul Bhatia2018年08月13日 18:09:36 +00:00Commented Aug 13, 2018 at 18:09
-
check out this question - stackoverflow.com/questions/36107400/…Vivek Kumar– Vivek Kumar2018年08月13日 18:11:55 +00:00Commented Aug 13, 2018 at 18:11
-
php -d memory_limit=-1M /opt/cpanel/composer/bin/composer update instamojo/instamojo-magento-2 i tried again, and got message "Killed"Amul Bhatia– Amul Bhatia2018年08月13日 18:19:16 +00:00Commented Aug 13, 2018 at 18:19
Try below command:
php -d memory_limit=4G composer update
Explore related questions
See similar questions with these tags.