On my server I have the following error:
Allowed memory size of 268435456 bytes exhausted
This happens in a loop (a foreach one) and when I'm checking the memory usage in the loop with
memory_get_peak_usage();
I obtain 7254128
which is far from the 268435456
exhausted!
I checked at multiple places and the memory usage is not increasing wildly so I really don't know where the problem is!
The same script is working just fine on my local computer where I setted the memory limit to only 16M
in my php.ini
file
Here is the code causing the problem, but i think it won't be really usefull, it's from a plugin of question2answer open source plateform:
foreach ($badges as $slug => $info) {
$badge_name=qa_badge_name($slug);
if(!qa_opt('badge_'.$slug.'_name'))
qa_opt('badge_'.$slug.'_name',$badge_name);
$name = qa_opt('badge_'.$slug.'_name');
}