cancel
Showing results for 
Search instead for 
Did you mean: 

I can't solve PHP memory_limit installing Magento 2.2.6

SOLVED

I can't solve PHP memory_limit installing Magento 2.2.6

I install the Magento 2.2.6 in my host but I can't resolve the issue of PHP_memory_limit at all.

 

The response of server is:

PHP Settings Check *

Your current PHP memory limit is 320M. 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.

 

In phpinfo.php I have this:

  

Spoiler
memory_limit756M2000M

That's the file: floracigana.bornsolucoes.com.br/phpinfo.php

 

 I did have used Magento 1.6 at some years ago and didn't have this issues.

I restarted use it with Magento 2.2.6 and is a sucks try do it work.

I tried many of solutions in Community and didn't work.
Someone can give me a support me please?

 

htaccess file is:

 

<IfModule mod_php7.c>
############################################
## adjust memory limit

    php_value memory_limit 2048M
    php_value max_execution_time 18000

php.ini is:

 

memory_limit = 2048M

 

 

 

 
1 ACCEPTED SOLUTION

Accepted Solutions

Re: I can't solve PHP memory_limit installing Magento 2.2.6

Hi @bornsolucoesweb,

 

Maybe your PHP-CLI has a different memory limit?

Is it possible for you to check the configuration for CLI too?

View solution in original post

8 REPLIES 8

Re: I can't solve PHP memory_limit installing Magento 2.2.6

Hi @bornsolucoesweb,

 

Maybe your PHP-CLI has a different memory limit?

Is it possible for you to check the configuration for CLI too?

Re: I can't solve PHP memory_limit installing Magento 2.2.6

Hello @bornsolucoesweb

 

You maybe applied the changes in the wrong php.ini (since there's so many of them, especially in an old system ...)

Try finding the correct one as shown here magento 2.1 Doc PHP Settings

To find the PHP configuration file, php.ini:

To find the web server configuration, run a phpinfo.php file in your web browser and look for the Loaded Configuration File as follows

or add phpinfo() function in the index.php like :

<?php/**
 * Application entry point ...
 */phpinfo(); die;

try {
   require __DIR__ . '/app/bootstrap.php';
}

you can try looking for memory limit there.

 

And You can run 

CLI command php --ini ==== Result will be like this,

Configuration File (php.ini) Path:    /opt/alt/php70/etc

Loaded Configuration File:            /opt/alt/php70/etc/php.ini

 

Here you can find php.ini path

Manish Mittal
https://www.manishmittal.com/

Re: I can't solve PHP memory_limit installing Magento 2.2.6

@Manish Mittal @Damian Culotta

I did both.
It's not solved.
We fixed all configs of server and didn't resolve. I'm rage this.

Re: I can't solve PHP memory_limit installing Magento 2.2.6

Hi @bornsolucoesweb,

 

I understand that Magento is getting some other configuration with that lower limit for memory.

You should try to find which configuration file is in order to increase the limit.

There aren't so many options heresince the minimun limit is 756.

Re: I can't solve PHP memory_limit installing Magento 2.2.6

@Manish Mittal @Damian Culotta

 

Thanks for attention guys.
I finally solved the issue.
That was an inconsistency in magento installation made by Softaculous.
After remove all magento installation, reconfigure the php in server, it works!

Re: I can't solve PHP memory_limit installing Magento 2.2.6

@bornsolucoesweb

 

Glad to hear. cheers

Manish Mittal
https://www.manishmittal.com/

Re: I can't solve PHP memory_limit installing Magento 2.2.6

Thank you @bornsolucoesweb for sharing the final solution.

Re: I can't solve PHP memory_limit installing Magento 2.2.6

@Damian Culotta

 

You did put this solution and we use as a one of them:

Maybe your PHP-CLI has a different memory limit?

Is it possible for you to check the configuration for CLI too?

 

***********************

As a fact, beyond of this, the installation did fail in server because the subdomain that I install was configured wrong.
The PHP-CLI was a great solution the host did resolve to me, because I don't have access to SSH.
In future I will develop in local server machine on my pc to after do upload.

Thanks a lot.