Reputation: 1
Im new in laravel
Always get this
Symfony\Component\ErrorHandler\Error\FatalError Allowed memory size of 2147483648 bytes exhausted (tried to allocate 2147483656 bytes) Error on this line
$arrayGejala = collect([
substr($gejala1, 14, 1),
substr($gejala2, 14, 1),
substr($gejala3, 14, 1),
])->implode(',');
$belief = DB::table('pengetahuan')->select(DB::raw("GROUP_CONCAT(penyakit.kode_penyakit)"), 'pengetahuan.bobot')
->from('pengetahuan')
->join('penyakit', 'pengetahuan.id_penyakit', '=', 'penyakit.id_penyakit')
->whereIn('pengetahuan.id_gejala', [(array)$arrayGejala[0],(array)$arrayGejala[2],(array)$arrayGejala[4]])
->groupBy('pengetahuan.id_gejala')
->get();
$evidence = array();
while ($row = $belief->first()) {
$evidence[]=$row;
}
Upvotes: 0
Views: 15065
Reputation: 191
Increase your maximum memory limit to 64MB in your php.ini file. Google search But could I ask why you are trying to allocate that much memory? What line of code does it fail at?
in your PHP.ini file, change the line in PHP.ini If your line shows 32M try 64M: memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)
If you don't have access to PHP.ini try adding this to an .htaccess file: php_value memory_limit 64M
Upvotes: 1