2

hey guys i have a problem running Meagento commands setup & compile because of memory limit it's 256.

i have requested from the hosting company to increase my memory limit to 1024MB and they did. i can see the change on php.ini file at root folder in cpanel.

but when i ran the commands i got the same errors again of memory limit so i checked the limit with

php -r "echo ini_get('memory_limit').PHP_EOL;" 

i found that it is still 256MB. Is there any place where in my Magento that this limit is saved ???

any help please i'm stuck

1
  • No,magento does not save memory_limit Commented Aug 7, 2017 at 15:32

2 Answers 2

3

Try these command:

php -dmemory_limit=1G bin/magento setup:upgrade php -dmemory_limit=1G bin/magento setup:static-content:deploy php -dmemory_limit=1G bin/magento setup:di:compile 
1
  • like a charm. thank you so much i had no idea that i could increase memory with each command ..... thanks again Commented Aug 7, 2017 at 19:02
3

When you run

php -r "echo ini_get('memory_limit').PHP_EOL;" 

you are not initializing magento at all.

It is possible, that your hoster increased memory limit for your webserver, but not for cli (which you are running here).

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.