News:

Wondering if this will always be free?  See why free is better.

Main Menu

Conversion issue.

Started by swhite29, July 11, 2023, 05:49:24 PM

Previous topic - Next topic

swhite29

I'm trying to convert from a vBulletin 4.2.5 database to SMF 2.0.19 using the converter.  I previously tried with SMF 2.1.4 and hit the same error but as the converter in the main Download section was for 2.0.19, I tried it as well. 

I am using MySQL 8.0.33 and PHP 7.2.24. 

#php convert.php --path_to=/var/www/smf --path_from=/var/www/temp_vb  --convert_script=vbulletin_to_smf.sql --db_pass=xxxxxxx --debug
PHP Warning:  Use of undefined constant MYSQL_TITLE - assumed 'MYSQL_TITLE' (this will throw an Error in a future version of PHP) in /var/www/smf/Sources/Subs-Db-mysql.php on line 55
PHP Warning:  explode() expects parameter 2 to be string, array given in /var/www/forum/convert.php on line 424
The converter detected that you are using MYSQL_TITLE. This converter only supports .

Any help to get to the cause is appreciated.

vbgamer45

The error message "MYSQL_TITLE" above looks like from SMF 2.1
Convertors only work with SMF 2.0.x currently.

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

swhite29

Good catch, I had forgot to change the command line to point to the 2.0.19 installation.  It now throws the following errors:
Starting Conversion

 * Converting members...
PHP Notice:  Undefined property: mysqli_result::$EOF in /var/www/forum/convert.php on line 2732
PHP Notice:  Undefined property: mysqli_result::$Fields in /var/www/forum/convert.php on line 2736
PHP Notice:  Trying to get property 'Count' of non-object in /var/www/forum/convert.php on line 2737
PHP Fatal error:  Uncaught Error: Call to undefined method mysqli_result::MoveNext() in /var/www/forum/convert.php:2742
Stack trace:
#0 /var/www/forum/convert.php(1262): convert_fetch_assoc(Object(mysqli_result))
#1 /var/www/forum/convert.php(3049): doStep1()
#2 /var/www/forum/convert.php(42): cmdStep0()
#3 {main}
  thrown in /var/www/forum/convert.php on line 2742

Doug Heffernan

What php version are you running?

vbgamer45

I would also check the database user has permission to access both databases.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

swhite29

Quote from: Doug Heffernan on July 12, 2023, 12:28:14 PMWhat php version are you running?

PHP 7.2.24

The user  can access both databases.

swhite29

I can see the mysql parts were removed before PHP 7.2.24 so have also installed  PHP 5.6 to try but it  gives a different issue:
php5.6 convert.php --path_to=/var/www/forum --path_from=/var/www/temp_vb  --convert_script=vbulletin4_to_smf.sql --db_pass=xxxxxxx  --debug
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
        <head>
                <meta name="robots" content="noindex" />
                <title>Connection Problems</title>
        </head>
        <body>
                <h3>Connection Problems</h3>
                Sorry, SMF was unable to connect to the database.  This may be caused by the server being busy.  Please try again later.
        </body>

I can connect to both databases using the credentials in Settings.php

swhite29

After lots of trial and error, I have it running through the conversion to the point of Converting topics where it hits another hard stop:
* Converting topics...
PHP Fatal error:  Uncaught Error: Call to undefined function mysql_errno() in /var/www/smf/convert.php:2510
Stack trace:
#0 /var/www/smf/convert.php(1258): convert_query('SELECT\n\tt.threa...')
#1 /var/www/smf/convert.php(3048): doStep1()
#2 /var/www/smf/convert.php(42): cmdStep0()
#3 {main}
  thrown in /var/www/smf/convert.php on line 2510

It seems to have converted the members/categories/boards etc so it would be good to get this resolved.

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

swhite29

Quote from: vbgamer45 on July 12, 2023, 09:45:41 PMChange to  mysqli_errno


Thanks, that looks like it progressed a bit but mysqli_errno expects the connection to be passed to it and I can't work put what that should be.
* Converting topics...
PHP Warning:  mysqli_errno() expects exactly 1 parameter, 0 given in /var/www/convert.php on line 2510
Unsuccessful! Database error message:
1055
$db_errno = $smcFunc['db_title'] == 'MySQL' ? mysqli_errno()
Regarding error 1055: MySQL error 1055 is a common error that occurs when using the GROUP BY clause. It occurs when we include a column in our SELECT list that's not also included in the GROUP BY clause.

swhite29

I resolved this latest error by disabling ONLY_FULL_GROUP_BY in MySQL: hxxp:stackoverflow.com/questions/23921117/disable-only-full-group-by [nonactive]

On to the next error Converting Smileys  ;D

PHP Notice:  Undefined property: mysqli_result::$EOF in /var/www/convert.php on line 2761
PHP Notice:  Undefined property: mysqli_result::$Fields in /var/www/convert.php on line 2765
PHP Notice:  Trying to get property 'Count' of non-object in /var/www/convert.php on line 2766
PHP Fatal error:  Uncaught Error: Call to undefined method mysqli_result::MoveNext() in /var/www/convert.php:2768
Stack trace:
#0 /var/www/convert.php(1101) : eval()'d code(17): convert_fetch_row(Object(mysqli_result))
#1 /var/www/convert.php(1101): eval()
#2 /var/www/convert.php(3050): doStep1()
#3 /var/www/convert.php(42): cmdStep0()
#4 {main}
  thrown in /var/www/convert.php on line 2768

swhite29

I have managed to get the forum converted but it required so many changes that I stopped tracking them. Thanks to those who provided some guidance.  :)

Advertisement: