Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php


Question

This error message is being presented, any suggestions?

Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php

1
267
7/6/2016 9:36:47 AM

Accepted Answer

At last I found the answer:

Just add this below line to before line of you getting error in your file

ini_set('memory_limit', '-1');

It will take unlimited memory usage of server, it's working fine.

Thanks for giving suggestion friends.

300
7/29/2015 2:24:34 PM

Here are two simple methods to increase the limit on shared hosting:

  1. If you have access to your PHP.ini file, change the line in PHP.ini If your line shows 32M try 64M: memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)

  2. If you don't have access to PHP.ini try adding this to an .htaccess file: php_value memory_limit 64M


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon