jakebur01 Posted August 17, 2007 Share Posted August 17, 2007 i am getting this error: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 40 bytes) in \db_fns.php on line 15 here is that section of the code: function db_result_to_array($result) { $res_array = array(); for ($count=0; $row = $result->fetch_assoc(); $count++) $res_array[$count] = $row; return $res_array; } If it didn't count it would it fix my problem? How could I fix this? Link to comment https://forums.phpfreaks.com/topic/65372-solved-bytes-exhausted/ Share on other sites More sharing options...
448191 Posted August 17, 2007 Share Posted August 17, 2007 You're fetching over 128MB from a table and storing it in an array. Either up memory_limit in php.ini (not recommended) or pull back less rows. Why would you want 128MB of data in a single request? Link to comment https://forums.phpfreaks.com/topic/65372-solved-bytes-exhausted/#findComment-326462 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.