Re: Re: Uploading Files Should I use MySQL or Server for storage?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/22/07, clive <clive@xxxxxxxxxx> wrote:
itoctopus wrote:
> I have tried both, and I tell you that I really felt that the filesystem is
> a more convenient way of doing it.
>
I have to agree, filesystems were after all designed to store files. I
reckon reading a file from disk is much quicker than reading from a
database, maybe only fractionaly though.

--
Regards,

Clive.

Real Time Travel Connections

Ok, and what about Security etc? We only talk about speed here.
Databases are username & password protected. Files stored at the
filesystem are unprotected.
If you server files directly from the filesystem through Apache,
without interaction of PHP you might end up with people uploading all
kind of hacks. For example if they upload PHP files, and they get
served directly, then the PHP code will probably be executed.
Also, if you end up with a lot of files on one big disk (also for RAID
0), it would result in slow speeds for finding the actual data on the
disk. Read operations are faster, but for small files, a database
would be faster. This is probably not for your project, as you're
files are little bit larger. [Please, don't ask for benchmarks of
above statement.]

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux