TheSky Posted July 17, 2011 Share Posted July 17, 2011 is there some way to write file if there is 3mb in buffer ? im using curl but i want download with that over 30mb file, memory limit is like 10mb atm im using this code // Append a new person to the file $current .= "$buffer \w"; // Write the contents back to the file //$file file_put_contents($filename,$buffer); Quote Link to comment https://forums.phpfreaks.com/topic/242208-memory-size-exceeded/ Share on other sites More sharing options...
Alex Posted July 17, 2011 Share Posted July 17, 2011 Depending on your host, you can always increase the memory limit; for example, ini_set('memory_limit', '40M') would increase the memory limit to 40MB. Quote Link to comment https://forums.phpfreaks.com/topic/242208-memory-size-exceeded/#findComment-1243860 Share on other sites More sharing options...
TheSky Posted July 17, 2011 Author Share Posted July 17, 2011 hmm... i think it will get just timeout now ... i want download file from other side of world Quote Link to comment https://forums.phpfreaks.com/topic/242208-memory-size-exceeded/#findComment-1243862 Share on other sites More sharing options...
Alex Posted July 17, 2011 Share Posted July 17, 2011 You can also increase the time limit: set_time_limit. Quote Link to comment https://forums.phpfreaks.com/topic/242208-memory-size-exceeded/#findComment-1243864 Share on other sites More sharing options...
TheSky Posted July 17, 2011 Author Share Posted July 17, 2011 i did try but im still geting Maximum execution time of 10 seconds exceeded in... Quote Link to comment https://forums.phpfreaks.com/topic/242208-memory-size-exceeded/#findComment-1243866 Share on other sites More sharing options...
Alex Posted July 17, 2011 Share Posted July 17, 2011 Then set it to more than 10 seconds.. Quote Link to comment https://forums.phpfreaks.com/topic/242208-memory-size-exceeded/#findComment-1243867 Share on other sites More sharing options...
TheSky Posted July 17, 2011 Author Share Posted July 17, 2011 sry i did upload my backup file.. set_time_limit(); was disabled on server Quote Link to comment https://forums.phpfreaks.com/topic/242208-memory-size-exceeded/#findComment-1243870 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.