8

I am Trying to install sample data on xampp server using below command php bin/magento sampledata:deploy And i am getting error like this

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 40 bytes) in C:\xampp\htdocs\magento v2.0\vendor\composer\composer\src\Composer\ Json\Json File.php on line 259

can any one help me?

Manashvi Birla
8,8739 gold badges29 silver badges53 bronze badges
asked Oct 13, 2016 at 6:31
2
  • You might need to add RAM to your server. Commented Jan 7, 2021 at 2:22
  • You might need to add RAM to your server. Commented Jan 7, 2021 at 2:22

3 Answers 3

10

There are 2 solution for that:

Option 1 - Permanent Solution

change php.ini to increase memory_limit value on global level

memory_limit = 768M

Or You can also change in .htaccess file.

php_value memory_limit 768M
php_value max_execution_time 18000

Option 2 - Temporary Solution

quick solution add memory size in the command :

php -dmemory_limit=768M php bin/magento sampledata:deploy

change 768M to what you want

answered Oct 13, 2016 at 6:39
1
  • last command: php -dmemory_limit=768M && php bin/magento sampledata:deploy Commented May 25, 2021 at 8:12
1
php -d memory_limit=-1 bin/magento sampledata:deploy
answered Mar 4, 2021 at 10:56
0

$ php --ini

Loaded Configuration File: /Applications/MAMP/bin/php/php7.1.8/conf/php.ini

$ nano /Applications/MAMP/bin/php/php7.1.8/conf/php.ini

change the memory_limit there and that's it!

answered Mar 27, 2019 at 12:50

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.