PDA

View Full Version : problame to import db whet impex


avitor
Mon 28th Apr '08, 7:06am
hello
i do all nead by the manuel and gate this error to import tha db from my old to new site

i gat this error

Parse error: syntax error, unexpected T_VARIABLE in /home/orgiva/domains/rawfoodfamily.org/public_html/akotelforums/impex/ImpExConfig.php on line 24

what to do?

avitor
Mon 28th Apr '08, 7:21am
hello agayn

i dont know how but is start work an find new error

ImpEx Database errormysql error: Invalid SQL: SHOW TABLES
mysql error: No Database Selected
mysql error number: 1046
Date: Monday 28th 2008f April 2008 01:16:05 PM
Database: source
MySQL error: No Database Selected
??

avitor
Mon 28th Apr '08, 8:17am
this is the impexconfig configuration

<?php
if (!defined('IDIR')) { die; }
################################################## ################## |;
# vBulletin - Licence Number VBFEB2DB01
# ---------------------------------------------------------------- # |;
# Copyright ©2000–2008 Jelsoft Enterprises Ltd. All Rights Reserved. |;
# This file may not be redistributed in whole or significant part. # |;
# ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # |;
# http://www.vbulletin.com | http://www.vbulletin.com/license.html # |;
################################################## ################## |;
# The following settings allow ImpEx to connect to the vBulletin 3
# database into which you will be importing data.
####
#
# TARGET - The target is the vBulletin database (where the data is going to)
#
####
$impexconfig['target']['server'] = 'localhost';
$impexconfig['target']['user'] = 'my user';
$impexconfig['target']['password'] = 'my password';
$impexconfig['target']['database'] = 'my user';
$impexconfig['target']['tableprefix'] = '';
# If the system that is being imported from uses a database,
# enter the details for it here and set 'sourceexists' to true.
# If the source data is NOT stored in a database, set 'sourceexists' to false
$impexconfig['sourceexists'] = true;
####
#
# SOURCE - The source is the old forum database (where the data is coming from)
#
####
# mysql / mssql
$impexconfig['source']['databasetype'] = 'mysql'; // mysql OR mssql
$impexconfig['source']['server'] = 'localhost';
$impexconfig['source']['user'] = 'my user';
$impexconfig['source']['password'] = 'my password';
$impexconfig['source']['database'] = 'source';
$impexconfig['source']['tableprefix'] = 'phpbb';
####
#
# DUPLICATE CHECKING
# Where unique import id's are aviable ImpEx can check for duplicates with some
# Tier2 systems this will need to be set to false.
#
# yahoo_groups, YaBB 2.1, Ikonboard 3.1.5 (for attachments)
#
####
define('dupe_checking', true);
################################################## #############################
####
#
# ADVANCED - For a standard import or a novice user leave the settings below.
#
####
// Advanced Target
$impexconfig['target']['databasetype'] = 'mysql'; // currently mysql only
$impexconfig['target']['charset'] = '';
$impexconfig['target']['persistent'] = false; // (true/false) use mysql_pconnect
// Advanced Source
$impexconfig['source']['charset'] = '';
$impexconfig['source']['persistent'] = false;
# pagespeed is the second(s) wait before the page refreshes.
$impexconfig['system']['language'] = '/impex_language.php';
$impexconfig['system']['pagespeed'] = 1;
define('impexdebug', false);
define('emailcasesensitive', false);
define('forcesqlmode', false);
define('skipparentids', false);
define('shortoutput', false);
define('do_mysql_fetch_assoc', false);
define('step_through', false);
define('lowercase_table_names', false);
define('use_utf8_encode', false);
?>

Jerry
Mon 28th Apr '08, 4:37pm
Line 24 will be you're target password, ensure that the password is in single or double quotes as needed and the line is terminated with a semi colon.

avitor
Mon 28th Apr '08, 5:28pm
hello again

i change this password and now i have difrent problem
my new vb site and db are in same server of my old site and server
all my sites are in same server

i configurate all config files same like asks in install manuel

and now gate this error


ImpEx build version : 1.88

Database cleanup & restart (http://rawfoodfamily.org/akotelforums/impex/help.php) ||| Online manual (http://www.vbulletin.com/docs/html/impex)
Using includes/config.php for target config.



Altering tables

ImpEx will now Alter the tables in the vB database to include import id numbers.This is needed during the import process for maintaining refrences between the tables during an import.If you have large tables (i.e. lots of posts) this can take some time.They will also be left after the import if you need to link back to the origional vB userid.
moderator - importmoderatorid Completed
usergroup - importusergroupid Completed
ranks - importrankid Completed
poll - importpollid Completed
forum - importforumid Completed
forum - importcategoryid Completed
user - importuserid Completed
style - importstyleid Completed
thread - importthreadid Completed
post - importthreadid Completed
thread - importforumid Completed
smilie - importsmilieid Completed
pmtext - importpmid Completed
avatar - importavatarid Completed
customavatar - importcustomavatarid Completed
customprofilepic - importcustomprofilepicid Completed
post - importpostid Completed
attachment - importattachmentid Completed
pm - importpmid Completed
usernote - importusernoteid Completed
phrase - importphraseid Completed
subscription - importsubscriptionid Completed
subscriptionlog - importsubscriptionlogid Completed

There seems to have been a problem with the database.


ImpEx Database errormysql error: Invalid SQL: SHOW TABLES
mysql error: No Database Selected
mysql error number: 1046
Date: Monday 28th 2008f April 2008 10:33:46 PM
Database: source
MySQL error: No Database Selected





this is my new include/config.php file i configuration


<?php
/*================================================= =====================*\
|| ################################################## ################## ||
|| # vBulletin 3.6.9 - Licence Number VBFEB2DB01
|| # ---------------------------------------------------------------- # ||
|| # All PHP code in this file is ©2000-2008 Jelsoft Enterprises Ltd. # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com (http://www.vbulletin.com/link.php?u=http%3A%2F%2Fwww.vbulletin.com) | http://www.vbulletin.com/license.html (http://www.vbulletin.com/link.php?u=http%3A%2F%2Fwww.vbulletin.com%2Flicens e.html) # ||
|| ################################################## ################## ||
\*================================================ ======================*/

/*-------------------------------------------------------*\
| ****** NOTE REGARDING THE VARIABLES IN THIS FILE ****** |
+---------------------------------------------------------+
| If you get any errors while attempting to connect to |
| MySQL, you will need to email your webhost because we |
| cannot tell you the correct values for the variables |
| in this file. |
\*-------------------------------------------------------*/

// ****** DATABASE TYPE ******
// This is the type of the database server on which your vBulletin database will be located.
// Valid options are mysql and mysqli, for slave support add _slave. Try to use mysqli if you are using PHP 5 and MySQL 4.1+
// for slave options just append _slave to your preferred database type.
$config['Database']['dbtype'] = 'mysql';

// ****** DATABASE NAME ******
// This is the name of the database where your vBulletin will be located.
// This must be created by your webhost.
$config['Database']['dbname'] = 'my-new-db-name';

// ****** TABLE PREFIX ******
// Prefix that your vBulletin tables have in the database.
$config['Database']['tableprefix'] = '';

// ****** TECHNICAL EMAIL ADDRESS ******
// If any database errors occur, they will be emailed to the address specified here.
// Leave this blank to not send any emails when there is a database error.
$config['Database']['technicalemail'] = 'admin@akotel.co.il';

// ****** FORCE EMPTY SQL MODE ******
// New versions of MySQL (4.1+) have introduced some behaviors that are
// incompatible with vBulletin. Setting this value to "true" disables those
// behaviors. You only need to modify this value if vBulletin recommends it.
$config['Database']['force_sql_mode'] = false;



// ****** MASTER DATABASE SERVER NAME AND PORT ******
// This is the hostname or IP address and port of the database server.
// If you are unsure of what to put here, leave the default values.
$config['MasterServer']['servername'] = 'localhost';
$config['MasterServer']['port'] = 3306;

// ****** MASTER DATABASE USERNAME & PASSWORD ******
// This is the username and password you use to access MySQL.
// These must be obtained through your webhost.
$config['MasterServer']['username'] = 'my-new-db-name';
$config['MasterServer']['password'] = 'my-new-db-password';

// ****** MASTER DATABASE PERSISTENT CONNECTIONS ******
// This option allows you to turn persistent connections to MySQL on or off.
// The difference in performance is negligible for all but the largest boards.
// If you are unsure what this should be, leave it off. (0 = off; 1 = on)
$config['MasterServer']['usepconnect'] = 0;



// ****** SLAVE DATABASE CONFIGURATION ******
// If you have multiple database backends, this is the information for your slave
// server. If you are not 100% sure you need to fill in this information,
// do not change any of the values here.
$config['SlaveServer']['servername'] = '';
$config['SlaveServer']['port'] = 3306;
$config['SlaveServer']['username'] = '';
$config['SlaveServer']['password'] = '';
$config['SlaveServer']['usepconnect'] = 0;



// ****** PATH TO ADMIN & MODERATOR CONTROL PANELS ******
// This setting allows you to change the name of the folders that the admin and
// moderator control panels reside in. You may wish to do this for security purposes.
// Please note that if you change the name of the directory here, you will still need
// to manually change the name of the directory on the server.
$config['Misc']['admincpdir'] = 'admincp';
$config['Misc']['modcpdir'] = 'modcp';

// Prefix that all vBulletin cookies will have
// Keep this short and only use numbers and letters, i.e. 1-9 and a-Z
$config['Misc']['cookieprefix'] = 'bb';

// ******** FULL PATH TO FORUMS DIRECTORY ******
// On a few systems it may be necessary to input the full path to your forums directory
// for vBulletin to function normally. You can ignore this setting unless vBulletin
// tells you to fill this in. Do not include a trailing slash!
// Example Unix:
// $config['Misc']['forumpath'] = '/home/users/public_html/akotelforums';
// Example Win32:
// $config['Misc']['forumpath'] = 'c:\program files\apache group\apache\htdocs\vb3';
$config['Misc']['forumpath'] = '';



// ****** USERS WITH ADMIN LOG VIEWING PERMISSIONS ******
// The users specified here will be allowed to view the admin log in the control panel.
// Users must be specified by *ID number* here. To obtain a user's ID number,
// view their profile via the control panel. If this is a new installation, leave
// the first user created will have a user ID of 1. Seperate each userid with a comma.
$config['SpecialUsers']['canviewadminlog'] = '1';

// ****** USERS WITH ADMIN LOG PRUNING PERMISSIONS ******
// The users specified here will be allowed to remove ("prune") entries from the admin
// log. See the above entry for more information on the format.
$config['SpecialUsers']['canpruneadminlog'] = '1';

// ****** USERS WITH QUERY RUNNING PERMISSIONS ******
// The users specified here will be allowed to run queries from the control panel.
// See the above entries for more information on the format.
// Please note that the ability to run queries is quite powerful. You may wish
// to remove all user IDs from this list for security reasons.
$config['SpecialUsers']['canrunqueries'] = '';

// ****** UNDELETABLE / UNALTERABLE USERS ******
// The users specified here will not be deletable or alterable from the control panel by any users.
// To specify more than one user, separate userids with commas.
$config['SpecialUsers']['undeletableusers'] = '';

// ****** SUPER ADMINISTRATORS ******
// The users specified below will have permission to access the administrator permissions
// page, which controls the permissions of other administrators
$config['SpecialUsers']['superadministrators'] = '1';

// ****** DATASTORE CACHE CONFIGURATION *****
// Here you can configure different methods for caching datastore items.
// vB_Datastore_Filecache - for using a cache file
// $config['Datastore']['class'] = 'vB_Datastore_Filecache';
// vB_Datastore_Memcached - for using a Memcache server
// It is also necessary to specify the hostname or IP address and the port the server is listening on
/*
$config['Datastore']['class'] = 'vB_Datastore_Memcached';
$i = 0;
// First Server
$i++;
$config['Misc']['memcacheserver'][$i] = '127.0.0.1';
$config['Misc']['memcacheport'][$i] = 11211;
$config['Misc']['memcachepersistent'][$i] = true;
$config['Misc']['memcacheweight'][$i] = 1;
$config['Misc']['memcachetimeout'][$i] = 1;
$config['Misc']['memcacheretry_interval'][$i] = 15;
*/
// ****** The following options are only needed in special cases ******

// ****** MySQLI OPTIONS *****
// When using MySQL 4.1+, MySQLi should be used to connect to the database.
// If you need to set the default connection charset because your database
// is using a charset other than latin1, you can set the charset here.
// If you don't set the charset to be the same as your database, you
// may receive collation errors. Ignore this setting unless you
// are sure you need to use it.
// $config['Mysqli']['charset'] = 'utf8';

// Optionally, PHP can be instructed to set connection parameters by reading from the
// file named in 'ini_file'. Please use a full path to the file.
// Example:
// $config['Mysqli']['ini_file'] = 'c:\program files\MySQL\MySQL Server 4.1\my.ini';
$config['Mysqli']['ini_file'] = '';

// Image Processing Options
// Images that exceed either dimension below will not be resized by vBulletin. If you need to resize larger images, alter these settings.
$config['Misc']['maxwidth'] = 2592;
$config['Misc']['maxheight'] = 1944;

/*================================================= =====================*\
|| ################################################## ##################
|| # Downloaded: 04:42, Wed Apr 23rd 2008
|| # CVS: $RCSfile$ - $Revision: 16259 $
|| ################################################## ##################
\*================================================ ======================*/



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




and this is the ImpExConfig.php file after i configuret


<?php
if (!defined('IDIR')) { die; }

################################################## ################## |;
# vBulletin - Licence Number VBFEB2DB01
# ---------------------------------------------------------------- # |;
# Copyright ©2000–2008 Jelsoft Enterprises Ltd. All Rights Reserved. |;
# This file may not be redistributed in whole or significant part. # |;
# ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # |;
# http://www.vbulletin.com (http://www.vbulletin.com/link.php?u=http%3A%2F%2Fwww.vbulletin.com) | http://www.vbulletin.com/license.html (http://www.vbulletin.com/link.php?u=http%3A%2F%2Fwww.vbulletin.com%2Flicens e.html) # |;
################################################## ################## |;

# The following settings allow ImpEx to connect to the vBulletin 3
# database into which you will be importing data.

####
#
# TARGET - The target is the vBulletin database (where the data is going to)
#
####

$impexconfig['target']['server'] = 'localhost';
$impexconfig['target']['user'] = 'my-new-db-name;
$impexconfig['target']['password'] = 'my-new-db-password';
$impexconfig['target']['database'] = 'vbulletin_forum';
$impexconfig['target']['tableprefix'] = '';

# If the system that is being imported from uses a database,
# enter the details for it here and set 'sourceexists' to true.
# If the source data is NOT stored in a database, set 'sourceexists' to false

$impexconfig['sourceexists'] = true;

####
#
# SOURCE - The source is the old forum database (where the data is coming from)
#
####

# mysql / mssql
$impexconfig['source']['databasetype'] = 'mysql'; // mysql OR mssql
$impexconfig['source']['server'] = 'localhost';
$impexconfig['source']['user'] = 'my-old-db-name';
$impexconfig['source']['password'] = 'my-old-db-password';
$impexconfig['source']['database'] = 'source';
$impexconfig['source']['tableprefix'] = '';

####
#
# DUPLICATE CHECKING
# Where unique import id's are aviable ImpEx can check for duplicates with some
# Tier2 systems this will need to be set to false.
#
# yahoo_groups, YaBB 2.1, Ikonboard 3.1.5 (for attachments)
#
####

define('dupe_checking', true);

################################################## #############################
####
#
# ADVANCED - For a standard import or a novice user leave the settings below.
#
####

// Advanced Target
$impexconfig['target']['databasetype'] = 'mysql'; // currently mysql only
$impexconfig['target']['charset'] = '';
$impexconfig['target']['persistent'] = false; // (true/false) use mysql_pconnect

// Advanced Source
$impexconfig['source']['charset'] = '';
$impexconfig['source']['persistent'] = false;

# pagespeed is the second(s) wait before the page refreshes.

$impexconfig['system']['language'] = '/impex_language.php';
$impexconfig['system']['pagespeed'] = 1;

define('impexdebug', false);
define('emailcasesensitive', false);
define('forcesqlmode', false);
define('skipparentids', false);
define('shortoutput', false);
define('do_mysql_fetch_assoc', false);
define('step_through', false);
define('lowercase_table_names', false);
define('use_utf8_encode', false);
?>

Jerry
Mon 28th Apr '08, 5:32pm
That means the permissions to access that database are either wrong or miss configured.

avitor
Mon 28th Apr '08, 5:52pm
the password and db name are ok-what more can be wrong?

Jerry
Mon 28th Apr '08, 5:54pm
the password and db name are ok-what more can be wrong?

All the usernames and passwords are the same, and all the software and databases are all on the same server ? and the user and pass being used has the permissions to access all the databases ?

avitor
Mon 28th Apr '08, 6:07pm
i know what is my db user name and passwords
i writ for test wrong password and gote this --Connection to source server failed. Check username and password.

and same try whet wrong user name and gote this -- Connection to source server failed. Check username and password.

this not mean the user and passwords are right ?
thanks for help

Jerry
Mon 28th Apr '08, 6:14pm
this not mean the user and passwords are right ?
thanks for help

One means that a user can connect to the database server, the error on SHOW TABLES typically means that the user has no permissions on that specifit database.

Connecting to a database server and having permissions for a specific database are two different things.

If possiable and there aren't any table name clashes, copy all the tables to the same database that vBulletin is running on and you know which works.

Then use the same database/user/pass for the target as well as the source.