Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fatal error: Allowed memory size of 67108864 bytes exhausted

Tags:

php

I've got a script that's giving me headaches on a particular server.

I keep getting this error:

Fatal error: Allowed memory size of 67108864 bytes exhausted

Even though I've edited php.ini to this:

max_execution_time = 300     ; Maximum execution time of each script, in seconds
max_input_time = 600    ; Maximum amount of time each script may spend parsing request data
memory_limit = 96M    ; Maximum amount of memory a script may consume (16MB)

Where would the 67108864 bytes limit be coming from?

like image 424
RegEdit Avatar asked Aug 14 '11 21:08

RegEdit


People also ask

How do I fix fatal error allowed the memory size of 134217728 bytes exhausted?

The correct way is to edit your php. ini file. Edit memory_limit to your desire value. As from your question, 128M (which is the default limit) has been exceeded, so there is something seriously wrong with your code as it should not take that much.

How do I fix fatal error allowed memory size?

Fix error allowed memory size WP with WHMLog in to WHM. Go to "MultiPHP INI Editor". If you have multiple PHP versions on the server, set the one that is responsible for the problem with your Wordpress website. Scroll down where it says "memory_limit" and immediately make it 256M or even 512M.

How do I fix the allowed memory size 1610612736 bytes exhausted?

Allowed memory size of 1610612736 bytes exhausted ??? can someone help me this? Try prefixing your command with COMPOSER_MEMORY_LIMIT=-1 . This will remove the memory limit for the execution of the command.


1 Answers

First, as far as I know, it has to be 96M (without the B) Second, make sure you are editing the correct php.ini, and you are restarting the web server after the change (needed if PHP is loaded as an apache module for example).

And third, increasing the memory limit may resolve the problem, but it's best to check why 64M are not enough :)

like image 152
Maxim Krizhanovsky Avatar answered Sep 29 '22 07:09

Maxim Krizhanovsky