Re: [PHP] best way to store images

2004-11-06 Thread raditha dissanayake
[EMAIL PROTECTED] wrote:
I'm trying to plan out the best way to develop an image hosting script for
my client.

 

You will find the answer in last week's archive.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] best way to store images

2004-11-05 Thread nate
I'm trying to plan out the best way to develop an image hosting script for
my client.



I'd like to use the least CPU intensive way assuming 10's of thousands of
images in this system. Disk space is less important, as that seems to be a
cheaper upgrade than memory/CPU would be.


There are basically 2 scenarios I've come up with but I'm open to other
ideas:

1)   Store images on the file system - and the image information (file
name, timestamp, size, dimensions, type, etc) in MySQL.

2)   Store images in MySQL table 1 and their corresponding information
in table 2.

 

Also for each image request I'd like to record bandwidth usage and probably
other statistics in MySQL so assume at least this one query on MySQL for
each image request (if not 2 queries if I store the image itself in MySQL).

 

Lastly, I will use mod_rewrite so clients can access images by their name
rather than a php page.

So I guess my questions are which scenario do you think is best and would
because mod_rewrite uses a little more overhead would that be a major issue
assuming a busy site?

Thanks for your help!

Nate