title: CSV Export and download causes Internal Server Error
body: <p>I have a php script that queries a rather large database and stores results into a CSV. I keep getting a 500 Internal Server error when trying to download the file.</p>
  
  <p>My hunch is that since there's over 2000+ rows that it needs to put into the CSV, that it is timing out. I have my code in a text file.</p>
  
  <p>What can I do to fix this? Is this something that needs to be done in php.ini or do I need to SSH and modify the mysql timeout? Am I just going about this all wrong and I should be storing it to the server?</p>
  
  <p>Just need a little direction on how this should be done. Thanks in advance.</p>
  
  <p><a href="http://andreawine.ladev.co/csv-export.txt" rel="nofollow">http://andreawine.ladev.co/csv-export.txt</a></p>