cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with update composer and the The Stripe PHP library.

Issue with update composer and the The Stripe PHP library.

Hello Guys,

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
Ref: https://stripe.com/docs/plugins/magento/install#manual

Then, I have getting following error...
https://prnt.sc/w0mowo
st-libary.jpg

 

 For update composer, I have run: composer selfupdate

 

 After that I am getting following error.
https://prnt.sc/w0mo4a

error.png
[ErrorException]
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

Regards,
Mintu

7 REPLIES 7

Re: Issue with update composer and the The Stripe PHP library.

Hello @mintuurtha0c40 

 

Try below command :

COMPOSER_MEMORY_LIMIT=-1 composer require stripe/stripe-php:^7

hope it helps !

Problem Solved ? Click on 'Kudos' & Accept as Solution to encourage to write more answers !

Re: Issue with update composer and the The Stripe PHP library.

Hello @gaurav_harsh1 ,

 

Thank you for your reply.

I have tried and still getting same errorSmiley Sad

https://prnt.sc/w0mowo

Regards,
Mintu

Re: Issue with update composer and the The Stripe PHP library.

COMPOSER_MEMORY_LIMIT=-1@mintuurtha0c40 

 

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.

Problem Solved ? Click on 'Kudos' & Accept as Solution to encourage to write more answers !

Re: Issue with update composer and the The Stripe PHP library.

Hi @gaurav_harsh1 ,

Thank you for your reply.

Sorry, I attached wrong screenshot.


Please check below screenshot 
https://prnt.sc/w0snw6

Thank you
Mintu

Re: Issue with update composer and the The Stripe PHP library.

@mintuurtha0c40 

 

checkout the solutions mentioned here :

https://stackoverflow.com/questions/49212475/composer-require-runs-out-of-memory-php-fatal-error-all...

Problem Solved ? Click on 'Kudos' & Accept as Solution to encourage to write more answers !

Re: Issue with update composer and the The Stripe PHP library.

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

 

I have tried the command :  COMPOSER_MEMORY_LIMIT=-1 composer require stripe/stripe-php , but result is the same error "Out of memory". 

Then I have talked with SiteGround support and our shared servers PHP memory_limit is 768M, and to increased the memory, we need to upgrade our hosting.
 
Please suggest,  how to install the Stripe Extension on current PHP memory_limit 768M?

If it is possible, then please guide.

Thank you.

Regards,
Mintu
 

Re: Issue with update composer and the The Stripe PHP library.

Hello @mintuurtha0c40 

 

Try below command again :

php -dmemory_limit=-1 /usr/local/bin/composer require stripe/stripe-php:^7

Let me know if it works !

Problem Solved ? Click on 'Kudos' & Accept as Solution to encourage to write more answers !