Thanks Rich. The files are not going to be downloaded all that often and the overall traffic is relatively low. However, as with probably everyone I am hoping and expecting big increases in traffic. I currently run most of my site off LAMP. My main concerns as you mentioned is using memory/CPU bandwidth. There will probably be far more files stored than accessed. Hope this helps everyone else with their opinions. On 5/20/07, Richard Davey <rich@xxxxxxxxxxxxx> wrote:
Hi benc11, Monday, May 21, 2007, 2:16:19 AM, you wrote: > I am in the process of adding a part to my website which would include > pictures, pdf files, txt files, and excel files. The files sizes > could be anywhere on average of 100k to 2mb. Do you think I should be > uploading the files to a MySQL database or to my server? > I have head that there are pros and cons to both, but have never > really received a definitive answer that helps much. I appreciate all > your opinions on the pros and cons of both. This isn't a 'one size fits all' question. The pros and cons are specific only to your site. How many uploads are you going to be dealing with, at what frequency, at what growth rate? Are they going to be massively downloaded too? There generally are far less 'pros' for storing binary files in MySQL than you'd think. The only real benefit imho is that they are then filesystem / platform agnostic. There are plenty of 'cons' however. Just think of the server overhead involved in your PHP script talking to MySQL, MySQL sending back the entire file to PHP (using memory / cpu bandwidth), then you've got to blast that file out to the end user. Repeat this X however much traffic you get and you're performing pointless exercises over and over when the web server could just serve the file directly. Only you can answer your question really. Cheers, Rich -- Zend Certified Engineer http://www.corephp.co.uk "Never trust a computer you can't throw out of a window" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- ********************************************************************** The content of this e-mail message and any attachments are confidential and may be legally privileged, intended solely for the addressee. If you are not the intended recipient, be advised that any use, dissemination, distribution, or copying of this e-mail is strictly prohibited. If you receive this message in error, please notify the sender immediately by reply email and destroy the message and its attachments. ********************************************************************* -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php