vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Where is attachpath stored (https://vborg.vbsupport.ru/showthread.php?t=317320)

tommythejoat 02-14-2015 02:36 AM

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?

kh99 02-14-2015 11:02 AM

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.

tommythejoat 02-14-2015 07:37 PM

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.

kh99 02-14-2015 08:05 PM

Quote:

Originally Posted by tommythejoat (Post 2537440)
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.

Lynne 02-14-2015 09:51 PM

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.

tommythejoat 02-14-2015 10:31 PM

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.

Lynne 02-15-2015 04:37 PM

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.

tommythejoat 02-15-2015 07:07 PM

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?

Lynne 02-15-2015 07:19 PM

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.

tommythejoat 02-15-2015 09:41 PM

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?

Lynne 02-15-2015 09:56 PM

If you go to Attachments > Attachment Storage Type and change the path to the attachments, it doesn't actually move them for you. That is just the path for where the software should look for the attachments. If you change that path, it will actually tell you that you now need to go move the attachments.

kh99 02-15-2015 10:25 PM

Quote:

Originally Posted by Lynne (Post 2537611)
If you go to Attachments > Attachment Storage Type and change the path to the attachments, it doesn't actually move them for you. That is just the path for where the software should look for the attachments. If you change that path, it will actually tell you that you now need to go move the attachments.

Oh, I didn't realize that. Well, there you go, I guess that's all you really needed to do.


All times are GMT. The time now is 03: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.01125 seconds
  • Memory Usage 1,739KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete