· errors php

Fatal error: allowed memory size of Unknown on line 0

So I had this error with my WordPress site when I moved the server its hosted on, and I Googled the hell out of it.

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 134217728 bytes) in Unknown on line 0

Every forum, blog and article all pointed to the obvious ‘bytes exhausted’ – this makes sense, PHP needs more Memory. OK, so I increased the memory limit from 128M to 256M but I still had the error… what??

Here is the part to note.. This error line, is meant to say how much is allocated before it hit the limit, how much it tried to use and the line of the PHP file it got to before running out… my error memory amounts match and the file is unknown and the line is 0!!! But I found the cause… can you see it below?

-rw——-. 1 amehar amehar 78376960 Jan 17 00:11 index.php

75MB for an index file for WordPress?? I dont think so.. turns out, when I tarred up the site, I someone how messed it up, mostly likely sending the tar output into index.php, I replaced the index file with a standard WordPress one and everything worked.. I even lowered the memory limit back to 128M.

  • LinkedIn
  • Tumblr
  • Reddit

Aaron Mehar

Berkshire, UK