vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Big Board Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=172)
-   -   Attachments (https://vborg.vbsupport.ru/showthread.php?t=110291)

Klopek 04-13-2007 11:56 AM

Quote:

Originally Posted by scotty (Post 1013489)
you must have a look at your attachment (absolute) path: this must match the path on your attachment server and NOT on your webservers.

example:

your webservers directory structure is:
/home/users/forum/htdocs/www for the php files
/home/users/forum/htdocs/attachments for the attachments

but your attachment server has the following structure:
/home/sites/attachments/htdocs/www for the php files
/home/sites/attachments/htdocs/attachments for the attachments

than is the last path the correct one for the CP.


That doesn't work. The CP doesn't allow to set a path that doesn't exist on the server (but it exists on the attachment server). How can I set it otherwise ?

dave6901_2000 11-19-2007 10:13 PM

Has anyone ever got this to work with 2 different IPS ??
I have one server in HK and the other in the USA I wish to have my USA Server handle all my attachments and images

Jafo232 11-20-2007 04:04 AM

Curious, but why not mount a network drive as the Vb attachment directory?

I have a server on my network that I just use for backups. Basically all the other servers have it mounted in a directory named /backup. All I have to do is perform tapes on the backup server instead of all of them.

I don't see why the same couldn't be done for attachments/avatars..

amcd 11-20-2007 04:52 AM

Jafo232, there can be many reasons. Your suggestion about network storage is good if the issue is disk space shortage, but there can be many other issues/objectives.

It may be desirable to run the forums on a multi-carrier, BGP network which costs much more (touted by hosts as premium bandwidth) and the attachments on a lower cost network (value or volume bandwidth).

A big board may want to reduce load on its main webserver by offloading some functions.

A board using shared hosting does not have the option of network mounts, but it can use multiple hosting accounts quite easily if vbulletin is capable of distributed functioning.

Just a few. Hope you get the idea.

dave6901_2000 11-21-2007 05:38 AM

My main goal is to reduce server load and also save on B/W my board holds 1000's of Attachments
My US server I have Tons of room and B/W to spare

Zi55 02-19-2008 01:02 PM

Quote:

Originally Posted by scotty (Post 1013364)
i've just implemented it and here is my way:

AdminCP => Options => Cookies => Cookie-Domain
set it to .yourdomain.com - with the two dots!!!

setup a subdomain called attachment.yourdomain.com
(in my case this is located on the same server as my master-webserver, so I don't have to deal with the attachment path)

copy the following files in the root:
Code:

attachment.php
global.php
newattachment.php

copy the following files in root\includes:
Code:

class_core.php
class_dm.php
class_dm_attachment.php
class_hook.php
class_image.php
class_upload.php
config.php
functions.php
functions_editor.php
functions_file.php
functions_forumlist.php
functions_log_error.php
functions_misc.php
functions_newpost.php
init.php

go to the templates section of your board:
replace all occurrences of
Code:

attachment.php
with
Code:

http://attachment.yourdomain.com/attachment.php
and

replace all occurrences of
Code:

newattachment.php
with
Code:

http://attachment.yourdomain.com/newattachment.php
last step:
add a replacement variable to all your styles:
Code:

http://www.yourdomain.com/
with
http://attachment.yourdomain.com/

this last step is for the "attach" tag

delete all your cookies (maybe via filesystem) and test the installation.

have fun :)

First thanks too much scotty for the way
Did anyone try this way in seperate attachment server ?
and are it have any bugs etc .. ?
Thanks ,
Zi55

Leo Renard 02-19-2008 03:15 PM

I always have attachments disabled. If anyone really needs to upload anything, they can at my uploading site (Not on the same server)

Nitro212 02-22-2008 06:46 PM

but that method only works for storing attachments on the db? what if i want to store them on file system in another server.. will that still work?

ferreo 02-25-2008 09:44 PM

What you can do is to move your attachments to a separate server in a file system and point the vB install to a NFS mount directory that is local to the web server(s). I have it done that way and it works like a charm.

Mickie D 02-26-2008 08:02 PM

Quote:

Originally Posted by Nitro212 (Post 1448888)
but that method only works for storing attachments on the db? what if i want to store them on file system in another server.. will that still work?

yes it does work with file system in fact its only for file system attachment storage

i have this working and its doing really well but as i have posted on vbulletin.com there is a few cookie issues i am experiencing but i will find the reason sooner or later.

but it works 100%


All times are GMT. The time now is 03:55 PM.

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.01446 seconds
  • Memory Usage 1,745KB
  • 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
  • (7)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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