vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   vBulletin Merge Tool for v2.2.x (https://vborg.vbsupport.ru/showthread.php?t=45844)

Intercept 02-08-2003 05:32 AM

hey can you make the script so the database username doesnt have to be the same, i got plesk control pannel. and it wont let me put the same user name :(

Molok 02-27-2003 12:36 PM

i have 2 board version 2.2.9
now i want to merge and i received the following error

Database error in vBulletin Control Panel 2.2.9:

Invalid SQL: INSERT INTO userfield
(userid,field1,field2,field3,field4,importuserid,i snew)
VALUES
('2475',
'',
'',
'',
'',
'8',1
)
mysql error: Unknown column 'field1' in 'field list'

mysql error number: 1054

Darkwolf 02-27-2003 03:44 PM

It is possible like when the two database merge if the user using same email then they merge if not use as username[imported] ?

Lanigironu 02-27-2003 07:32 PM

This is exactly what I needed. I was going to write a script of my own, but this seems like it will do everything.

I just hope it works.

JulianD 02-28-2003 01:58 PM

Quote:

Originally posted by Molok
i have 2 board version 2.2.9
now i want to merge and i received the following error

Database error in vBulletin Control Panel 2.2.9:

Invalid SQL: INSERT INTO userfield
(userid,field1,field2,field3,field4,importuserid,i snew)
VALUES
('2475',
'',
'',
'',
'',
'8',1
)
mysql error: Unknown column 'field1' in 'field list'

mysql error number: 1054

Uhmm Looks like it doesn't work if you've deleted the user fields that comes with vbulletin. You can however replace this:

PHP Code:

  if ($userid) {
      
$DB_site->query("INSERT INTO userfield
      (userid,field1,field2,field3,field4,importuserid,isnew)
      VALUES
      ('
$userid',
      '"
.addslashes(htmlspecialchars($user[biography]))."',
      '"
.addslashes(htmlspecialchars($user[location]))."',
      '"
.addslashes(htmlspecialchars($user[interests]))."',
      '"
.addslashes(htmlspecialchars($user[occupation]))."',
      '
$user[importuserid]',1
      )"
);
  } 

with this:

PHP Code:

  if ($userid) {
      
$DB_site->query("INSERT INTO userfield
      (userid,importuserid,isnew)
      VALUES
      ('
$userid',
      '
$user[importuserid]',1
      )"
);
  } 

and hopefully it will work, however, you will lose the userfields data when you merge the databases.

JulianD 02-28-2003 04:30 PM

ok I need some help here.

I've enhaced the script a little bit. Now you can choose if you want to auto merge users with the same username, and you can choose a database to merge with a different password and a different hostname.

Please tell me if you encounter any problems, so I can update the first post.

KarateKid 03-07-2003 08:09 PM

Great.

Maybe I'll try this hack with 2 forums each many thousands posts, user and threads ;)

Regards.

Iezugod 03-09-2003 07:35 PM

When I go to start the import, I get:

Warning: Access denied for user: 'apache@localhost' (Using password: NO) in /usr/local/psa/home/vhosts/nintendonet.com/httpdocs/forums/admin/db_mysql.php on line 32

JulianD 03-09-2003 08:38 PM

Are you sure you typed the login information for the second database?

Iezugod 03-12-2003 02:48 PM

No, it wouldn't let me. As soon as I selected the vB Merge tool from the list, and clicked submit, it gave me an error..

tucklis 03-12-2003 09:43 PM

Hi,

Thanks very much for developing this hack.

I have downloaded the beta but have had some problems. After I click "start merge", it says database initialised for import and then when I click associate users it gives me the following error:

Database error in vBulletin Control Panel 2.2.9:

Invalid SQL: SELECT COUNT(*) AS count FROM soccerpages.user
mysql error: select command denied to user: 'tucklis6@server84l.xtreme-support.com' for table 'user'

mysql error number: 1142

Date: Wednesday 12th of March 2003 11:35:19 PM
Script: http://yupz.com/forum/forums/importers/bbimport_vb2.php
Referer: http://yupz.com/forums/importers/bbimport_vb2.php

Does this mean it hasn't worked? My forum now seems to read 0 posts and threads :( What am I doing wrong?

Thanks for your time,
Kerry

JulianD 03-13-2003 12:06 AM

Give me some time, it's a bug and I'll fix it probably today :)

tucklis 03-13-2003 09:09 AM

Hi,

I think I may have uploaded the old version - that's maybe why I got that error. I have now uploaded the latest beta and changed the global $vbdbhostname,$vbdbusername,$vbdbpassword,$vbdbnam e; fields to match the database I'm importing from. But now I have a new one!

Warning: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/domains/yupz.com/user/htdocs/forums/admin/db_mysql.php on line 32

Database error in vBulletin Merge Tool 2.2.9:

Link-ID == false, connect failed
mysql error:

mysql error number: 0

Date: Thursday 13th of March 2003 11:02:12 AM
Script: http://yupz.com/forums/forums/import...p?action=start
Referer: http://yupz.com/forums/admin/bbimport.php?action=

I think this maybe because the two databases that I want to merge are both on different ips to my webspace? Do I have to include the database ip / password for both databses? Where do I edit this?

One other thing (sorry for all these questions!!), should I make all the forums names match so they merge properly?

Thanks alot,
Kerry

JulianD 03-14-2003 02:21 AM

Quote:

Today at 06:09 AM tucklis said this in Post #93
One other thing (sorry for all these questions!!), should I make all the forums names match so they merge properly?

Thanks alot,
Kerry


Hi Kerry. Please give me some time and let me come out with a solution to this problem. :) I'm busy with some tests on school right now.

About the forums, no... The forums are not "merged" but it's easy to move all the post from one forum to another using the tools you found on the admin cp.

tucklis 03-14-2003 08:03 AM

OK, Thanks very much!

tucklis 03-15-2003 05:50 PM

Any more news? Sorry to be a pest but I really need this script to work!!! I think it mat just be a small alteration that is needed...

Colon33 03-15-2003 10:38 PM

Im running vb 2.2.9.. an i get this error... I uploaded the new BBIMPORT.php but as soon as i click associate users i get the DB error.

----
Database error in vBulletin Control Panel 2.2.9:

Invalid SQL: SELECT COUNT(*) AS count FROM ndream.user
mysql error: select command denied to user: 'moguslan_mogusad@localhost' for table 'user'

mysql error number: 1142

Date: Saturday 15th of March 2003 07:31:32 PM
Script: http://www.mogusland.com/forums/foru...import_vb2.php
Referer: http://www.mogusland.com/forums/impo...import_vb2.php
---

tucklis 03-18-2003 11:42 AM

I have edited the following fields in the import script:

<?php
// vBulletin Merge Tool for v2.2.x
error_reporting(7);
require ("./../admin/bbimport.php");

function makehiddenfields() {
global $vbdbhostname,$vbdbusername,$vbdbpassword,$vbdbnam e;
makehiddencode("DBIPADDRESS",$vbdbhostname);
makehiddencode("DBUSERNAME",$vbdbusername);
makehiddencode("DBPASSWORD",$vbdbpassword);
makehiddencode("DBNAME", $vbdbname);

Are these variables supposed to be for the database I'm trying to import or the database I'm importing the records into?

Cheers,
Kerry

JulianD 03-18-2003 11:09 PM

Ok, download this file again:

https://vborg.vbsupport.ru/attachmen...&postid=359490

Make sure you get the NEW version. The new file (uncompressed) is about 41KB, so make sure you get the new version and not a version from your local cache. If the new file is not about 41KB, clear your browser cache.

tucklis 03-19-2003 09:24 AM

Thank you very much for updating the hack. But I still have problems. When I click "start merge" it says "Database initialised for import."

When I click on step 2 it says "Database not selected! Warning! Restart application! (I always wanted to say that!) :)".

I think it may be to do with settings I have changes - please take a look as I was unsure what I should change here:

PHP Code:

<?php
// vBulletin Merge Tool for v2.2.x
error_reporting(7);
require (
"./../admin/bbimport.php");

function 
makehiddenfields() {
    global 
$vbdbhostname,$vbdbusername,$vbdbpassword,$vbdbname;
    
makehiddencode("IPOFDBTOBEIMPORTED",$vbdbhostname);
    
makehiddencode("DBUSERNAME",$vbdbusername);
    
makehiddencode("DBPASSWORD",$vbdbpassword);
    
makehiddencode("DBNAME"$vbdbname);
    
}



// ##############################################################################
// ok you wanted it quicly fixed, it didn't work with the same db class from vb,
// so i created another one.
class DB_Sql_merge {
  var 
$database "NAMEOFEXISTINGDB";

  var 
$link_id  1;
  var 
$query_id 0;
  var 
$record   = array();

  var 
$errdesc    "";
  var 
$errno   0;
  var 
$reporterror 1;

  var 
$server   "IPOFEXISTINGDB";
  var 
$user     "USERNAME";
  var 
$password "PASSWORD";

  var 
$appname  "vBulletin";
  var 
$appshortname "vBulletin (cp)";

  function 
connect() {
    global 
$usepconnect;
    
// connect to db server

I also changed the link_id to 1. Are these settings correct? Why am I getting this error :(

Thanks Julian,

I appreciate any help you can provide!

Regs,
Kerry

JulianD 03-19-2003 08:17 PM

No... You don't need to edit the file at all. When you start the merger, you will be prompted for the details of the database to merge (you'll be asked for a host, an username, a password and the database name. You should fill those fields according to the database you want to merge.

For example, if you're merging a database located in the same server you're running vb, then the settings should be something like this:

db host: localhost
db user: user
db pass: password
db name: dbname

but if you're trying to merge a database on a different server, you should change the db host to the host name or IP address where the database is located. Note that you will need to configure your server to allow connections from other hosts (most hosting companies doesn't allow connections to the mysql server if you're not on the local server, but you can change this on your control panel, or ask your hosting company about this matter. I'm unable to provide support here).

Tell me how it goes, or contact me (again :p) if you can't merge the database.

And remember, DON'T modify the script, you don't need to do it.

tucklis 03-20-2003 02:44 PM

I have uploaded the new version (unmodified) and when I click begin import it gives me the following error:

Database error in vBulletin Merge Tool 2.2.9:

Link-ID == false, connect failed
mysql error:

mysql error number: 0

Date: Thursday 20th of March 2003 04:39:44 PM
Script: http://yupz.com/forums/forums/import...p?action=start
Referer: http://yupz.com/forums/admin/bbimport.php?action=


My host says there is no reason why I shouldn't be able to connect :(

Regs,
Kerry

tucklis 03-20-2003 03:00 PM

I just got this reply from my host:

Dear Kerry,

Thank you for your email.

This error is caused because the script is attempting to connect using sockets which isn't allowed on our system. The way to connect on our system is using the IP address of the database and tcp/ip.



What do I do now :(........?


Kerry

JulianD 03-20-2003 03:45 PM

Can you contact me so I can see what's going on with your server configuration? I have msn icq and aim.

I can't reproduce this problem on my server, so I don't have a way to test it out.

Thanks.

tucklis 03-20-2003 04:09 PM

Just got another reply from support, here is what they said:

------------------------------------

Dear Kerry,

Looking quickly at the script you should be able to hard code the remote database in:

var $database = "";

var $link_id = 0;

var $query_id = 0;

var $record = array();

var $errdesc = "";

var $errno = 0;

var $reporterror = 1;

var $server = "localhost";

var $user = "root";

var $password = "";

Where database would be the database name and server would be the IP address of the MySQL server and use the Database Owner details.

Unless its using the hidden fields where you should still be able to hardcode or choose the remote server. You may need to specify port 3306 for the server - simply add ,3306 after the IP address specified i.e. 213.171.111.111,3306 .

I hope this helps.

------------------------------------
Cheers,
Kerry

JulianD 03-20-2003 04:42 PM

OK i think i've fixed the problem. Let me update the file.

tucklis 03-23-2003 08:44 PM

Julian,

The merge has worked fine. Although I think there was a problem with the polls, it didn't seem to convert them (but this isn't such a big problem).

The only thing is most of the forum ids seemed to have changed, is this common? Any idea how to change em back?

Anyway thanks very much for creating a great hack!

Regards,
Kerry

JulianD 03-23-2003 10:34 PM

Ummm I don't know about the polls.... When I have some time, I'll look into this.

About the forums id, yeah, those will change according to the new forums id on the board. Everything changes, just like the threadids, postids, even the userids changes....

hockyfan 03-30-2003 03:17 AM

I just have to comment, the support and assistance I got with this hack was truely unprecedented. I received excellent support, especially considering this was on his own time and without payment etc. This hack did work very well, and I highly recommend it to anyone!

Excellent work julian, and thank you!! :cool:


h

JulianD 03-30-2003 05:26 AM

Thanks for the kind words :) I'm glad you got it working on your forums.

tucklis 03-30-2003 02:51 PM

Quote:

Today at 05:17 AM hockyfan said this in Post #109
I just have to comment, the support and assistance I got with this hack was truely unprecedented. I received excellent support, especially considering this was on his own time and without payment etc. This hack did work very well, and I highly recommend it to anyone!

Excellent work julian, and thank you!! :cool:


h

I have to say I second this - great work Julian, thanks!

gmtalk 03-30-2003 08:25 PM

Quote:

12-01-02 at 09:15 PM JulianD said this in Post #69


Ohhh sorry.... Now I understand you...

Unfortunately at this time it's not possible to merge two database without the same user and password. I'll try to release a new version with this ability for you guys.


Would like to ask the progress on this.

Thanks

JulianD 03-31-2003 12:33 AM

Hi gmtalk.

Download the lastest version from here:

https://vborg.vbsupport.ru/attachmen...&postid=359490


And see if it works for you.... It *should* work using two different databases with different host/user/password... :)

gmtalk 03-31-2003 04:41 PM

Julian,

Silly question. I DLed the one that you linked and it was the same as the one that i had there. I have been trying this out on my test databases. I am importing over 10k users and 300k messages and when it was all said and done it just duplicated my forum that I was importing into.

So now I have 2 general discussion areas with the same posts etc. Thinking that I messed it up. I restored my database back to normal backups that I had. Both the database to merge into and the db that was to be merged.

I then redid the merge as before, but this time swapped my merger and mergee< is that a word > and it did the same but to the other database this time.

Now maybe I am missing something I am not sure. Shouldnt there be two entry areas one for the to db and one for the from db? On all versions that i have DLed from here it only has the one DB entry.

My server is as follows.

DB1: User: rooter Pass: pass DBName: test1
DB2: User: rooter Pass: pass DBName: test2

of course the User and Pass are the same, just not listing them here.

John

gmtalk 03-31-2003 04:46 PM

PS: yes i made sure that i had the right program. I am doing this from my laptop and not the desktop where i originally tried this.

So no need to clear my cache until i get home and try from the desktop.

john

JulianD 03-31-2003 04:59 PM

Uhmmmm First, make sure you have the lastest version... No wait... I'm going to attach the lastest version here in this post, just to make sure.. :)

Ok.. Here's how it works... The database to merge into is the one you're using to run your currently vbulletin installation. You don't need to type the user / password for it, because the script have access to the database, as long as vbulletin is running fine.

Ok now, what's the host/user and password that you should fill at the start of the merge? It's the information for the SECOND database, the one you want to merge with your current vbulletin installation.

If this database is in the same server, you should fill similar values like the ones you have on your config.php. But you have the possibility to merge a database located on another server, by filling the correct host/user/pass and db name, and it should work.

Just send me a PM if you still have problems with the merger.


Here's the lastest version! :)

Link removed.

Zero Complex 04-05-2003 08:46 PM

What tables does it exactly merge?

I have a 40mb db, and phpmyadmin keeps giving me the error when i try uploading the vbulletin.sql file that there was No SQL Query! So gonna try cleaning out some of the stuff and see what happens after.

JulianD 04-05-2003 09:47 PM

Not sure if it's going to be helpful for you, but the script only reads the following tables:

attachment
forum
poll
post
privatemessage
thread
user
userfield

I'm not sure if it's the complete list of tables the script needs to read...

TravisH 04-07-2003 02:09 AM

Quote:

03-31-03 at 07:41 PM gmtalk said this in Post #114
Julian,

Silly question. I DLed the one that you linked and it was the same as the one that i had there. I have been trying this out on my test databases. I am importing over 10k users and 300k messages and when it was all said and done it just duplicated my forum that I was importing into.

So now I have 2 general discussion areas with the same posts etc. Thinking that I messed it up. I restored my database back to normal backups that I had. Both the database to merge into and the db that was to be merged.

I then redid the merge as before, but this time swapped my merger and mergee< is that a word > and it did the same but to the other database this time.

Now maybe I am missing something I am not sure. Shouldnt there be two entry areas one for the to db and one for the from db? On all versions that i have DLed from here it only has the one DB entry.

My server is as follows.

DB1: User: rooter Pass: pass DBName: test1
DB2: User: rooter Pass: pass DBName: test2

of course the User and Pass are the same, just not listing them here.


John

I am running in to EXACTLY the same problem...
It is just duplicating ALL the entries in the database.

WoodiE 04-07-2003 03:16 AM

I have vb 2.2.8 that I would like to import to a vb 2.3.0 forum, will this work since the database for 2.2.8 is different from a 2.3.0 forum database?

-WoodiE


All times are GMT. The time now is 04:20 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01787 seconds
  • Memory Usage 1,867KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete