3

I tried to set up a new local XAMPP installation recently, and wanted to install the Luna Forum software on it. But after finishing the installation, I got prompted with this error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 7168 bytes) in [...]\forum\themes\Fifteen\views\header.php on line 43

It is not the usual problem that has been asked here before, because as you see the 7168 bytes is way below the maximum of 134217728 bytes. The file where the error occours is https://github.com/GetLuna/Luna/blob/lunadev/themes/Fifteen/views/header.php .

It doesn't seem to belong to the code, because as you see in the line there is nothing that could create problems, only the </div>.

The error appears both on the latest stable version and the newest developer build of Luna.

Any idea how to fix that?

Namnodorel
  • 133
  • 2

2 Answers2

2

The error is slightly different then you've interpreted it. It's not saying that you've only used 7168 bytes, but that 7168 + currently used >= 134217728 bytes.

Really, you should file a bug with the Luna software team to investigate, as this will be really complicated to solve without having in-depth knowledge of their software internals.

R. S.
  • 1,624
  • 12
  • 19
  • 1
    Okay, I've looked at the code again, and I think I've figured it out (no idea how I missed that before): the `require` at the beginning of the file references itself and by that creates an infinite loop... The line number doesn't tell us anything, because it says just at which point loading the file again made the memory overflow... But your answer made the exception more clear and brought me on the right track, thanks! ^^ – Namnodorel Oct 17 '16 at 07:12
0

Maybe too obvious but have you tried increasing the memory limit in your php.ini file?

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 128M 
Chico3001
  • 213
  • 1
  • 10