Impluo Posted August 18, 2011 Share Posted August 18, 2011 I have a problem with the server I am on, it seems to change it's mind on how big of a file I can open at random times. I had coded a script to collect data and had originally split the files up into chunks of less than 5mb per file since at the time the server wouldn't allow me to open and scan a file that was over 5mb. Now here's the problem, yesterday through cron i acidentally set it to run hourly and ended up with 3 of the same process and had files that were 10mb+. Low and behold it was now letting me open and scan files that were 10-20mb. Then comes today... I can't even have it read a file that is 4mb. There were no other processes running either, so I am at a loss wondering what is going on. Any help on this issue would be great! Quote Link to comment https://forums.phpfreaks.com/topic/245114-memory-limit-allowed-changes-randomly/ Share on other sites More sharing options...
jjacquay712 Posted August 18, 2011 Share Posted August 18, 2011 What is the error you are getting when you can't open a file? If it is the one I'm thinking of you might me able to use this line: <?php ini_set('memory_limit', '512M'); ?> Quote Link to comment https://forums.phpfreaks.com/topic/245114-memory-limit-allowed-changes-randomly/#findComment-1259016 Share on other sites More sharing options...
Impluo Posted August 18, 2011 Author Share Posted August 18, 2011 Memory Limit exhausted 134mb of memory and tried to allocate 50mb. I thought it might have had to do with ini_set but wasn't sure. It works now, thanks! Quote Link to comment https://forums.phpfreaks.com/topic/245114-memory-limit-allowed-changes-randomly/#findComment-1259019 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.