PHP memory allocation problem

If PHP fails to allocate memory it returns one of the following errors:

  • Allowed memory size of %ld bytes exhausted at %s:%d (tried to allocate %lu bytes)

OR

  • Out of memory (allocated %ld) at %s:%d (tried to allocate %lu bytes)

No 1 occurs when PHP memory limit is reached and it is the limit which is controlled by memory_limit setting at php.ini.
No 2 comes from the operating system, php limit is not reached and changing php.ini will not help whatever people are advising about it.

Читать далее