i've searched around here and through google and still haven't been able to come up with an answer. i've tried optimizing and repairing my tables and still can't quite figure out what's going on. heres the error:
Code:
[25-Feb-2013 23:26:33 UTC] PHP Fatal error: Allowed memory size of 94371840 bytes exhausted (tried to allocate 4137290 bytes) in /home/SITE/includes/classes/cache.php on line 127
and the relevant code:
PHP Code:
$result_serialize = $db->prepare_input(base64_encode(serialize($zf_result_array)));
PHP Code:
function sql_cache_store($zf_query, $zf_result_array) {
global $db;
$zp_cache_name = $this->cache_generate_cache_name($zf_query);
switch (SQL_CACHE_METHOD) {
case 'file':
$OUTPUT = serialize($zf_result_array);
$fp = fopen(DIR_FS_SQL_CACHE . '/' . $zp_cache_name . '.sql',"w");
fputs($fp, $OUTPUT);
fclose($fp);
return true;
break;
case 'database':
$sql = "select * from " . TABLE_DB_CACHE . " where cache_entry_name = '" . $zp_cache_name . "'";
$zp_cache_exists = $db->Execute($sql);
if ($zp_cache_exists->RecordCount() > 0) {
return true;
}
$result_serialize = $db->prepare_input(base64_encode(serialize($zf_result_array)));
$sql = "insert into " . TABLE_DB_CACHE . " set cache_entry_name = '" . $zp_cache_name . "',
cache_data = '" . $result_serialize . "',
cache_entry_created = '" . time() . "'";
$db->Execute($sql);
return true;
break;
case 'memory':
return true;
break;
case 'none':
default:
return true;
break;
}
}
Bookmarks