AW: [PHP-DB] Pictures+MySQL+PHP

2002-01-27 Thread Thomas Lamy



> -Ursprüngliche Nachricht-
> Von: Michael Waples [mailto:[EMAIL PROTECTED]]
> Gesendet: Samstag, 26. Januar 2002 09:54
> An: [EMAIL PROTECTED]
> Betreff: Re: [PHP-DB] Pictures+MySQL+PHP
> 
> 
> Ck Raju wrote:
> > 
> >  that I changed my mind. Gurhan Ozen>Storing images in the 
> database is not a
> >  good idea , just store the path of Gurhan Ozen>the images 
> in the database
> >  and keep your images in your hard disk... Gurhan Ozen>
> > 
> > Since everything is on hard-disk, I personally feel, the 
> image can be stored
> > anywhere. BLOB should be easier when doing a mysqldump, or 
> when replication
> > is needed.
> > 
> > Anywhere else go in for storing images separately.
> > Raju
> I prefer storing images out of the dbserver to save on server 
> load. You
> can serve those images with a http server like thttpd, boa etc which
> will serve images quicker and with a lighter load.
> If you need replication just use rsync to move your images around.
> 
> But if server load isn't an issue a database is as good as any place.
>
I did a community software where users can upload pics all over the
application. It is run on LVS cluster, so nobody can say to which of the
cluster members the pic is uploaded to. NFS, or unattended rsync/scp has
been denied by security policy, so the only way was to store the pics in the
DB (mysql).
I also did some performance measures, and, as all the pic requests had to go
thru php (for member verification), there was practically no performance
drawback; in fact, storing the pics in database was a bit quicker than
getting them through the filesystem when the number of pics went above
100,000 :-)
And now it is very easy to do full backups, and no problem with db/fs
getting out of sync.
Only one thing has given me a hard time: The first time I stored all 5
instances of an image (thumb plus 4 other resolutions) in the same db table,
but mysql choked on it when it became about 200 mb (the whole server did not
respond or respond veeery slow). I split the whole thing into 5 tables, and
now it runs like a charm.

Thomas  

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Pictures+MySQL+PHP

2002-01-26 Thread Boaz Yahav

I think that saving images outside the database is better but sometimes
you need it.
here is something i wrote a while back : 


Sometimes, it's more convenient to save images in a database than as
files. MySQL and PHP make it very easy to do this . In this article, I
will describe how to save 
images in a MySQL database and display them later on. 


http://www.weberdev.com/index.php3?GoTo=ViewArticle.php3?ArticleID=3


Sincerely

 berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.



> -Original Message-
> From: K [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 25, 2002 4:54 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Pictures+MySQL+PHP
> 
> 
> Hello,
> 
> last time I asked about inserting pictures into MySQL, but 
> how can I do it (inserting into BLOB column, picutures) using 
> PHP? After inserting it into table I would also like to 
> select and display the picutre (I inserted before) using my 
> Internet browser. Any suggestion how to do it using PHP+MySQL?
> 
> Best regards
> Kamil
> PS. I'll be pleased for all info on my private e-mail :)
> 

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Pictures+MySQL+PHP

2002-01-26 Thread Michael Waples

Ck Raju wrote:
> 
>  that I changed my mind. Gurhan Ozen>Storing images in the database is not a
>  good idea , just store the path of Gurhan Ozen>the images in the database
>  and keep your images in your hard disk... Gurhan Ozen>
> 
> Since everything is on hard-disk, I personally feel, the image can be stored
> anywhere. BLOB should be easier when doing a mysqldump, or when replication
> is needed.
> 
> Anywhere else go in for storing images separately.
> Raju
I prefer storing images out of the dbserver to save on server load. You
can serve those images with a http server like thttpd, boa etc which
will serve images quicker and with a lighter load.
If you need replication just use rsync to move your images around.

But if server load isn't an issue a database is as good as any place.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Pictures+MySQL+PHP

2002-01-25 Thread CK Raju

 that I changed my mind. Gurhan Ozen>Storing images in the database is not a
 good idea , just store the path of Gurhan Ozen>the images in the database
 and keep your images in your hard disk... Gurhan Ozen>

Since everything is on hard-disk, I personally feel, the image can be stored 
anywhere. BLOB should be easier when doing a mysqldump, or when replication 
is needed.

Anywhere else go in for storing images separately.
Raju


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Pictures+MySQL+PHP

2002-01-25 Thread Gurhan Ozen

Kamil,
If getting info in your private email is making you so pleased maybe you
shoudl never post any questions here, it is contradictory to the philisophy
of the list.
  I have also asked about inserting / retrieving pictures in mysql database
in past and I have received so many con replies that I changed my mind.
Storing images in the database is not a good idea , just store the path of
the images in the database and keep your images in your hard disk...

Gurhan


-Original Message-
From: K [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 25, 2002 9:54 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Pictures+MySQL+PHP


Hello,

last time I asked about inserting pictures into MySQL, but how can I do it
(inserting into BLOB column, picutures) using PHP? After inserting it into
table I would also like to select and display the picutre (I inserted
before) using my Internet browser. Any suggestion how to do it using
PHP+MySQL?

Best regards
Kamil
PS. I'll be pleased for all info on my private e-mail :)


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Pictures+MySQL+PHP

2002-01-25 Thread K

Hello,

last time I asked about inserting pictures into MySQL, but how can I do it (inserting 
into BLOB column, picutures) using PHP? After inserting it into table I would also 
like to select and display the picutre (I inserted before) using my Internet browser. 
Any suggestion how to do it using PHP+MySQL?

Best regards
Kamil
PS. I'll be pleased for all info on my private e-mail :)