Reply to Re: Difference between storing files on folder and in mysql db

Your name:

Reply:


Posted by Rik Wasmus on 01/09/08 03:55

On Wed, 09 Jan 2008 04:45:36 +0100, Norman Peelman <npeelman@cfl.rr.com>
wrote:
>> I thought it would be a big issue to stuff them in the database, but
>> it was - with one notable issue* - easy.
>> Once indsider the database, they can only be accessed BY the database,
>> and the root user,. A considerable extra bit of security, and, since
>> the databasse is backed up regularly, a Good Thing in that sense as
>> well.. no need to explicitly back up a directory of uploaded files, nor
>> worry about access permnissions to it.
>> * the one notable exception was a 'feature' of PHP file handling, I
>> wanted to use SQL LOAD_FILE to load the temporary file into the
>> database. BUT it does not actually exist on disk until php closes..a
>> tad too late to be useful. move_uploaded_file() did not create a disk
>> file either,. But copy() did. The bug and workaround are on the php
>> docs site somewhere.
>>
>
> Not true... my website does this all day long. Tested with a sleep
> function and watched temp file get created and processed in designated
> directory. Check your open_basedir and upload_tmp_dir directives.

It's a known problem, and not related to those 2 settings. It seems to
depend on some OS settings regarding the tmp dir. Most boxes don't have
this problems, others have. Sadly I cannot tell you exactly what the
settings/parameter on which this problem depends actually are, as far as I
can remember it could be quite complex.
--
Rik Wasmus

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация