[bd] Attachment Store for XenForo 1 [Paid] 1.3.7

Store attachment differently and more effectively.

  1. yavuz

    yavuz Member

    I'm using the MetaMirror addon, which imports all external images into the attachment system. Is this addon compactible with the MetaMirror addon?
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @yavuz I think some people do use both add-ons. I haven't tested though.
       
      yavuz likes this.
      1
    2. MattW

      MattW Member

      MattW @xfrocks Yes it is. I've imported around 20,000 images with Metamirror, and they are all uploaded using the default XF attachment method, so works with Attachment Store.
       
      xfrocks and yavuz like this.
      2
    3. yavuz

      yavuz Member

      yavuz @xfrocks Oh ok, it does that as well. Will it also clean my dirty laundry? :D Seriously, thanks. I think all is sorted now. I learned a ton of stuff during all this setting up time. Thanks to you both.
       
      xfrocks likes this.
      1
    4. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @yavuz Maybe next version!
       
      alfa1 and yavuz like this.
      2
  2. yavuz

    yavuz Member

    Got this error:

    Code:
    Server Error
    
    curl_getinfo() expects parameter 1 to be resource, null given
    
    XenForo_Application::handlePhpError()
    curl_getinfo() in bdAttachmentStore/Helper/TempFile.php at line 29
    bdAttachmentStore_Helper_TempFile::download() in bdAttachmentStore/CacheRebuilder/AttachmentData.php at line 131
    bdAttachmentStore_CacheRebuilder_AttachmentData->_downloadRemoteFile() in bdAttachmentStore/CacheRebuilder/AttachmentData.php at line 57
    bdAttachmentStore_CacheRebuilder_AttachmentData->rebuild() in XenForo/ControllerHelper/CacheRebuild.php at line 26
    XenForo_ControllerHelper_CacheRebuild->rebuildCache() in XenForo/ControllerAdmin/Tools.php at line 82
    XenForo_ControllerAdmin_Tools->actionCacheRebuild() in XenForo/FrontController.php at line 347
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    XenForo_FrontController->run() in /home/user/public_html/admin.php at line 13
    Can't restart or refresh either.
     
  3. yavuz

    yavuz Member

    From the Server Error Log:

    PHP:
    ErrorExceptionUndefined variablehttp library/bdAttachmentStore/Helper/TempFile.php:29
    Oluşturan
    yavuzBugün 13:25
    #0 /home/user/public_html/library/bdAttachmentStore/Helper/TempFile.php(29): XenForo_Application::handlePhpError(8, 'Undefined varia...', '/home/divnet/pu...', 29, Array)
    #1 /home/user/public_html/library/bdAttachmentStore/CacheRebuilder/AttachmentData.php(131): bdAttachmentStore_Helper_TempFile::download('http://www.site...')
    #2 /home/user/public_html/library/bdAttachmentStore/CacheRebuilder/AttachmentData.php(57): bdAttachmentStore_CacheRebuilder_AttachmentData->_downloadRemoteFile('http://www.site...')
    #3 /home/divnet/public_html/library/XenForo/ControllerHelper/CacheRebuild.php(26): bdAttachmentStore_CacheRebuilder_AttachmentData->rebuild(0, Array, NULL)
    #4 /home/divnet/public_html/library/XenForo/ControllerAdmin/Tools.php(82): XenForo_ControllerHelper_CacheRebuild->rebuildCache(Array, 'http://www.site...', 'admin.php?tools...', true)
    #5 /home/user/public_html/library/XenForo/FrontController.php(347): XenForo_ControllerAdmin_Tools->actionCacheRebuild()
    #6 /home/user/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #7 /home/user/public_html/admin.php(13): XenForo_FrontController->run()
    #8 {main}
    array(3) {
    [
    "url"] => string(51"http://www.site.net/admin.php?tools/cache-rebuild"
    ["_GET"] => array(1) {
    [
    "tools/cache-rebuild"] => string(0""
    }
    [
    "_POST"] => array(5) {
    [
    "process"] => string(1"1"
    ["caches"] => string(53"[["bdAttachmentStore_AttachmentData",{"batch":"50"}]]"
    ["position"] => string(1"0"
    ["redirect"] => string(45"http://www.site.net/admin.php?tools/rebuild"
    ["_xfToken"] => string(8"********"
    }
    }
    PHP:
    ErrorExceptioncurl_getinfo() expects parameter 1 to be resourcenull given library/bdAttachmentStore/Helper/TempFile.php:29
    Oluşturan
    yavuzBugün 13:25
    #0 [internal function]: XenForo_Application::handlePhpError(2, 'curl_getinfo() ...', '/home/site/pu...', 29, Array)
    #1 /home/site/public_html/library/bdAttachmentStore/Helper/TempFile.php(29): curl_getinfo(NULL, 2097154)
    #2 /home/site/public_html/library/bdAttachmentStore/CacheRebuilder/AttachmentData.php(131): bdAttachmentStore_Helper_TempFile::download('http://www.site...')
    #3 /home/site/public_html/library/bdAttachmentStore/CacheRebuilder/AttachmentData.php(57): bdAttachmentStore_CacheRebuilder_AttachmentData->_downloadRemoteFile('http://www.site...')
    #4 /home/site/public_html/library/XenForo/ControllerHelper/CacheRebuild.php(26): bdAttachmentStore_CacheRebuilder_AttachmentData->rebuild(0, Array, NULL)
    #5 /home/site/public_html/library/XenForo/ControllerAdmin/Tools.php(82): XenForo_ControllerHelper_CacheRebuild->rebuildCache(Array, 'http://www.site...', 'admin.php?tools...', true)
    #6 /home/divnet/public_html/library/XenForo/FrontController.php(347): XenForo_ControllerAdmin_Tools->actionCacheRebuild()
    #7 /home/divnet/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #8 /home/divnet/public_html/admin.php(13): XenForo_FrontController->run()
    #9 {main}
    array(3) {
    [
    "url"] => string(51"http://www.site.net/admin.php?tools/cache-rebuild"
    ["_GET"] => array(1) {
    [
    "tools/cache-rebuild"] => string(0""
    }
    [
    "_POST"] => array(5) {
    [
    "process"] => string(1"1"
    ["caches"] => string(53"[["bdAttachmentStore_AttachmentData",{"batch":"50"}]]"
    ["position"] => string(1"0"
    ["redirect"] => string(45"http://www.site.net/admin.php?tools/rebuild"
    ["_xfToken"] => string(8"********"
    }
    }
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @yavuz Please update to v1.1.2, should fix your problem :)
       
  4. xfrocks

    xfrocks XenForo rocks!
    Staff Member

  5. Fred.

    Fred. New Member

    Is it possible to use it on Amazon S3 with limited access? The normal access keys give full access to everything on my aws account. And i don't like that.
    With the IAM users you can set permissions. But i'm also new to it and trying to find out how i can get it to work.

    Any idea which permissions i need so i can make a policy document? Or can you give an example.
    That would be really useful. Other users can use it too.

    Thanks! :)
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @Fred. Yes, you can create user and limit access to S3 only or some bucket only. Then use the key/secret of that user for the options.
       
      Fred. likes this.
      1
  6. yavuz

    yavuz Member

    Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Table 'vt_vt.xf_bdattachmentstore_delay' doesn't exist - library/Zend/Db/Statement/Mysqli.php:77
    Oluşturan: Bilinmeyen Hesap, 1 dakika önce


    #0 /home/site/public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('SELECT data_id ...')
    #1 /home/site/public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'SELECT data_id ...')
    #2 /home/site/public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('SELECT data_id ...')
    #3 /home/site/public_html/library/Zend/Db/Adapter/Abstract.php(791): Zend_Db_Adapter_Abstract->query('SELECT data_id ...', Array)
    #4 /home/site/public_html/library/bdAttachmentStore/Model/Delay.php(15): Zend_Db_Adapter_Abstract->fetchCol('SELECT data_id ...')
    #5 /home/site/public_html/library/bdAttachmentStore/Model/Delay.php(20): bdAttachmentStore_Model_Delay->getDelayedDataIds()
    #6 /home/site/public_html/library/bdAttachmentStore/CronEntry/Delay.php(7): bdAttachmentStore_Model_Delay->move()
    #7 [internal function]: bdAttachmentStore_CronEntry_Delay::run(Array)
    #8 /home/site/public_html/library/XenForo/Model/Cron.php(356): call_user_func(Array, Array)
    #9 /home/site/public_html/library/WhoHasReadAThread/Model/Cron.php(30): XenForo_Model_Cron->runEntry(Array)
    #10 /home/site/public_html/library/XenForo/Deferred/Cron.php(24): WhoHasReadAThread_Model_Cron->runEntry(Array)
    #11 /home/site/public_html/library/XenForo/Model/Deferred.php(252): XenForo_Deferred_Cron->execute(Array, Array, 9.99999809265, '')
    #12 /home/site/public_html/library/XenForo/Model/Deferred.php(378): XenForo_Model_Deferred->runDeferred(Array, 9.99999809265, '', false)
    #13 /home/site/public_html/library/XenForo/Model/Deferred.php(331): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
    #14 /home/site/public_html/deferred.php(23): XenForo_Model_Deferred->run(false)
    #15 {main}
     
  7. MattW

    MattW Member

    Getting the same error

    Code:
    Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Table 'holdthel_1neXen.xf_bdattachmentstore_delay' doesn't exist - library/Zend/Db/Statement/Mysqli.php:77
    Generated By: Unknown Account, 2 minutes ago
    Stack Trace
    #0 /home/holdthel/public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('SELECT data_id ...')
    #1 /home/holdthel/public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'SELECT data_id ...')
    #2 /home/holdthel/public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('SELECT data_id ...')
    #3 /home/holdthel/public_html/library/Zend/Db/Adapter/Abstract.php(791): Zend_Db_Adapter_Abstract->query('SELECT data_id ...', Array)
    #4 /home/holdthel/public_html/library/bdAttachmentStore/Model/Delay.php(15): Zend_Db_Adapter_Abstract->fetchCol('SELECT data_id ...')
    #5 /home/holdthel/public_html/library/bdAttachmentStore/Model/Delay.php(20): bdAttachmentStore_Model_Delay->getDelayedDataIds()
    #6 /home/holdthel/public_html/library/bdAttachmentStore/CronEntry/Delay.php(7): bdAttachmentStore_Model_Delay->move()
    #7 [internal function]: bdAttachmentStore_CronEntry_Delay::run(Array)
    #8 /home/holdthel/public_html/library/XenForo/Model/Cron.php(356): call_user_func(Array, Array)
    #9 /home/holdthel/public_html/library/XenForo/Deferred/Cron.php(24): XenForo_Model_Cron->runEntry(Array)
    #10 /home/holdthel/public_html/library/XenForo/Model/Deferred.php(252): XenForo_Deferred_Cron->execute(Array, Array, 9.99999785423, '')
    #11 /home/holdthel/public_html/library/XenForo/Model/Deferred.php(378): XenForo_Model_Deferred->runDeferred(Array, 9.99999785423, '', false)
    #12 /home/holdthel/public_html/library/XenForo/Model/Deferred.php(331): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
    #13 /home/holdthel/public_html/deferred.php(23): XenForo_Model_Deferred->run(false)
    #14 {main}
    Request State
    array(3) {
      ["url"] => string(35) "http://holdtheline.com/deferred.php"
      ["_GET"] => array(0) {
      }
      ["_POST"] => array(3) {
        ["_xfRequestUri"] => string(47) "/threads/thanemod-an-upcoming-mod-for-me3.5779/"
        ["_xfNoRedirect"] => string(1) "1"
        ["_xfResponseType"] => string(4) "json"
      }
    }
    
     
  8. yavuz

    yavuz Member

    #167 yavuz, Jan 18, 2014
    Last edited: Jan 18, 2014
    It doesn't time out or throwing errors this time:

    caps.png

    102k and counting :D

    Edit: I still keep getting these error. The importer is running still.
     
  9. yavuz

    yavuz Member

    The import has finished but my site went nuts (style messed up) and getting those errors.
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @yavuz This add-on should not mess up your style FYI.
       
      yavuz likes this.
      1
    2. yavuz

      yavuz Member

      yavuz @xfrocks Some crazy cache thing I guess, now it's good. Let me update it first.
       
      xfrocks likes this.
      1
  10. xfrocks

    xfrocks XenForo rocks!
    Staff Member

  11. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Sorry for your problem, my package script went crazy and packed the out of date installer. Please update to 1.1.2c with the correct installer.
     
    yavuz likes this.
  12. yavuz

    yavuz Member

    Still getting those table dont exist errors @xfrocks :(
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @yavuz You reuploaded and reimported the XML, right?
       
    2. yavuz

      yavuz Member

      yavuz @xfrocks Yes of course.

      [​IMG]
       
    3. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      yavuz likes this.
      1
  13. yavuz

    yavuz Member

    PHP:
    Zend_Db_Statement_Mysqli_ExceptionMysqli prepare errorTable 'user_vt.xf_bdattachmentstore_delay' doesn't exist - library/Zend/Db/Statement/Mysqli.php:77
    Oluşturan: Bilinmeyen Hesap, 3 dakika önce

    #0 /home/user/public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('
    INSERT INTO `xf...')
    #1 /home/user/public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'INSERT INTO 
    `xf...')
    #2 /home/user/public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('
    INSERT INTO `xf...')
    #3 /home/user/public_html/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO 
    `xf...', Array)
    #4 /home/user/public_html/library/bdAttachmentStore/Model/Delay.php(10): Zend_Db_Adapter_Abstract->insert('
    xf_bdattachment...', Array)
    #5 /home/user/public_html/library/bdAttachmentStore/XenForo/DataWriter/AttachmentData.php(58): bdAttachmentStore_Model_Delay->insertDataId(180805)
    #6 /home/user/public_html/library/XenForo/DataWriter.php(1397): bdAttachmentStore_XenForo_DataWriter_AttachmentData->_postSave()
    #7 /home/user/public_html/library/XenForo/Model/Attachment.php(524): XenForo_DataWriter->save()
    #8 /home/user/public_html/library/MetaMirror/CronEntry.php(427): XenForo_Model_Attachment->insertUploadedAttachmentData(Object(XenForo_Upload), 23739, Array)
    #9 /home/user/public_html/library/MetaMirror/CronEntry.php(938): MetaMirror_CronEntry::importPostAttachment(Object(Zend_Db_Adapter_Mysqli), '
    217eeae8cb368f8...', '/home/user/pu...', 23739, 36275, 1376352000)
    #10 /home/user/public_html/library/MetaMirror/CronEntry.php(1124): MetaMirror_CronEntry::updateSingleContent(Array)
    #11 /home/user/public_html/library/MetaMirror/CronEntry.php(560): MetaMirror_CronEntry::runForContentType()
    #12 [internal function]: MetaMirror_CronEntry::runMetaMirror(Array)
    #13 /home/user/public_html/library/XenForo/Model/Cron.php(356): call_user_func(Array, Array)
    #14 /home/user/public_html/library/WhoHasReadAThread/Model/Cron.php(30): XenForo_Model_Cron->runEntry(Array)
    #15 /home/user/public_html/library/XenForo/Deferred/Cron.php(24): WhoHasReadAThread_Model_Cron->runEntry(Array)
    #16 /home/user/public_html/library/XenForo/Model/Deferred.php(252): XenForo_Deferred_Cron->execute(Array, Array, 9.99999713898, '')
    #17 /home/user/public_html/library/XenForo/Model/Deferred.php(378): XenForo_Model_Deferred->runDeferred(Array, 9.99999713898, '', false)
    #18 /home/user/public_html/library/XenForo/Model/Deferred.php(331): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
    #19 /home/user/public_html/deferred.php(23): XenForo_Model_Deferred->run(false)
    #20 {main}
    Talep Yeri
    array(3) {
    ["url"] => string(34) "http://www.site.net/deferred.php"
    ["_GET"] => array(0) {
    }
    ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(68) "/konular/threadname.11150/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
    }
    }
     
  14. xfrocks

    xfrocks XenForo rocks!
    Staff Member

  15. high

    high New Member

    hi, trying to sync 30GB of attachments to an ftp. Am I right that any file is prestored at /internal_data/temp first so at least additional 30GB in this case are needed to be free on source-server?
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @high If the file is in default location now, no temp files are required.
       
    2. high

      high New Member

      high @xfrocks hmm strange, temp is growing here constantly (while running 'Move Attachment Data') with attachments under temp-names.
      2014-02-01 16_53_15-temp.png
      Location was default before, first-time-addon install. ftp-log on client shows
      Code:
      FTP session opened.
      Preparing to chroot to directory '/var/www/attachments'
      USER xy: Login successful.
      FTP session closed.
      for each item
      but thats it, nothings uploaded. Stopped it after 20k attachments to avoid disk running full (small SSD, thats why they should move to external space) ;)
      2014-02-01 16_59_50-Options_ Attachments _ Admin CP.png
       
    3. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @high If your FTP server perform chroot and your enter "/var/www/attachments" as the path, it will not work (most of the time). You will need to enter "/" as the path (because your server chroot already, the FTP client will only see "/").
       
  16. high

    high New Member

    yepp, path is/was set correctly to '/' ;)
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @high You probably want to start a conversation with me with your server info for quick inspection.
       
  17. anto74

    anto74 Member

    Hi @xfrocks
    i have urgent question.. :(
    Now i'm moving my forum to new hosting service and i would use this addon: i will use old server for uploading photos
    In new hosting i must upload existing photos in data and internal_data folder or I can leave them on the old server?
    Thanks
    Antonio
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @anto74 How did you configure the attachment storage on the old server? I assume you have them at default or external data? If so, you will need to move those files to the new server.
      If you feel adventurous, I can try to update your database to make it think the files are stored in a FTP server (your old server now act as an FTP server for your new one).
       
  18. anto74

    anto74 Member

    In old server i have original folder xenforo structure, i have not used your addon, i have default storage ( XenGallery and attachments)
    Now i have downloaded to my PC only internal_data folder.
    In new server i will set [bd] Attachment store in this way
    [​IMG]
    The remote server will be the old server.
     
  19. anto74

    anto74 Member

    I have 6GB of photos in old server...if i must download and reupload to new server ...:eek::eek::eek:
     
  20. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    If your files are kept in default location then we don't have much luck. Your best solution now is to run the tool in your old server to move the file via FTP (to the same server). That way it should run pretty fast then you can save time moving those 6GB worth of files.

    Or you can setup rsync or similar tool to copy them directly from old server to the new one. No point to download to your machine and upload again.
     
    1. anto74

      anto74 Member

      anto74 @xfrocks Ok, but it's mandatory to have existing 6GB of photos to new server? i want have them to old server...:(
       
    2. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @anto74 If you run the tool on the old server to use FTP storage before moving, you can keep those 6GB on the old server.
       
    3. anto74

      anto74 Member

      anto74 @xfrocks Ok, thanks :)
       
    4. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @anto74 Good luck, moving server is no small feat :rolleyes:
       
    5. anto74

      anto74 Member

      anto74 @xfrocks Thanks! :)
      Sorry...but the tool is in Rebuild cache or i must fill in the fields in options?
       
Loading...