![]() |
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (/showthread.php?tid=68868) |
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted - ciadvantage - 09-06-2017 I have this kind of error on the CI 3.1.5 which I recently migrated my legacy 2.2.x to and I tried to increase it by adding ini_set('memory_limit', '1024M') where I found the problem but still happened Anyone had the same problem? And how do you fix it? Greatly appreciate PS: the old legacy runs fine and never has this problem! RE: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted - InsiteFX - 09-07-2017 Sounds like you have an endless loop or bad code, check your code. RE: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted - rtenny - 09-07-2017 You might not be allowed by the server setting to change php.ini values in code. Try changing it directly in the php.ini RE: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted - PaulD - 09-07-2017 Agree with insiteFX, sounds like you have a coding problem somewhere. Unless you are running a truly massive or complex scenario, in which case you might need to rethink how you are approaching the whole thing. I had this with a pdf library once which had me flumoxed. Change libraries and everything was fine again. RE: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted - ciadvantage - 09-07-2017 Thanks for all suggestions, I dont think I have endless loop as the same code runs fine under 2.2.x and I migrated to CI 3.1.5 with little changes except class names for my custom controllers/ libraries/ models. I made some changes today and try again to see if this is gone away. I did use mpdf as libraries as mine is heavily computing data and make pdf output for deliveries but I dont get the point if this is the contributing factor to the problem. I have multiple users access to app but not like 100s at the same time so on... Regards |