Hornstar
Well-known member
Is this what you need?You should be able to do that I think yes, @Jake Bunce can confirm.
Can you post me the schema for the dbtech thanks table?


Is this what you need?You should be able to do that I think yes, @Jake Bunce can confirm.
Can you post me the schema for the dbtech thanks table?
root@server [~]# php /home/***/public_html/***/Export.php
PHP Deprecated: Comments starting with '#' are deprecated in /usr/local/lib/php .ini on line 1129 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /usr/local/lib/php .ini on line 1130 in Unknown on line 0
Failed loading /usr/local/IonCube/ioncube_loader_lin_5.5.so: /usr/local/IonCube /ioncube_loader_lin_5.5.so: cannot open shared object file: No such file or dire ctory
Failed loading /usr/local/IonCube/ioncube_loader_lin_5.5.so: /usr/local/IonCube /ioncube_loader_lin_5.5.so: cannot open shared object file: No such file or dire ctory
Failed loading /usr/local/Zend/lib/Guard-5.5.0/php-5.5.x/ZendGuardLoader.so: /u sr/local/Zend/lib/Guard-5.5.0/php-5.5.x/ZendGuardLoader.so: cannot open shared o bject file: No such file or directory
!!!WARNING!!! - set charset to 'binary' in XenForo_Application:loadDb()
#################################################
### Digital Point A.R.F.I. vB4 -> XF Importer ###
### Modified by Slavik at www.XenForo.com ###
### with assistance from Mike, Jake and Shawn ###
#################################################
### Notes: ###
### None of the user feilds will be imported ###
### by default. If you want to keep your user ###
### fields these need to be configured in ###
### XenForo first and then mapped at lines ###
### 380-396. ###
#################################################
1 - Posts
2 - Users
3 - Threads
4 - Private Messages
5 - Avatars
6 - Attachments
7 - Forums
8 - Miscellaneous
9 - Everything
Make Selection [1-9]:
Is everything all good, or are those errors bad?
The PHP warnings are wothing to worry about, theyre just notices. You should however take note of the
!!!WARNING!!! - set charset to 'binary' in XenForo_Application:loadDb()
This is in /library/XenForo/Application.php
Make Selection [1-9]: 1
exporting posts...
posts
An exception occurred: exec() has been disabled for security reasons in /home/xxx/public_html/demo/Export.php on line 785
#0 [internal function]: XenForo_Application::handlePhpError(2, 'exec() has been...', '/home/xxx/...', 785, Array)
#1 /home/xxx/public_html/demo/Export.php(785): exec('mysql -hlocalho...')
#2 /home/xxx/public_html/demo/Export.php(1851): DigitalPointExporter->posts()
#3 {main}
root@server [~]#
in php.ini disable_functions list, remove exec then restart apache for php changes to take affect.Just confirming a couple of things:
1: I change 'charset' => 'utf8' to 'charset' => 'binary' ?
2: Will I have to apply that after each xenforo update?
3. What exactly is this change doing?
Update:
This is an error I just got after pressing 1.
What do I do about this error?Code:Make Selection [1-9]: 1 exporting posts... posts An exception occurred: exec() has been disabled for security reasons in /home/xxx/public_html/demo/Export.php on line 785 #0 [internal function]: XenForo_Application::handlePhpError(2, 'exec() has been...', '/home/xxx/...', 785, Array) #1 /home/xxx/public_html/demo/Export.php(785): exec('mysql -hlocalho...') #2 /home/xxx/public_html/demo/Export.php(1851): DigitalPointExporter->posts() #3 {main} root@server [~]#
Just confirming a couple of things:
1: I change 'charset' => 'utf8' to 'charset' => 'binary' ?
2: Will I have to apply that after each xenforo update?
3. What exactly is this change doing?
Update:
This is an error I just got after pressing 1.
What do I do about this error?Code:Make Selection [1-9]: 1 exporting posts... posts An exception occurred: exec() has been disabled for security reasons in /home/xxx/public_html/demo/Export.php on line 785 #0 [internal function]: XenForo_Application::handlePhpError(2, 'exec() has been...', '/home/xxx/...', 785, Array) #1 /home/xxx/public_html/demo/Export.php(785): exec('mysql -hlocalho...') #2 /home/xxx/public_html/demo/Export.php(1851): DigitalPointExporter->posts() #3 {main} root@server [~]#
Here is the code fix for the vB4 file system attachment bug.
Replace this code:
Code:$attachments = $this->db->fetchAll(' SELECT attachment.attachmentid AS attachment_id, attachment.userid AS user_id, ' . (self::$isVB4 ? 'contentid' : 'postid') . ' AS content_id, attachment.dateline AS attachment_date, ' . (self::$isVB4 ? 'filedata.filedata' : 'attachment.filedata') . ' AS file, ' . (self::$isVB4 ? 'filedata.thumbnail_filesize' : 'attachment.thumbnail_filesize') . ', attachment.filename, ' . (self::$isVB4 ? 'filedata.extension' : 'attachment.extension') . ' AS extension FROM ' . $this->sourceDb . '.attachment ' . (self::$isVB4 ? 'LEFT JOIN ' . $this->sourceDb . '.filedata ON (filedata.filedataid = attachment.filedataid)' : '') . ' WHERE attachment.attachmentid BETWEEN ' . intval($start) . ' AND ' . intval($start + 999) . (self::$isVB4 ? ' AND attachment.contenttypeid = 1' : '') . ' ' . (self::$isVB4 ? 'GROUP BY attachment.filedataid' : '') . ' ORDER BY attachment.attachmentid ') ) { echo "\r\n " . number_format(count($attachments)) . " new attachments\r\n"; foreach ($attachments as $attachment) { echo $attachment['attachment_id'] . ' '; if (self::$attachFile AND file_exists(self::$attachFile . implode('/', preg_split('//', $attachment['user_id'], -1, PREG_SPLIT_NO_EMPTY)) . '/' . strval($attachment['attachment_id']) . '.attach')) { $attachment['file'] = file_get_contents(self::$attachFile . implode('/', preg_split('//', $attachment['user_id'], -1, PREG_SPLIT_NO_EMPTY)) . '/' . strval($attachment['attachment_id']) . '.attach'); } else { $attachment['file'] = $attachment['file']; } if (!$attachment['file']) { echo '!!MISSING DATA!!'; continue; }
...with this:
Code:$attachments = $this->db->fetchAll(' SELECT attachment.attachmentid AS attachment_id, attachment.userid AS user_id, ' . (self::$isVB4 ? 'contentid' : 'postid') . ' AS content_id, attachment.dateline AS attachment_date, ' . (self::$isVB4 ? 'filedata.filedata' : 'attachment.filedata') . ' AS file, ' . (self::$isVB4 ? 'filedata.thumbnail_filesize' : 'attachment.thumbnail_filesize') . ', attachment.filename, ' . (self::$isVB4 ? 'filedata.extension' : 'attachment.extension') . ' AS extension, ' . (self::$isVB4 ? 'filedata.filedataid' : 'attachment.attachmentid') . ' AS filesysid FROM ' . $this->sourceDb . '.attachment ' . (self::$isVB4 ? 'LEFT JOIN ' . $this->sourceDb . '.filedata ON (filedata.filedataid = attachment.filedataid)' : '') . ' WHERE attachment.attachmentid BETWEEN ' . intval($start) . ' AND ' . intval($start + 999) . (self::$isVB4 ? ' AND attachment.contenttypeid = 1' : '') . ' ' . (self::$isVB4 ? 'GROUP BY attachment.filedataid' : '') . ' ORDER BY attachment.attachmentid ') ) { echo "\r\n " . number_format(count($attachments)) . " new attachments\r\n"; foreach ($attachments as $attachment) { echo $attachment['attachment_id'] . ' '; if (self::$attachFile AND file_exists(self::$attachFile . implode('/', preg_split('//', $attachment['user_id'], -1, PREG_SPLIT_NO_EMPTY)) . '/' . strval($attachment['filesysid']) . '.attach')) { $attachment['file'] = file_get_contents(self::$attachFile . implode('/', preg_split('//', $attachment['user_id'], -1, PREG_SPLIT_NO_EMPTY)) . '/' . strval($attachment['filesysid']) . '.attach'); } else { $attachment['file'] = $attachment['file']; } if (!$attachment['file']) { echo '!!MISSING DATA!!'; continue; }
This will be included in the next update. In the meantime you can manually apply the code fix.
Jake, i tried this fix, but didnt work. Are u sure about this edit fixes problem ?
No error but i have about 17000 attachment on vbulletin, but export left on attachmentid 8348. i can see it in database.
Also attachment folder size is about 1.2gb on vbulletin, after export, xenforo data/attachments dir size is about 26Megabyte
I think, there is a problem with "attachment.contenttypeid = 1" parameter in your sql command of attachment exporting ?
268 new attachments
8000 8001 8003 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8030 8033 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8140 8141 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8165 8166 8167 8168 8169 8171 8172 8173 8174 8175 8176 8177 8184 8185 8186 8187 8188 8189 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8208 8209 8210 8211 8212 8215 8217 8218 8219 8220 8221 8222 8223 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8243 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8274 8275 8276 8277 8278 8279 8280 8282 8283 8284 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8304 8305 8307 8312 8313 8314 8315 8316 8317 8319 8320 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8339 8340 8341 8343 8344 8345 8346 8347 8348
updating attachment view count
Total time for attachments: 54.51s
// MAP VB GROUP IDS TO XF GROUP IDS
public static $groupMap = array(
1 => 1,
2 => 2,
3 => 1,
4 => 1,
5 => 4,
6 => 3,
7 => 4,
11 => 5,
13 => 6,
28 => 7,
29 => 8,
30 => 9,
31 => 10,
32 => 11,
33 => 12,
35 => 13,
40 => 14,
42 => 15,
43 => 16,
44 => 17,
45 => 18,
);
Does that mean I need to manually create each user group in xenforo first?@Hornstar
1) Yes. Define your usergroupid maps.
2) That error can be ignored. It is expected during a first run where there are no existing post data files to overwrite which is what happens during subsequent runs.
Does that mean I need to manually create each user group in xenforo first?
Can I do attachments first and then close the forum? There are 200k+ attachments and it is the longest part of the import by far. Would be nice to have the forum live until that is done. Not worried about losing any attachments while the forum is live.
We use essential cookies to make this site work, and optional cookies to enhance your experience.