[SMF Converter] vBulletin 3.5

Started by JayBachatero, January 11, 2008, 02:07:55 AM

Previous topic - Next topic

JayBachatero

Software: vBulletin
Version: 3.5.x

Changelog
! Fixed issue with PM conversion. (Thanks to mtindor)
! Attachments conversion now takes care of thumbnail dimensions.

convert.php
Use this convert.php with the .sql file attached in this topic. 
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Kiv

convert.php is not available for download... timing out when clicked.

JayBachatero

Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert


winrules



winrules
SMF Developer
               
My Mods
Please do not PM me for support.


videomasterz

when I click the convert.php I go to a page that only has vbulletin 3.6 convert.php I need 3.5??

ThorstenE

Quote from: videomasterz on July 15, 2008, 02:29:28 AM
when I click the convert.php I go to a page that only has vbulletin 3.6 convert.php I need 3.5??
download vbulletin35_to_smf.sql from first post in this topic (attachment) and convert.php from this topic (http://www.simplemachines.org/community/index.php?topic=140741.0), attached in first post (scroll down)


videomasterz

allright thanks, thought since it said:

"Software: vBulletin
Version: 3.6"

it was for ONLY 3.6, ok gonna try it out to convert my 3.5 to smf :)

SleePy

Where do you see that? I don't see that version number in this topic. I know we have a 3.6 converter. But that is a different topic.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Red G. Brown

I have a vb 3.5 database backup, but no vb forums anymore (webhost accidentally deleted it). How do I do the conversion when the original forums are gone?

Norv

You don't actually need the forum itself, but you need the vbulletin database, and a configuration file where the converter finds information like what is the name of the vbulletin database and table prefix.
Please eventually:
- install SMF
- restore the database backup into a database. (make sure that database has the same user as the SMF database user; it could also be the same database as SMF; or the SMF database user has also access to it)
- make a folder for vbulletin, and a folder /includes in it.
- make a file config.php into the ./includes folder, with the contents

$config['Database']['dbname'] = 'your_vbulletin_database_name';
$config['Database']['tableprefix'] = 'your_vbulletin_table_prefix';

- upload the converter files in your SMF folder and run convert.php
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Red G. Brown

#11
It would be awesome if I could enter that info manually, and upload an SQL backup file. I'm switching web hosts, so the database isn't even on the new host, and I can't create the db with the same naming scheme used by the old host.

----

update:

I just found out that not only will I have that problem, but the work around for this problem requires the webhost to change my username to the same username I used on the old webhost. This will allow the backup mysql file to work, but it will break the smf installation. In other words, I can't convert a VB backup from another webhost, which defeats the purpose of having backups in the special case where I want to resttore the backup and convert at the same time, and there's no other choice but to do it that way.

Norv

Quote from: qwasty on October 05, 2009, 01:52:05 PM
It would be awesome if I could enter that info manually, and upload an SQL backup file. I'm switching web hosts, so the database isn't even on the new host, and I can't create the db with the same naming scheme used by the old host.
You can enter the information manually, in the config file. The name of the database, and the table prefix.
If you restore the backup under another name, then please enter in the config file the name you use. I didn't say you need to have the same name as the one the former installation had (though when you create a database, you should be able to name it any way you want).
(in most cases)
Please explain, what exactly are you talking about when saying "can't create the db with the same naming scheme used by the old host"?

Quote from: qwasty on October 05, 2009, 01:52:05 PM
I just found out that not only will I have that problem, but the work around for this problem requires the webhost to change my username to the same username I used on the old webhost. This will allow the backup mysql file to work, but it will break the smf installation. In other words, I can't convert a VB backup from another webhost, which defeats the purpose of having backups in the special case where I want to resttore the backup and convert at the same time, and there's no other choice but to do it that way.
Why do you say that you need the webhost to change your username to the same username used by the old webhost?
That should not be the case at all. Please explain what you refer to, the username for the database of vbulletin? Why do you need it changed?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Red G. Brown

Sorry for being vague. I don't understand the technical issues just yet, but my webhost uses cpanel, and it enforces a prefix on database names of the client's username. I tried to create database with a name appropriate under those restrictions, and then I tried to import the backup using phpmyadimn, but that gives me the following error:

Error

SQL query:

--
-- Database: `oldhostusername_bulletin`
--
CREATE DATABASE `oldhostusername_bulletin` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;


MySQL said: 
#1044 - Access denied for user 'newhostusername'@'localhost' to database 'oldhostusername_bulletin'

Apparently, the import does not give me an option to choose which database to but the backup sql data into, and instead tries to put it into whatever db is hardcoded into the backup from the old web host.

So, I tried to create a db with the name "oldhostusername_bulletin", but the new host cpanel only allows "newhostusername_bulletin". After that, I gave up, since I don't know what else to do.

Norv

Please try to open the backup file in a text editor (a lightweight text editor like Notepad++ should do just fine if you are on windows), and comment out the CREATE DATABASE line, like:
Code (find) Select

CREATE DATABASE `oldhostusername_bulletin` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

Code (replace) Select

-- CREATE DATABASE `oldhostusername_bulletin` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

Then, please try again the import.

Note: you can make the backup without CREATE DATABASE too (thus allowing you to import the tables into an existing database). Typically a backup made with phpMyAdmin's Export feature does not have CREATE DATABASE (at least if you have the database already selected and go to the Export tab).
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Red G. Brown

#15
Commenting out CREATE DATABASE did not work. I had to remove all of it entirely. After that, it worked to get it into the db newhostusername_bulletin, however, I got these two lines at the top of the error page after trying to convert:

$config['Database']['dbname'] = 'oldhostusername_bulletin'; $config['Database']['tableprefix'] = 'vb_';
Notice: Undefined variable: config in /home/newhostusername/public_html/smf/convert.php(407) : eval()'d code on line 1

Notice: Undefined variable: config in /home/newhostusername/public_html/smf/convert.php(407) : eval()'d code on line 1

and then I got the following error on the error page after trying to convert. Any ideas?

Sorry, the database connection information used in the specified installation of SMF cannot access the installation of vBulletin 3.5. This may either mean that the installation doesn't exist, or that the MySQL account used does not have permissions to access it.

The error MySQL gave was: Incorrect database name ''

Norv

Please note that config.php should define the variables appropriate to your new server: the current name of the database where vbulletin data is, and the table prefix (this shouldn't have changed):

$config['Database']['dbname'] = 'your_vbulletin_current_database_name';
$config['Database']['tableprefix'] = 'your_vbulletin_table_prefix';


This file should be in something like:
/home/newhostusername/public_html/vbulletin/includes/config.php

When convert.php is run, the vbulletin installation folder it asks about should then be:
/home/newhostusername/public_html/vbulletin

Please check all the above. If they are correct, and you still get "Notice: Undefined variable: config", then you might have be into a rare situation when the host configuration doesn't allow the config file to be imported from another folder. Perhaps then, you can consider an alternative:
make a subfolder of the SMF folder named /includes, and copy the config.php file there. Make sure you tell the convert script when it asks about vbulletin installation folder that it's exactly
/home/newhostusername/public_html/smf, as well.

Please, in both cases, let us know the full messages/errors, if case may be.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Red G. Brown

I double checked everything, and it's all fine as far as I can tell. I tried your alternative method, but I got the same errors as before, with no change at all.

Norv

I've seen this only once in the past, it could be something rarely seen in a host's configuration settings, that prevents this include from working. Please, still, could you paste here the messages from the second configuration? Where is config.php now (comparing to your_web_root folder)?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Red G. Brown

config.php is in both

/home/newhostusername/www/vb/includes/config.php
/home/newhostusername/www/smf/includes/config.php

I noticed that public_html and www have the same content, so I don't know if that makes any difference. I've been working with the www directory, but all the errors report the public_html directory.

Below is the errors at the top of the convert page, then the page title, and the reported error below it. I copied and pasted it verbatim excep for some new lines for clarity, and I changed the usernames:

$config['Database']['dbname'] = 'newhostusername_bulletin'; $config['Database']['tableprefix'] = 'vb_';
Notice: Undefined variable: config in /home/newhostusername/public_html/smf/convert.php(407) : eval()'d code on line 1

Notice: Undefined variable: config in /home/newhostusername/public_html/smf/convert.php(407) : eval()'d code on line 1

vBulletin 3.5 to SMF Converter

Sorry, the database connection information used in the specified installation of SMF cannot access the installation of vBulletin 3.5. This may either mean that the installation doesn't exist, or that the MySQL account used does not have permissions to access it.

The error MySQL gave was: Incorrect database name ''

Advertisement: