Quote:
|
*Fatal error*: Allowed memory size of 16777216 bytes exhausted (tried to allocate 65536 bytes) in */var/hsphere/local/home/xxxxxx/reviews/pp-inc.php* on line *1558
|
this also happened the otherday when i was trying to backup my database. so i contacted the hosting support and this is what they said:
Quote:
Hi there,
The problem is;
1. Extremely inefficient PHP code requiring up to 64MB of memory for every single page access
2. A recursive loop in your code which is killing the apache thread in the page.
When temporarily raising the memory limit for the script to 64MB per instance and commenting out the following code in file "weedtracker.com/reviews/pp-inc.php" we can get the page to load.
############################
if ( $CatPerms['children'][$id] != "" ) {
$processkids = explode( ",", $CatPerms['children'][$id] );
while ( list($num, $eachkid) = each($processkids) ) {
if ($CatPerms['ugview'][$eachkid] != 1 ) {
$numproducts += $subcats[$eachkid][3];
$numposts += $subcats[$eachkid][4];
}
$catonline[$id] += $catonline[$eachkid];
}
}
############################
You need to fix and optimize your code. The memory limit per script instance is 32MB.
Kind regards,
Support
|