Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Zero size attachment files after vBulletin 4 import

GermontGermont New
edited March 2017 in Vanilla 2.0 - 2.8

Hello!

I manage a forum. There were some issues with that old version of vBulletin and loaded only thumbnails. We considered attachments were corrupted.
In 2016 tried an import with partial succes. The size of images from attachments folder was 0 bytes, even the extensions were changed.
I already wanted to delete the old upload folder, until I checked this month the files in Ubuntu and surprise, it loaded valid thumbnails and full-size images.

Again I tried the import, and no matter what I do, the size is zero bytes. What could I do to recover the attachments?

I use php5.6 and this is my initial import link:

example.com/v.php?avatars=0&files=1filepath=/home/getfit/new/

Thank you!

Comments

  • R_JR_J Admin

    If all the files really exist, you should check which url is used and compare that to the folder the files are located in. If everything looks okay, you might have a file permission issue and you should check that those are correct.

    If both paths do not match, that problem could be solved by either moving all files, changing the Media table or using a RewriteRule

  • GermontGermont New
    edited March 2017

    Thank you so much for answering!
    The path in the url I suppose it's right. The folders 1,2,3... 9 found in the attachments forum folder are now in /home/getfit/new/
    I am not sure how should I use the path in the url? WIth a '?' between the files=1 and filepath or without one?
    example.com/v.php?avatars=0&files=1?filepath=/home/getfit/new/
    Tried both ways, and again resulted empty image files.
    I also moved al those folders in another folder named attachments like it was in vBulletin installation.

    I changed permissions recursively to 777 for both file and folders. No luck.
    I don't know where else should I move the files. Old database can't be modified, it's a huge (800 mb) and can't acces it with MySQLDumper or phpMyadmin.

  • @Germont

    Just to address that last comment, could you not use the SOURCE command in MySQL to populate a test database with your old DB?

    I haven't tried it with anything that big, but it worked for me when I had DBs too big to load via phpMyAdmin.

  • GermontGermont New
    edited March 2017

    @whu606 said:
    could you NOT use the SOURCE command in MySQL

    I really don't know what to say, I am new in all this hosting and database manipulation. Do you really mean it, or was it just a typo? Maybe if you drop a link, an example to begin with.

  • @Germont

    Sorry, just a British English way of expressing things.

    What works for me:

    Log in to MySQL on your server (this can be a local install, which is where I do all my fiddling about so it doesn't affect anything live. I'm a Windows user, so for local stuff I install the XAMPP stack, whcih includes Apache and MySQL )

    Create a new DB (you can do this via phpMyAdmin if is is easier for you.)

    In MySQL use the command

    USE nameofdatabase.sql

    Assuming that changes OK,

    SOURCE nameofdatabasebackup.sql

    Dependign on where you are doing it, you would need to add in the directory path for the backup DB.

    In Windows, I just put it in the root C:\ , so the command is

    SOURCE C:\nameofbackupDB.sql

    I'm not sure this will actually be of any use to you, but it might give you access to your old DB so you can have a fiddle with it.

  • R_JR_J Admin

    Do you have examples? What is an example for a non working link as it looks right now?

  • @whu606
    Ok, I try to apply what you said about MySQL, but momentarily I don't have the MySQL root password.

    @R_J
    The ones I posted... with or without '?' in the middle

    example.com/v.php?avatars=0&files=1?filepath=/home/getfit/new/

  • R_JR_J Admin

    That's how the links to avatars look right now? Okay. Do you have a file called v.php in your forum root folder? Could you please take a look at it if it is safe to post it here and if yes paste the code?

    In order to paste code you three tildes above and below the code

    ~~~
    like that
    ...
    ~~~

  • I suppose the porter core file should remain unmodified, the same php downloaded from Vanilla server :)
    But here it is!


    I can't post all that code> Body is 697713 characters too long.

    But you know what? It has the same MD5 hashcode like the one from the downloaded archive.

  • R_JR_J Admin

    Obviously we are not speaking about the same thing.

    example.com/v.php?avatars=0&files=1?filepath=/home/getfit/new/ is the export link that you have used, correct? I think so because in the vanilla porter I can see this code

    /**
     * vBulletin exporter tool.
     *
     * This will migrate all vBulletin data for 3.x and 4.x forums.
     * It migrates all attachments from 2.x and later.
     *
     * Supports the FileUpload, ProfileExtender, and Signature plugins.
     * All vBulletin data appropriate for those plugins will be prepared
     * and transferred.
     *
     * To export only 1 category, add 'forumid=#' parameter to the URL.
     * To extract avatars stored in database, add 'avatars=1' parameter to the URL.
     * To extract attachments stored in db, add 'attachments=1' parameter to the URL.
     * To extract all usermeta data (title, skype, custom profile fields, etc),
     *    add 'usermeta=1' parameter to the URL.
     * To stop the export after only extracting files, add 'noexport=1' param to the URL.
     *
     * TO MIGRATE FILES, BEFORE IMPORTING YOU MUST:
     * 1) Copy entire 'customavatars' folder into Vanilla's /upload folder.
     * 2) Copy entire 'attachments' folder into Vanilla's / upload folder.
     * 3) Make BOTH folders writable by the server.
     * 4) Enable the FileUpload plugin. (Media table must be present.)
     *
     * filepath - Command line option to fix / check files are on disk.  Files named .attach are renamed
     * to the proper name and missing files are reported in missing-files.txt.
     *
     * @copyright Vanilla Forums Inc. 2010
     * @author Matt Lincoln Russell lincoln@icrontic.com
     * @license http://opensource.org/licenses/gpl-2.0.php GNU GPL2
     * @package VanillaPorter
     */
    

    and this looks like the link you have posted above.

    In order to add those parameters you use a "?" after the v.php and "&" to separate all others.

    So I guess the answer to your question would have simply been example.com/v.php?avatars=0&files=1&filepath=/home/getfit/new/. You should also take a look at the hints below the "TO MIGRATE FILES, BEFORE IMPORTING YOU MUST:" line above, but you might already have done that.

Sign In or Register to comment.