1
grandfso
Storing imgs, in database insead of uploading 'em
  • 2004/8/13 9:06

  • grandfso

  • Just popping in

  • Posts: 14

  • Since: 2004/8/8 1


Hello, i want to store imgs in database as a binary data, instead of uploading them to the server. i dont know how may i change it.
I am using my-album v.2.83
hope, someonell give me an advice

2
tedsmith
Re: Storing imgs, in database insead of uploading 'em
  • 2004/8/13 14:18

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


Log in as Administrator, go to System, then select Images.

At bottom, there is a selection utility to define whether to upload or store as BLOB (Binary Large Object) in Database.

Hope this helps.


3
djsckizo
Re: Storing imgs, in database insead of uploading 'em
  • 2004/8/13 15:41

  • djsckizo

  • Just can't stay away

  • Posts: 401

  • Since: 2003/5/9 8


is doing this a good or bad thing though? won't it be more intensive on the database?

4
grandfso
Re: Storing imgs, in database insead of uploading 'em
  • 2004/8/13 16:01

  • grandfso

  • Just popping in

  • Posts: 14

  • Since: 2004/8/8 1


Quote:
Log in as Administrator, go to System, then select Images.

At bottom, there is a selection utility to define whether to upload or store as BLOB (Binary Large Object) in Database.

Hope this helps.


i am not sure if itll take effect on my-album, what do you think?

5
tedsmith
Re: Storing imgs, in database insead of uploading 'em
  • 2004/8/13 17:05

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


Well, I'm no expert.

I use myAlbum, and have got it set to simply upload because I don't really like the idea of storing the pics in the database - not for any particular reason - I just think it sounds 'risky'.

In my case, I know that I can delete records and any pictures that go with them direct from XOOPS Admin, so it isn't like i need to have them seperated - I won't be manually sifting through the uploads folder so they can just sit there for all I care - as long as the database and XOOPS knows which one's go with which record, that's OK. Do you see my point?

I don't know what the advantages or disadvantages are I'm afraid.

I think it will effect myalbum because it creates a folder called 'photos' in your uploads folder. If XOOPS has been told to store images in the database, then I expect that will talk to the myalbum module and tell it to do the same.

Sorry I can't help more - I am sure an expert will be able to help if they read this.

6
djsckizo
Re: Storing imgs, in database insead of uploading 'em
  • 2004/8/13 17:59

  • djsckizo

  • Just can't stay away

  • Posts: 401

  • Since: 2003/5/9 8


Quote:

tedsmith wrote:
Log in as Administrator, go to System, then select Images.

At bottom, there is a selection utility to define whether to upload or store as BLOB (Binary Large Object) in Database.

Hope this helps.



I don't think myalbum will be affected by that. I think that only applies to images uploaded through that specific XOOPS admin utility.

7
grandfso
Re: Storing imgs, in database insead of uploading 'em
  • 2004/8/13 19:45

  • grandfso

  • Just popping in

  • Posts: 14

  • Since: 2004/8/8 1


Well, i want upload images to database, because on my server i've got 100mgs of webspace, and non-linited database size. I am going to make my own PC Game vortal, and i think i'll need many free space for screenshots and stuff like wallpapers for example. I know it may be 'risky', but its good idea as long as db size is unlimited ^_^

8
tedsmith
Re: Storing imgs, in database insead of uploading 'em
  • 2004/8/14 23:26

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


thats a good point - I am limited to 100MB and expect lots of picture uploads, so if database size not limited then that is perfect.

Perhaps some who really knows could help us all here? Are there any downfalls to putting pics in database - performance, management etc?

9
Hoosty
Re: Storing imgs, in database insead of uploading 'em
  • 2004/8/14 23:52

  • Hoosty

  • Just popping in

  • Posts: 14

  • Since: 2004/5/8 1


Hi

I have been storing my images in the MySQL database as BLOB since this feature became available with XOOPS. On my system it does not slow anything down and has been running well and with no problems to report.

Advantage is that yes the database grows in size but when one wishes to back up ones site it is done by simply downlaoding the database, pictures and all. A restore is also a breeze. Myalbum has a XOOPS image manager hook which allows the BLOB data to be used within the myalbum module, nice feature GI JOE

Cheers

Hoosty

10
tedsmith
Re: Storing imgs, in database insead of uploading 'em
  • 2004/8/15 14:20

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


I've done a little research on this now and it seems that there are two distinct advantges and disadvantages.

Advantages : It gets around PHP safemode file
system issues and filesystem rights/restrictions in general makeing the code a bit more portable because you don't have to think twice about the rights management of the server beyond the database. However, with XOOPS this does not apply (I don't think).

It makes backups easier because you don't have to backup a filesystem and database - just the DBase

Disadvantages : It is apparently slower to access binary data from a database rather than the file system so binary/blob data retrieval from a database can be the bottleneck of a site, especially if it has heavy traffic.

MySQl recommend useing the filesystem for what it was meant for - storing files. They mention it here:

http://www.mysql.com/doc/en/Tips.html

I think for now I'm gonna stick with the filesystem, and then if I need to in the future I'll convert to BLOBing

Cheers

Ted

Login

Who's Online

202 user(s) are online (114 user(s) are browsing Support Forums)


Members: 0


Guests: 202


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits