I am new in Magento.
After installed the Stripe payment gateway, I am getting following message.
"The Stripe PHP library has not been installed. Please follow the installation instructions to install the dependency."
For Install the Stripe PHP library, I have run: composer require stripe/stripe-php:^7
Then, I have getting following error...
For update composer, I have run: composer selfupdate
After that I am getting following error.
rename(/usr/local/bin/composer.phar): failed to open stream: Read-only file system
In the root, there are two file composer.json and composer.lock
rename means composer.json to composer.phar or what?
Magento ver. 2.3.5-p1
Stripe Ver 2.4.1
Please guide me to fix the issue.
Thanks in advance
Try below command :
COMPOSER_MEMORY_LIMIT=-1 composer require stripe/stripe-php:^7
hope it helps !
I can see you're not using the command I gave, please check again and show correct screenshot, you are not appending COMPOSER_MEMORY_LIMIT=-1 before your composer command.
Please try again with correct command.
checkout the solutions mentioned here :
Hello @gaurav_harsh1 ,
Sorry for my late response.
I have checked the "stackoverflow" link, but not able to find the solutions. Sorry, I am new in Magento and the Command code.
Then I have contact Stripe Support and according to them.....
Some hosting providers limit the amount of memory per application, and sometimes they limit it for the entire system. This can cause composer to be either be killed or to fail with a memory error, because of insufficient available memory.
If the limitation is application specific, it is possible to bypass the memory limit that is set for composer by prepending the command with the following:
COMPOSER_MEMORY_LIMIT=-1 composer require stripe/stripe-php
If the issue persists after trying the above, it means that the physical memory available on the hosting provider may not be sufficient to run composer. Composer is a critical dependency of Magento which should be available by the selected hosting provider. In that case, could you please contact your hosting provider to report this issue? They will be in a better position to assist with this.
If you are the systems administrator of the host, you may also be able to increase the available memory yourself by following some of the example methods at https://stackoverflow.com/questions/20667761/composer-killed-while-updating
Try below command again :
php -dmemory_limit=-1 /usr/local/bin/composer require stripe/stripe-php:^7
Let me know if it works !