Fatal error: allowed memory capacity of 67108864 bytes exhausted

I have a script that gives me headaches on a specific server.

I keep getting this error:

Fatal error : allowed memory size of 67108864 bytes exhausted

Despite the fact that I edited php.ini for 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 will the limit of 67108864 bytes be?

+7
source share
4 answers

Firstly, as far as I know, it should be 96M (without B) Secondly, make sure you edit the correct php.ini and you restart the web server after the change (necessary if PHP is loaded, for example, as an apache module )

And thirdly, increasing the memory limit may solve the problem, but it’s best to check why 64M is missing :)

+5
source

Have you restarted apache? Sometimes it is necessary.

0
source

I ran into a similar problem. Perhaps this is due to the fact that you are storing something very large in some variable or by selecting a large amount of data from your mySQL table. You need to provide more information about your script, because 64M is really enough to do most of the processing.

0
source

Reading the comments, it’s obvious that you are in a shared hosting account.

Usually you cannot edit your own php.ini , nor do you allow arbitrary restrictions for your enjoyment. This will quickly reduce the shared hosting server.

0
source

All Articles