News:

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

Main Menu

convert.php [wbb3] failure: cannot find path

Started by jb82, August 26, 2022, 09:26:59 AM

Previous topic - Next topic

jb82

Hello Forum,

I am trying to import data from an old woltlab burning board version 3 into smf. As the converter is made for smf 2.0.19 I downloaded and installed 2.0.19 full install on my webserver. The new installation of smf works fine, but the converter says it cannot find my installation of wbb3. This I cannot understand as the given path is accessible and contains the configuration file with all the needed data.

Here is my configuration:
wbb3 (Woltlab Burning Board 3.1.8)
install path.../fiesta/
options.inc.php.../fiesta/options.inc.php
wcf_dir.../wbbl/wcf/
Edit: I needed to put a CODE-Tag because smf recognized the filename as an url, which I may not post. Unfortunately I don't know how to avoid this.

smf (Simple Machines Forum 2.0.19)
install path.../fiesta/smf/
official converter(wbb3 > smf 2.0.19)

Remark: ".../" is the same path in both tables.

The converter always states
QuoteUnable to find the settings for Burning Board 3.0. Please double check the path and try again.
even though the paths must be correct as I can manually access the data with these. I tried the paths with and without closing slash /.

Did I miss to note important information?
Did I do a mistake over there or what can I do to make the conversion work? I really appreciate any help and advice!

Jens

Doug Heffernan

Quote from: jb82 on August 26, 2022, 09:26:59 AM
QuoteUnable to find the settings for Burning Board 3.0. Please double check the path and try again.

Are both forums installed in the same server? Did you install the smf forum in the same database as that of your wbb3 forum? If you used a different database, make sure that either both databases have the same user, or each user has full permissions to each other databses.

jb82

Yes, both forums are saved on the same webspace (the ".../" above is always the same) accessible via the same webserver and domain. The database used is the same as well and both forums are accessing it using the same user, which has the all rights on that database. I can ensure this using phpmyadmin with the same user credentials.

vbgamer45

For that convertor it is looking for the file /wbb3_migration.php

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

jb82

Unfortunately, I do not have that file. In wbb3_to_smf.sql (which is part of the converter) this file name is mentioned, but I guess, it is part of a comment, as it begins with "--": ---~ settings: "/wbb3_migration.php" I could not find any other reference to that file name. It doesn't seem to be part of wbb3 as I cannot find it on my webspace nor in the original install tarball. When it's a file belonging to wbb3, I guess it must be part of an internal updater from wbb2 or similiar, but I did a clean install when installing wbb3 years ago. Or may be the file mentioned was part of an earlier version of the converter?

I searched for the filename and found an old thread on this forum, where the developer of the converter wrote that it was outdated and a newer version from his github should be used. Maybe this is why the filename seems to be commented out in the wbb3_to_smf.sql? Unfortunately, the developer isn't registered here any more and the files are removed from his github. The linked thread didn't help me as they seem to had different problems when converting.

Well, I have all the required information about the database, like prefixes and so on, but where should I put it? If the file is needed, I could enter the information in it by hand if I would have a sample that shows me how the file must be.

vbgamer45

Maybe change the file to options.inc.php in the .sql file it is looking for the prefixes for database tables
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

jb82

Thanks, that got me one step further. I copied config.inc.php to wbb3_migration.php and ran convert.php again. The first thing I noticed is a php notice on the top of the page:
QuoteNotice: Undefined variable: wbb3_database in .../fiesta/smf/convert.php(458) : eval()'d code on line 1
. Convert.php shows the following error message:
QuoteSorry, the database connection information used in the specified installation of SMF cannot access the installation of Burning Board 3.0. This may either mean that the installation doesn't exist, or that the Database account used does not have permissions to access it.

The error that was received from the Database was: 1102
. I searched for "wbb3_database" in convert.php, but couldn't find it. In wbb3_to_smf.sql it appears as
---~ from_prefix: "`$wbb3_database`.".

From the next lines of the file I assumed that this variable is the beginning of all the table names. (e.g. line 24-26:
SELECT groupID FROM {$from_prefix}{$wcf_prefix}user_to_groups WHERE userID = $row[id_member]"); where {$from_prefix} is made of it:
---~ from_prefix: "`$wbb3_database`.") In phpmyadmin the tables of wbb3 are named for example "wbb0_2_board", where "0_2" is already defined in config.inc.php/wbb3_migration.php. So I hardcoded the missing "wbb" into wbb3 migration.php by changing the prefix line. Unfortunately that didn't do the trick. Convert.php now shows:
QuoteSorry, the database connection information used in the specified installation of SMF cannot access the installation of Burning Board 3.0. This may either mean that the installation doesn't exist, or that the Database account used does not have permissions to access it.

The error that was received from the Database was: 1142
[spoiler]This is the beginning of my modified wbb3_to_smf.sql:
/* ATTENTION: You don't need to run or use this file!  The convert.php script does everything for you! */

/******************************************************************************/
---~ name: "Burning Board 3.0"
/******************************************************************************/
---~ version: "SMF 2.0"
---~ settings: "/wbb3_migration.php"
---~ globals: wcf_prefix, wbb_prefix
/* original: ---~ from_prefix: "`$wbb3_database`." */
---~ from_prefix: "wbb."
---~ table_test: "{$from_prefix}{$wbb_prefix}user"
(Only changes in line 9 (backup) and 10 (changed version of line 9).[/spoiler]

Next I restored wbb3_to_smf.sql from backup and edited wbb3_migration.php. I duplicated the line where WBB_N (the second part of the prefix) is defined and changed it to the missed "wbb3_database" and set it to "wbb" (the first part of the prefix).
if (!defined('WBB_N')) define('WBB_N', '0_2');
if (!defined('wbb3_database')) define('wbb3_database', 'wbb');
But the result is exactly the same.


In both cases, convert.php now shows the error message
QuoteSorry, the database connection information used in the specified installation of SMF cannot access the installation of Burning Board 3.0. This may either mean that the installation doesn't exist, or that the Database account used does not have permissions to access it.

The error that was received from the Database was: 1142
I googled "sql 1142" and that told me that it would mean "command denied to user" which doesn't make sense to me as I can do everything with the same credentials using phpmyadmin. Without altering files, the error number was 1102, which I don't understand as well as it seems to mean that the database name would be wrong?

vbgamer45

It's best to make sure config.php
Has this set with your database name and database table prefix.
$wbb3_database = '';
$wcf_prefix = '';
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

jb82

Okay then I reset wbb3_to_smf.sql by uploading the original and edited wbb3_migration.php which has its content from config.inc.php: <?php
// com.woltlab.wbb vars
// wbb
if (!defined('WBB_DIR')) define('WBB_DIR'dirname(__FILE__).'/');
if (!
defined('RELATIVE_WBB_DIR')) define('RELATIVE_WBB_DIR''');
if (!
defined('WBB_N')) define('WBB_N''0_2');
//if (!defined('wbb3_database')) define('wbb3_database', 'wbb'); <- my first way to define wbb3_database, now commented out
$packageDirs[] = WBB_DIR;

// general info
if (!defined('RELATIVE_WCF_DIR')) define('RELATIVE_WCF_DIR'RELATIVE_WBB_DIR.'../wbbl/wcf/');
if (!
defined('PACKAGE_ID')) define('PACKAGE_ID'96);
if (!
defined('PACKAGE_NAME')) define('PACKAGE_NAME''WoltLab Burning Board');
if (!
defined('PACKAGE_VERSION')) define('PACKAGE_VERSION''3.1.8');

// added:
$wbb3_database 'wbb';
$wcf_prefix '0_2_';
?>

convert.php still messages
QuoteThe error that was received from the Database was: 1142
. The same error occures when I enter information to the variables, which are obviously wrong. Because of that I guessed that the information given might be wrong as well and I had another look into wbb3_to_smf.sql. I noticed that wbb uses two different prefixes, one for the community (user accounts and such things) and another one for the board: e.g. line 111: LEFT JOIN {$from_prefix}{$wcf_prefix}user_option_value [snip]
e.g. line 112: LEFT JOIN {$from_prefix}{$wbb_prefix}user [snip]
I think this is a good place for the error to occur, because the complete prefix must be"wbb0_2_" for wbb, but "wcf0_" for wcf.

So I changed the just now added lines in wbb3_migration.php to: // added:
$wbb3_database = '';
$wcf_prefix = 'wcf0_';
$wbb_prefix = 'wbb0_2_';
?>
This way, the table names should be combined as in the table: (If I understood the code correctly)
wbb3_to_smf.sqlresultexample: one existing table
{$from_prefix}{$wcf_prefix}wcf0_wcf0_user
{$from_prefix}{$wbb_prefix}wbb0_2_wbb0_2_board

The result: It didn't work either, but the error message changed:
QuoteSorry, the database connection information used in the specified installation of SMF cannot access the installation of Burning Board 3.0. This may either mean that the installation doesn't exist, or that the Database account used does not have permissions to access it.

The error that was received from the Database was: 1102
What a pity, I thought I was on the right way. What did I do wrong now?

vbgamer45

$wbb3_database needs the database name.

And you must make sure the SMF database user has permission to access/read that database.
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

jb82

Oh thanks! I didn't see this even though the name of the variable said it.. So my wbb3_migration.php now contains <?php
// ...original code...
// added:
$wbb3_database 'db1045312-datenbank';
$wcf_prefix 'wcf0_';
$wbb_prefix 'wbb0_2_';
?>

...and I got a step ahead! Convert.php began conversion but failed as follows:
QuoteConverting...
Converting members...
Unsuccessful!
This query:
SELECT
u.userID AS id_member, SUBSTRING(u.username, 1, 80) AS member_name,
IF (p.Posts IS NULL, 0, p.Posts) AS posts, u.registrationDate AS date_registered,
u.lastActivityTime AS last_login,SUBSTRING(u.username, 1, 255) AS real_name,
u.password AS passwd, SUBSTRING(u.email, 1, 64) AS email_address,
v.userOption17 AS website_title, v.userOption17 AS website_url, '' AS icq, '' AS aim,
'' AS yim, '' AS msn,
IF(IFNULL(v.userOption12, '') = '', 0, v.userOption12) AS gender,
v.userOption11 AS birthdate,
'' AS show_online, '' AS personal_text, '0' AS id_group, '' AS hide_email,
'' AS time_offset, SUBSTRING(u.signature, 1, 65534) AS signature, '' AS lngfile,
'' AS buddy_list, '' AS pm_ignore_list, '' AS message_labels,
v.userOption13 AS location, '' AS time_format, '' AS avatar, '' AS member_ip,
'' AS secret_question, '' AS secret_answer, '' AS validation_code,
'' AS additional_groups, '' AS smiley_set, salt AS password_salt,
'' AS member_ip2
FROM `db1045312-datenbank`.wcf1_user AS u
LEFT JOIN `db1045312-datenbank`.wcf0_user_option_value AS v ON (u.userID = v.userID)
LEFT JOIN `db1045312-datenbank`.wbb0_2_user AS p ON (u.userID = p.UserID)
LIMIT 0, 500;
Caused the error:
1146
And I guess, I see the error:
QuoteFROM `db1045312-datenbank`.wcf1_user
refers to a table, which doesn't exist - there is no wcf1_ in the database. There is a table called wcf0_user, which contains at least part of the data mentioned above. (I don't understand the complex SELECT-call above so I cannot say where there is all the data mentioned in the call.) Because I didn't enter "wcf1_" anywhere, I had a look into wbb3_to_smf.sql and found it hardcoded in line 110: FROM {$from_prefix}wcf1_user AS u. It is the only appeareance of "wcf1_" in the file, so I guessed it may be left from debugging changes made by the original author and therefore changed it to "wcf0_" which then refers to an existing table.

After I clicked on "Try again" the script continued and failed at another point:
QuoteConverting...
Converting members...
Wrong value type sent to the database. Date expected. (birthdate)
. At this point I need to take a break and continue tommorow. May be I will see more clearly when I got some sleep.

What do you think, was my guess and the change of the hardcoded but non-existing "wcf1_" to "wcf0_" correct or what would you advise?


PS I only got one user assigned to that database, who should have all rights (regarding this database): > Select user()
[email protected]


> SHOW GRANTS for 0123456789
GRANT USAGE ON *.* TO '0123456789'@'%'
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, CREATE VIEW, SHOW VIEW ON `db1045312-datenbank`.* TO '0123456789'@'%'
0123456789 is not my real user name of course but censored :)

Advertisement: