I'm attempting to use the method show on this page to download files from my webserver.


This works, but the problem is that files over 4MB will cause a 500 error. I did some checking and the line where it crashes is


Any ideas why this would crash on files over 4mb in size?