MyBB Community Forums

Full Version: No Attachments get converted from SMF1 -> MyBB 1.4.5
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello

SMF: 1.1.8
MyBB: 1.4.5
Merger: 1.4 beta 3 and beta 4


I am trying the Merger on an SMF 1.1.8 database, moving the stuff to the recent MyBB 1.4.5.
It seems to work quite well besides minor stuff, but not a single attachment made it through the conversion process. I always end up seeing the posts with a virtual attachment, but nothing is shown, neither thumbnail nor picture.

Trying the rebuilt option in the Tools Menu yields an error message for every reported attachment in the database:

Quote:Warning [2] getimagesize(/[path to my site]/uploads/post_0_1240580272.attach) [function.getimagesize]: failed to open stream: No such file or directory - Line: 29 - File: inc/functions_image.php PHP 5.1.2 (Linux)
File Line Function
[PHP] errorHandler->error
/inc/functions_image.php 29 getimagesize
/admin/modules/tools/recount_rebuild.php 129 generate_thumbnail
/admin/modules/tools/recount_rebuild.php 250 acp_rebuild_attachment_thumbnails
/admin/index.php 380 require

checking the mention uploads directory reveals that there are indeed no real files present, which concurs with the merger saying "no attachment found" during the conversion process.
the log files of the converter are inconclusive to me, maybe they make sense to one of you, so some quotes from there as well.

Quote:array (
'import_aid' => '2',
'pid' => '',
'posthash' => '24264227a09c772f5862f31a456008f1',
'thumbnail' => '',
'uid' => '9',
'filename' => 'avatar_9.jpg',
'attachname' => 'post_9_1240580261.attach',
'filesize' => '13831',
'downloads' => '16288',
'visible' => '1',
)array (
'import_aid' => '91',
'pid' => '',
'posthash' => 'af7f02dd6a99d15de2e3a63e07b8a42c',
'thumbnail' => '',
'uid' => '13',
'filename' => 'avatar_19.gif',
'attachname' => 'post_13_1240580261.attach',
'filesize' => '4879',
'downloads' => '12419',
'visible' => '1',
)array (
'import_aid' => '686',
'pid' => '',
'posthash' => '29741cbaee1041fc405e91328f88f2ee',
'thumbnail' => '',
'uid' => '15',
'filename' => 'avatar_22.jpg',
'attachname' => 'post_15_1240580261.attach',
'filesize' => '28914',
'downloads' => '4719',
'visible' => '1',
)

the upload directory is owned by the user running the apache server and adding new attachments to new posts/replies at the converted mybb forum works just fine. Although I noticed that the new attachment gets a subdirectory in uploads called "200904", but the converted seems to be in uploads directly. Database entries in the mybb_attachments table support that.

Quote:e78c3ee6affae656a4cb707d8f5d8b99 0 Naturecrit 113.JPG 144190 post_0_1240580285.attach 1 0 1 post_0_1240580285_thumb.jpg_thumb
Edit Delete 711 48956 7586099cfce856ee03ba339ec4576353 1 Azgalor-Positions.jpg image/jpeg 113703 200904/post_1_1240581668_8bdaf8630e25f607b3084bc39... 1 1240581668 1 200904/post_1_1240581668_8bdaf8630e25f607b3084bc39...


if you need any more data, please let me know. Would be nice if anybody can figure out whats the converter has against my attachments :-)

Thanks
What was the [path to my site] ?
(2009-04-24, 04:49 PM)Ryan Gordon Wrote: [ -> ]What was the [path to my site] ?

Quote:Warning [2] getimagesize(/var/www/ff/mybb/uploads/post_9_1240580261.attach) [function.getimagesize]: failed to open stream: No such file or directory - Line: 29 - File: inc/functions_image.php PHP 5.1.2 (Linux)

is the complete line of one of the errors.
anything else you need from me to get this sorted, please let me know.

The old site is still running and the new one is for testing atm only anyway. So dont be afraid to use me as a test bunny. :-)
I'll try and look into it by the weekend.

Thank you for your patience!

Ryan
Hi, in your SMF forum settings table can you tell me the value of 'attachmentUploadDir' ? What is that set to?
(2009-04-30, 09:05 PM)Ryan Gordon Wrote: [ -> ]Hi, in your SMF forum settings table can you tell me the value of 'attachmentUploadDir' ? What is that set to?

/var/www/ff/forum2/attachments

"forum2" is the directory of the currently installed smf1 forum. The mybb version went into the "mybb" subfolder of /var/www/ff/
I don't think this is a Merge System bug. This only happens when you try and run the recount & rebuild attachments tool in the ACP, correct?

I think that the Merge System wasn't able to convert the actual attachment data over (And it gives an error as such). Not sure if you just missed the error or not, but you'll need to manually move them over or wait until I provide better handling of transferring attachments in a future Merge System version.

Ryan
it seems to me the ACP screws up, because the merge system wrote data from a sucessfull merge of addons into the db, when infact not a single one got moved over from the old place (and got renamed as the naming scheme differes from smf and mybb on the attachment file names).

Ill try to redo the whole thing this afternoon and check again for usefull error reports, seems i had missed something, but the logs dont show anything usefull.
(2009-05-05, 09:54 AM)Tupsi Wrote: [ -> ]when infact not a single one got moved over from the old place (and got renamed as the naming scheme differes from smf and mybb on the attachment file names).

Well yeh, that happens when the merge system wasn't able to transfer the attachments (wrong url, wrong permissions, or something). I'm trying to improve that so it checks that it can transfer them properly first and won't let the user continue until it works. You might be interested in waiting for beta 5 which will have these improvements. (Should be out in a couple weeks)
Pages: 1 2