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? Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.