vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Attachments (https://vborg.vbsupport.ru/showthread.php?t=170969)

Jase2 02-19-2008 09:25 PM

Attachments
 
What do you lot think the best storage type for attachments is, database or in a folder (chmod 0777)?

Regards Jason :)

punchbowl 02-19-2008 09:38 PM

I prefer folder personally. If I spent more time optimizing mysql or it was on it's own box then maybe I'd answer differently.

Generally I try to minimize calls to the db as much as possible.

But that might just be witchcraft and I don't really know so sorry I couldn't help!

Jase2 02-19-2008 10:36 PM

Hmm, I may try a folder. Can you get all attachments currently in the database to a folder?

Regards Jason :)

SEOvB 02-20-2008 01:14 AM

Storing them in a folder outside of the webroot is by far the best way, just remember if you ever move servers to move the attachment folder too.

And if you go under attachment options in the adminCP you'll see attachment storage type, and there you can move them all to a folder on your server

punchbowl 02-20-2008 10:52 AM

Quote:

Originally Posted by Jase2 (Post 1446951)
Hmm, I may try a folder. Can you get all attachments currently in the database to a folder?

Regards Jason :)

yes - from admin cp

you'll need to set up the directory you want to store everything in though obviously - good advice from FRDS on where exactly.

JamesN 02-20-2008 11:37 AM

Why is it by far the best way?

Lynne 02-20-2008 01:30 PM

It's the best way because if they are outside of the webroot, then they are not accessible at all to the outside world. My attachments are in "/home/mysitename/attachments/" and my site is at "/home/mysitename/public_hmtl/" No one can get to my attachments except through vbulletin and using the vb permissions system. Just don't forget that when you store attachments/avatars/profiles in the file system, they will not be backed up when you do a database backup. You must back them up separately.

RobDog888 02-20-2008 05:05 PM

Quote:

Originally Posted by Lynne (Post 1447320)
It's the best way because if they are outside of the webroot, then they are not accessible at all to the outside world. My attachments are in "/home/mysitename/attachments/" and my site is at "/home/mysitename/public_hmtl/" No one can get to my attachments except through vbulletin and using the vb permissions system. Just don't forget that when you store attachments/avatars/profiles in the file system, they will not be backed up when you do a database backup. You must back them up separately.

I do this too as it helps prevent hotlinking. Force them to view via vBulletin.
If you have large attachment files or a large number of them then storing them externally from the database is definately the way to go.

Jase2 02-20-2008 08:44 PM

Hello,

I've moved all album pics, avatars, attachments, signature pics ect. to a file system, as I'm very minimalist and try to optimize the database as much as possible.

One question, is it safe for me to delete the tables that are left from things such as avatars, attachments, ect.?

Regards Jason :)

snakes1100 02-20-2008 09:06 PM

Do NOT delete any of those tables.


All times are GMT. The time now is 02:28 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01067 seconds
  • Memory Usage 1,728KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete