cancel
Showing results for 
Search instead for 
Did you mean: 

Fresh Install Successful, PHP Error when Installing modules or extensions

Fresh Install Successful, PHP Error when Installing modules or extensions

Have followed all of the recommendations that have been given online.  Magento 2.3.1 installs fine.  Have cron jobs running.  When I try to install a module or update extensions I get the PHP Memory Limit Set to 256M error message.  I have changed the memory limit setting in the user.ini file, the php.ini file and the .htaccess file all over my site.  It is set to 2G.  I still get this error message.  When I had it set in all of these places to exactly 756M, I still got the same message.  Not sure what I am doing wrong now.  Can I get some assistance?

9 REPLIES 9

Re: Fresh Install Successful, PHP Error when Installing modules or extensions

Hi @bryant_ubaka-bl

you need to increase memory_limit on the server.

memory_limit = 4096M Atleast

For now, you can increase and debug more if any collection is tasking too long time to process.

Add following line in index.php.
ini_set("memory_limit","-1");
If it will not work then you need to increase from the server.

If you are increasing from the server, then you need to restart your server once.

You can also check using phpinfo(); function that memory_limit is increased or not.

Clear cache and then check.

I hope it will help you!

Re: Fresh Install Successful, PHP Error when Installing modules or extensions

Okay tried what you suggested and it is still giving me the same error. I have updated the index file and php.ini  when I try to install an extension it still gives me this error:

Check Component Dependency

We found conflicting component dependencies. 

 

For additional assistance, see 

PHP Settings Check *

Your current PHP memory limit is 256M. Magento 2 requires it to be set to 756M or more. As a user with root privileges, edit your php.ini file to increase memory_limit. (The command php --ini tells you where it is located.) After that, restart your web server and try again.

For additional assistance, see 

 

Re: Fresh Install Successful, PHP Error when Installing modules or extensions

Did you restarted server?

Put a file on root folder with phpinfo.php

Write following code:
phpinfo();

Run from the browser and make sure that memory_limit is updated.

http://hostname/phpinfo.php

If you have multiple php then you need to give php path like:
for example:
/usr/bin/php7.2

Re: Fresh Install Successful, PHP Error when Installing modules or extensions

I did that and it reads that memory_limit is 4096M but when I go in to Magento and try to install anything it gives the same message.  I am lost

Re: Fresh Install Successful, PHP Error when Installing modules or extensions

Please go through the following url:

https://magento.stackexchange.com/questions/167862/php-memory-limit

Or

Can you try once using inline memory:

php -d memory_limit=-1 bin/magento

It may help you.

Re: Fresh Install Successful, PHP Error when Installing modules or extensions

I just checked, using inline unlimited memory limit is working.

php -d memory_limit=-1 bin/magento

I hope it will work you as well.

Re: Fresh Install Successful, PHP Error when Installing modules or extensions

Hi @bryant_ubaka-bl 

Did it work for you?

Re: Fresh Install Successful, PHP Error when Installing modules or extensions

Unfortunately not, still getting errors.

Re: Fresh Install Successful, PHP Error when Installing modules or extensions

@bryant_ubaka-bl 

Did you tried commands using

php -d memory_limit=-1 bin/magento

what errors you are getting now?