Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-14-2015, 02:36 AM
tommythejoat's Avatar
tommythejoat tommythejoat is offline
 
Join Date: Apr 2008
Location: Boston
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Where is attachpath stored

I have created a sandbox to try out some vBulletin options by creating a second database and copying all the files into a subdirectoryThe settings have been edited so this will function but I want to work with the attachments in the sandbox without messing up the attachments on the live board.

I have made a copy of the attachments file structure, but I cannot figure out how to change the value of attachpath that points to the file structure location of the attachments.

Can anyone tell me how I can edit that value (which points to my current attachment store now) so that it points to the copy I made in the sandbox?
Reply With Quote
  #2  
Old 02-14-2015, 11:02 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In the admincp, go to Attachments > Attachment Storage Type, and you should have the option to move the files from one directory to another. But since you don't want to touch the existing attachments, you might be able to go to Settings > Options > Version Info and Other Untouchables and change File Atachment Path. Yes, it says not to change it, but I think that's because it's supposed to be managed through the Attachment menu I mentioned above. If this was your live site I'd be a little more worried about changing it without looking at all the code that uses it, but since it's a test site I think it's OK to try it.
Reply With Quote
  #3  
Old 02-14-2015, 07:37 PM
tommythejoat's Avatar
tommythejoat tommythejoat is offline
 
Join Date: Apr 2008
Location: Boston
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I do not have an entry for Version Info and Other Untouchables.

I found the phrase reference to it, but it does not appear in Options>settings

Ifinally looked in the database at the settings table and found the entries there for attachments, blog attachments and vaultwiki attachments which had all been copied to my sandbox directory earlier.

Editing those values did not make an immediate change to the listings in the AdminCP but that may be a cache issue.
Reply With Quote
  #4  
Old 02-14-2015, 08:05 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tommythejoat View Post
I do not have an entry for Version Info and Other Untouchables.

I found the phrase reference to it, but it does not appear in Options>settings
Oh yeah, sorry, it only shows up if the forum is in debug mode. I never realized that because I always have my test forum in debug mode.

Quote:
I finally looked in the database at the settings table and found the entries there for attachments, blog attachments and vaultwiki attachments which had all been copied to my sandbox directory earlier.

Editing those values did not make an immediate change to the listings in the AdminCP but that may be a cache issue.
Yeah, it's cached in the datastore. If you edit any other setting and save, that should rebuild the datastore.
Reply With Quote
  #5  
Old 02-14-2015, 09:51 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you edited the paths in the setting table directly, then you also need to edit them in the datastore table. That table is going to be trickier since it is serialized data. So, do not edit these settings directly via the database unless you know what you are doing. If you don't understand how to work with serialized data, then change it via the admincp > Attachments > Attachment Storage type. Make sure you enter an absolute, not relative, path there.
Reply With Quote
  #6  
Old 02-14-2015, 10:31 PM
tommythejoat's Avatar
tommythejoat tommythejoat is offline
 
Join Date: Apr 2008
Location: Boston
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lynne, the problem is that there are about 30 Gbytes of attachments and I was/am reluctant to move them so I used Putty to copy the files in my attach directory.

The files need to be duplicated to keep everything safe while we experiment in the sandbox.

I made some minor edits to the options and the values I edited in settings in the database showed up as wanted.

I seem to recall turning on debug mode by setting the flag in config.php. I have not needed to do that in over 5 years and the option is not in my current config.php file commented out.

We are trying to figure out how to make picture handling intuitive so our very naive elderly users can post the pictures and ask their questions. vBulletin fails badly on cut and paste with the base64 garbage version of the image in the post.
Reply With Quote
  #7  
Old 02-15-2015, 04:37 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know you copied them, but you need to then change the path in the admincp. If you just do it in the settings table, that is not enough as you also need to edit the serialized data in the datastore table. It's much easier to just edit it in the admincp and then it updates both those tables.
Reply With Quote
  #8  
Old 02-15-2015, 07:07 PM
tommythejoat's Avatar
tommythejoat tommythejoat is offline
 
Join Date: Apr 2008
Location: Boston
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Lynne, that is what I would have done had I been able to figure out debug mode. Since I was not in debug mode the untouchables did not show up. Perhaps there should be something more prominent about debug mode.

In any case, the values propagate forward to the AdminCP once they make their way through the datastore cache.

In reading about all this, I noticed the warning about placing the attach file path above forum home for security. How important is that?
Reply With Quote
  #9  
Old 02-15-2015, 07:19 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If your attachment path is not above the forum home directory, then users will be able to access the attachment files directly, bypassing any vbulletin permissions.
Reply With Quote
  #10  
Old 02-15-2015, 09:41 PM
tommythejoat's Avatar
tommythejoat tommythejoat is offline
 
Join Date: Apr 2008
Location: Boston
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it practical to move 30 Gb of attachments with the tool under Attachments in AdminCP or should I use Putty to rename/move the file structure and then edit the path in AdminCP options?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:48 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.04149 seconds
  • Memory Usage 2,259KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete