Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why do I get the error Allowed memory size of Xxx bytes exhausted?

0
Posted

Why do I get the error Allowed memory size of Xxx bytes exhausted?

0

You are exhausting the available memory that PHP has access to. There are three work arounds: 1 – Edit the master php.ini – There is a config variable named memory_limit that by default is set to 8MB. Edit php.ini and increase it to a larger value (restart Apache afterwards). 2 – Edit .htaccess file – If you don’t have access to php.ini then you can sometime edit / create a .htaccess file for your gallery directory. When adding that line to .htaccess, you must use a number, in bytes. For example, 8MB would be about 8000000 bytes. Sometimes you can’t create a .htaccess file on a shared host and Apache will through an error message.

0

[answered by Vallimar] You are exhausting the available memory that PHP has access to. In php.ini there is a config variable named memory_limit that by default is set to 8MB. I quickly exhausted this after uploading a couple thousand images and had to increase it. Edit php.ini and increase it to a larger value (restart Apache afterwards). If you don’t have access to php.ini, you can add this line to your .htaccess file.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123