I was going crazy with this.
I got the next message:
Allowed memory size of 262144 bytes exhausted (tried to allocate 24576 bytes)
memory_limit = 128M
memory_limit 128MB 128MB
php_value memory_limit 128M
I see my problem is a little bit different from yours, but I'll post this answer in case it helps someone else. I was using
MB as shorthand instead of
M when defining my memory_limit, and php was silently ignoring it. I changed it to an integer (in bytes) and the problem was solved.
My php.ini changed as follows:
memory_limit = 512MB to
memory_limit = 536870912. This fixed my problem. Hope it helps with someone else's! You can read up on php's shorthand here.
As Yaodong points out, you can just as easily use the correct shorthand, "M", instead of using byte values. I changed mine to byte values for debugging purposes and then didn't bother to change it back.