MyBB Community Forums

Full Version: SMF 1.1.11 => MyBB attachment issues (new thread)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
I just used my outward-facing IP address, which is how I obtained the results posted above. Apache seems to take forever when I visit any combination of localhost, 127.0.0.1, and outward-facing IP to get a dir listing. It appears to be Apache's fault.

Anyway, I've completely wiped the DB, and have installed MyBB fresh from scratch, and am attempting to run the merge using http://127.0.0.1/attachments to load in the attachments. Will report back when it's done.

But I am curious why I wouldn't be able to access the files directly. It would be so much faster not relying on Apache as a middleman. I'd still like to try to work through this difficulty, in case it helps others, if you're willing.
Merge system disallows use of 127.0.0.1
I'm actually about to leave for an extended period (several days), and one of the MyBB developers would be more suited to help with that anyways Wink Especially since for me on Linux, it works just fine with a full path to the files.

I wrote the SMF 2.0 RC merger module, not the 1.x.xx Wink

I do wish you luck though.
Thanks so much for your help! Hopefully one of the 1.1.x devs will take notice. The import-via-apache seems to be working just fine, FWIW! The uploads folder is being populated as expected.
The import kinda worked. Something was copied to the uploads folder, but not enough somethings. The original attachments folder contained 5500 attachments and thumbnails; the MyBB uploads folder a mere 334. No errors were reported during the merge, or in the final report.

None of the posts I've managed to find on my board contain thumbnail previews. This may simply be a function of not having managed to find a post that contains an attachment that was successfully copied. But I can click on the attachment link, and download a file. But the downloaded file is always corrupt. So something began to go right with this merge, but in the end, it looks like it totally fell on its face. Grr.

Even the files in the upload folder are corrupt. Here is an example of two files in my uploads folder:
Bacon:uploads dgoodman$ ls -al post_0_1272896527*
-rwxrwxrwx  1 dgoodman  dgoodman  9474 May  3 09:22 post_0_1272896527.attach
-rwxrwxrwx  1 dgoodman  dgoodman  9474 May  3 09:22 post_0_1272896527_thumb.jpeg_thumb
-rwxrwxrwx  1 dgoodman  dgoodman  9474 May  3 09:22 post_0_1272896527_thumb.jpg_thumb
Renaming them to so that they end with .jpg, and opening them in my favorite photo viewer gives a "file corrupt" error. So even the attachments that did copy were corrupted in the process.
This has to be something with the way the Mac is handling things. I think Ryan Gordon is who you need to speak with, but don't send him a PM. Try and get ahold of Matt Rogowski and if needed he'll pass things on. Sorry I couldn't be more help.
Did you ever get your attachments working CaptainOblivious? I'm having exactly the same problem with an SMF to MyBB merge. The difference is my server is running CentOS not MacOS. The script will put entries for the attachments in the DB but doesn't move the files.
I'm gonna get in touch with the Staff and see if they might be able to shed more light on this, since my guess at it being a Mac issue is obviously off the mark.
Glad its not just a Mac thing! I haven't had time to futz with it lately, so my situation still stands where it was with my last post.

(2010-06-06, 11:37 PM)ralgith Wrote: [ -> ]I'm gonna get in touch with the Staff and see if they might be able to shed more light on this, since my guess at it being a Mac issue is obviously off the mark.

Thanks, Ralgith.
In convert/boards/smf/attachments.php find:

$attachrs = @fopen($mybb->settings['uploadspath'].'/'.$insert_data['attachname'], 'w');

replace with

$attachrs = @fopen($mybb->settings['uploadspath'].'/'.$insert_data['attachname'], 'wb');

also find:

$attachrs = @fopen($mybb->settings['uploadspath'].'/'.$insert_data['thumbnail'], 'w');

replace with

$attachrs = @fopen($mybb->settings['uploadspath'].'/'.$insert_data['thumbnail'], 'wb');

also find:

@fwrite($attachrs, $attachment_thumbnail_file);

replace with

fwrite($attachrs, $attachment_thumbnail_file);

also find:

@fwrite($attachrs, $attachment_file);

replace with

fwrite($attachrs, $attachment_file);

Tell me if you have any success or see any errors.
(2010-06-07, 02:31 AM)Ryan Gordon Wrote: [ -> ]Tell me if you have any success or see any errors.

Didn't make any difference to my import. I had the same errors:

Attachments:

    * Error transfering the attachment (ID: 1)
    * Error transfering the attachment thumbnail (ID: 2)
    * Error transfering the attachment thumbnail (ID: 3)
    * Error transfering the attachment (ID: 4)
    * Error transfering the attachment (ID: 5)
    * Error transfering the attachment thumbnail (ID: 6)
    * Error transfering the attachment (ID: 7)
    * Error transfering the attachment thumbnail (ID: 8)
    * Error transfering the attachment (ID: 9)
    * Error transfering the attachment thumbnail (ID: 10)
    * Error transfering the attachment (ID: 11)
    * Error transfering the attachment thumbnail (ID: 12)
    * Error transfering the attachment thumbnail (ID: 13)
    * Error transfering the attachment (ID: 14)
Wait so CaptainOblivious has no errors, but you do?

You two have separate issues it looks like.

MattCNS, because you do actually have errors there really isn't much to diagnose. Those error messages means fopen can't open the attachments. It's an issue that you should probably bring up with your host.
Pages: 1 2 3 4 5