cooldude832 Posted December 3, 2007 Share Posted December 3, 2007 I get this on a page Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 16 bytes) in /home/rl/public_html/sandbox/functions.php on line 359 I know its running a lot of stuff, but it needs to. Link to comment https://forums.phpfreaks.com/topic/79920-solved-how-do-i-avoid-fatal-error-allowed-memory-size-of-8388608-bytes-exhausted/ Share on other sites More sharing options...
benjaminbeazy Posted December 3, 2007 Share Posted December 3, 2007 ini_set('memory_limit', '16M'); where 16 is however much memory you want to allocate in megabytes Link to comment https://forums.phpfreaks.com/topic/79920-solved-how-do-i-avoid-fatal-error-allowed-memory-size-of-8388608-bytes-exhausted/#findComment-404766 Share on other sites More sharing options...
cooldude832 Posted December 3, 2007 Author Share Posted December 3, 2007 so I take it 8388608 bytes is 16Mb, also is there a .htaccess way to write this? Edit: I think its 8mb cause I am seeing in phpinfo memory_limit 8M 8M Link to comment https://forums.phpfreaks.com/topic/79920-solved-how-do-i-avoid-fatal-error-allowed-memory-size-of-8388608-bytes-exhausted/#findComment-404768 Share on other sites More sharing options...
cooldude832 Posted December 3, 2007 Author Share Posted December 3, 2007 I figured out how to increase, but I am trying to reduce its useage. Let me expalin what I am doing I am using IMAP to open a mail box Then find all unseen messages then from there read the messages extract data based on sender and then off to mysql Any ideas? Link to comment https://forums.phpfreaks.com/topic/79920-solved-how-do-i-avoid-fatal-error-allowed-memory-size-of-8388608-bytes-exhausted/#findComment-404783 Share on other sites More sharing options...
cooldude832 Posted December 3, 2007 Author Share Posted December 3, 2007 So i solved it, I had an email I tried to read as html and it wasn't html so it ended up workin on the whole message instead of a 40 byte string 100 times so it did about 50000 times the work. Link to comment https://forums.phpfreaks.com/topic/79920-solved-how-do-i-avoid-fatal-error-allowed-memory-size-of-8388608-bytes-exhausted/#findComment-404798 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.