Re: image files - upload and managment

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

 



On Saturday 30 October 2004 09:43, Jaskirat Singh wrote:

> 1) Storage and retrieval -  File system sounds like a better choice
> over database. We are talking about 20 thousand plus pictures.

Using a file system is usually the better choice. With the quantity of files 
you're handling it might be wise to implement some kind of directory hashing. 
For example having several thousand files in a single directory using 
ext2/ext3 file system results in very poor performance.

> 2) Thumbnails - Should I create those once and save it in a file when
> the image is uploaded for the first time. Looks like a faster option
> than creating them every time on the fly.

Definitely much faster to create it once (probably on upload) and store it 
rather than create on the fly each time. 

> 3) Security issues - I believe I must have a world writable "666"
> permissions directory to keep images as users of the web app are
> uploading them. Does that create any security holes in my application?

If you're on a shared-host there's really not much you can do to keep your 
files really (or even fairly) safe from your 'host mates'. What you can do is 
largely limited by how the system was configured. Storing files in the 
database can potentially add a layer of protection. If security is a concern 
then you should shell out the extra for a dedicated host.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
I am more bored than you could ever possibly be.  Go back to work.
*/

-- 
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