News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

E107 converter problems

Started by S25, November 11, 2005, 08:15:00 PM

Previous topic - Next topic

S25

Hi folks im trying to convert over from e107 i did the following
1.Moved selected e107 tables into my smf db
2.Ran converter and.........

SQL query:

/******************************************************************************/ ---~ name : "e107"/******************************************************************************/ ---~ version : "SMF 1.1 RC1+" ---~ settings : "/e107_config.php" ---~ from_prefix : "`$mySQLdefaultdb`.$mySQLprefix" ---~ table_test : "{$from_prefix}user"/******************************************************************************/ - -- Converting ranks...
/******************************************************************************/ DELETE FROM {$to_prefix}membergroups WHERE groupName LIKE 'e107%'

MySQL said: Documentation
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '---~ name: "e107"
/*******************************************


so i removed ---~

And then i get this
SQL query:

/******************************************************************************/name : "e107"/******************************************************************************/version : "SMF 1.1 RC1+"settings : "/e107_config.php"from_prefix : "`$mySQLdefaultdb`.$mySQLprefix"table_test : "{$from_prefix}user"/******************************************************************************/ - -- Converting ranks...
/******************************************************************************/ DELETE FROM {$to_prefix}membergroups WHERE groupName LIKE 'e107%'

MySQL said: Documentation
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'name: "e107"
/************************************************

So i removed the name part at the top of e107

And i get this
SQL query:

/******************************************************************************/version : "SMF 1.1 RC1+"settings : "/e107_config.php"from_prefix : "`$mySQLdefaultdb`.$mySQLprefix"table_test : "a0tu_smfuser"/******************************************************************************/ - -- Converting ranks...
/******************************************************************************/ DELETE FROM {$to_prefix}membergroups WHERE groupName LIKE 'e107%'

MySQL said: Documentation
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'version: "SMF 1.1 RC1+"
settings: "/e107_config.php"
from_p


So i remove /******************************************************************************/
version: "SMF 1.1 RC1+"
settings: "/e107_config.php"
from_prefix: "`$mySQLdefaultdb`.$mySQLprefix"
table_test: "a0tu_smfuser"


And i get
SQL query:

/******************************************************************************/ - -- Converting ranks...
/******************************************************************************/ DELETE FROM {$to_prefix}membergroups WHERE groupName LIKE 'e107%'

MySQL said: Documentation
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '--- Converting ranks...
/*************************************


So i reckon ill run it in segments removing all those things

So i run
DELETE FROM {$to_prefix}membergroups
WHERE groupName LIKE 'e107%';

---{
$request = mysql_query("
SELECT e107_value
FROM {$from_prefix}core
WHERE e107_name = 'pref'
LIMIT 1");
list($prefs) = mysql_fetch_row($request);
mysql_free_result($request);

$prefs = @unserialize(strtr($prefs, array("\n" => ' ', "\r" => ' ')));

if (isset($prefs['forum_levels']) && isset($prefs['forum_thresholds']))
{
$inserts = '';
$post_count = explode(',', $prefs['forum_thresholds']);
foreach (explode(',', $prefs['forum_levels']) as $k => $groupname)
if ($groupname !== '')
$inserts .= "
('e107 " . addslashes($groupname) . "', $prefs[forum_thresholds])";

if (!empty($inserts))
mysql_query("
INSERT INTO {$to_prefix}membergroups
(groupName, minPosts)
VALUES " . substr($inserts, 0, -1));
}
---}

And get
SQL query:

DELETE FROM {$to_prefix}membergroups WHERE groupName LIKE 'e107%'

MySQL said: Documentation
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '{$to_prefix}membergroups
WHERE groupName LIKE 'e107%'' at line


So im feeling lost any help or hints on what to do?

Compuart

Did you use the convert.php script?
Hendrik Jan Visser
Former Lead Developer & Co-founder www.simplemachines.org
Personal Signature:
Realitynet.nl -> ExpeditieRobinson.net / PekingExpress.org / WieIsDeMol.Com

S25

No in the converters and import thread i downloaded  e107_to_smf.sql
Where is the .php file?  :o

Compuart

Hendrik Jan Visser
Former Lead Developer & Co-founder www.simplemachines.org
Personal Signature:
Realitynet.nl -> ExpeditieRobinson.net / PekingExpress.org / WieIsDeMol.Com

S25

Ok well the main reason i am doing this is that i was recently hacked and all my files were cleared out but I had backups of my database and what im wondering is that is there a way fo getting around the script so it doesnt look for e107 config files?

Oldiesmann

Just create a "fake" e107 config file with the appropriate details and stick it in the same directory. That will allow the converter to work properly without having to reinstall e107
Michael Eshom
Christian Metal Fans

Compuart

Something like this should be sufficient:
<?php
$mySQLserver 
"localhost";
$mySQLuser "my_db_user_name";
$mySQLpassword "my_db_password";
$mySQLdefaultdb "my_db_name";
$mySQLprefix "e107_";
?>


With the data to access your own server of source. The config file name is e107_config.php
Hendrik Jan Visser
Former Lead Developer & Co-founder www.simplemachines.org
Personal Signature:
Realitynet.nl -> ExpeditieRobinson.net / PekingExpress.org / WieIsDeMol.Com

S25

I made a file called e107_config.php and it contained what you said to put in (all fields edit obviosly) and i keep getting this error
Sorry, the database connection information used in the specified installation of SMF cannot access the installation of e107. 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: No Database Selected

But i have my database selected in the e107_config file.
All my info is correct i have checked it again and again

<?php
$mySQLserver 
"localhost";
$mySQLuser "a0tu_smf1";
$mySQLpassword "-";
$mySQLdefaultdb "a0tu_e107";
$mySQLprefix "e107_";
?>
That is my e107_config.php file

Compuart

The table prefix of the e107 tables is also 'e107_'?
Hendrik Jan Visser
Former Lead Developer & Co-founder www.simplemachines.org
Personal Signature:
Realitynet.nl -> ExpeditieRobinson.net / PekingExpress.org / WieIsDeMol.Com

S25

How do you mean my mySQL prefix is like e107_users you know ?

Compuart

Hmm, odd. Since it said 'No Database Selected', might point to a database name not being right ($mySQLdefaultdb), though I'm not sure.
Hendrik Jan Visser
Former Lead Developer & Co-founder www.simplemachines.org
Personal Signature:
Realitynet.nl -> ExpeditieRobinson.net / PekingExpress.org / WieIsDeMol.Com

S25

I went and got the e107 manual install file and am still getting the same error  :'(

Has anyone used this sucessfully?

S25

Progress  ;D sort of i ran teh converter and got this
Converting ranks...Converting groups... Successful.
Converting members... Unsuccessful!
This query:

    SELECT
    u.user_id AS ID_MEMBER, u.user_name AS memberName,
    u.user_join AS dateRegistered, u.user_forums AS posts,
    IF (u.user_admin = 1, 1, 0) AS ID_GROUP, u.user_lastvisit AS lastLogin,
    u.user_name AS realName, u.user_password AS passwd,
    u.user_email AS emailAddress, 0 AS gender, u.user_birthday AS birthdate,
    REPLACE(u.user_homepage, 'http://', '') AS websiteTitle,
    u.user_homepage AS websiteUrl, u.user_location AS location,
    u.user_icq AS ICQ, u.user_aim AS AIM, u.user_msn AS MSN,
    u.user_hideemail AS hideEmail, u.user_signature AS signature,
    IF(SUBSTRING(u.user_timezone, 1, 1) = '+', SUBSTRING(u.user_timezone, 2), u.user_timezone) AS timeOffset,
    u.user_image AS avatar, u.user_customtitle as usertitle,
    u.user_ip AS memberIP
    FROM `a0tu_e107`.e107_user AS u
    WHERE u.user_id > 0
    LIMIT 0, 500;

Caused the error:

    Unknown column 'u.user_birthday' in 'field list'

Ran a search on Unknown column 'u.user_birthday' in 'field list and got nothing.Any ideas?

S25

#13
Well i finaly got it to work well the script anywyas but kept getting errors on certain lines so i did several things i realsied that maybe it will only work on 1.1 so i installed a new version of smf (1.1) as i was on 1.05 then i proceded to delete any lines that caused errors but alas that only caused more and im still not passed thememebrs converting (theere not in yet either)Is there a way i can do it manualy?

I am now gonna try and enter the queries by hand in phpmyADMIN.

S25

Ok the phpmyADMIN idea did not work but this does not seem to be working for me :*(  i see to have way different tables :S i think my version of e107 was .7 but i am not sure as it was not i who installed it.Any ideas folks?All help is appreciated?Is it possible i dont even need peoples sigs and thign to come over just posts threads catsagories usernames and passwords.

Advertisement: