PHP: Fatal error
I happen to run a php script and i encountered the following error:
Fatal error: Out of memory (allocated 1820327936) (tried to allocate 33554432 bytes) in C:\xampp\htdocs\interim3\Includes\Controller\db_querystatements.php on line 84
in my db_querystatements.php i have set the memory limit to unlimited ini_set('memory_limit', '-1');
the error point to the following codes:
function dbQueryAclLocalPort(){
$db_data = new PDO ('sqlite:././Database/information.sqlite');
$result_data = $db_data->query('SELECT local_port from attacked_acl');
foreach ($result_data as $row_data)
{
$acllocalport[] = $row_data['local_port开发者_JS百科'];
}
return $acllocalport;
}
function dbQueryAclLocalHost(){
$db_data = new PDO ('sqlite:././Database/information.sqlite');
$result_data = $db_data->query('SELECT local_host from attacked_acl');
foreach ($result_data as $row_data)
{
$acllocalhost[] = $row_data['local_host'];
}
return $acllocalhost;
}
any advise? thanks
Your script seems to be using 1.8 GB of memory. It seems to be hitting the system's physical limit.
Try to reduce your script's memory usage or fix the memory leak that is causing this.
精彩评论