SMF 2.3.1 Restore Problems (errors in database backup?)

Started by Qahlel, May 13, 2008, 08:20:51 PM

Previous topic - Next topic

Qahlel

Hi to all,

I've been working on this since last week now and I can't find a solution. Here's what happened:

I've firstly installed smf 1.1.4 and upgraded to 2.3.0. Then last week I upgraded the 2.3.0 to 2.3.1. Then I noticed that some of the packages that I installed weren't working anymore, so I decided to backup the smf database from smf (including tables) and all the avatars & attached files. I did the backup and deleted the original database & files. I tried to install 2.3.1 as full install and it was successful. The problem emerged when I tried to restore my backup. I've tried to restore the backup through PHPMYADMIN & restore_backup.php but in both times, I got many errors (below is the error I got from restore_backup.php). I really don't know how to solve this. Any help is highly appreciated.

note:

1) after restoring with restore_backup.php; it said that the restoration was successful and when I opened the site, I received the following error only: "Table 'alpatali_smf.smf_sessions' doesn't exist" and there's nothing else on the page.

2) If it's possible, I rather downgrade the restored forum to smf 1.1.5, if anyone knows anything about this, please do inform me how I can do it also.

3) I tried to fix the forum with "repair_settings.php" yet still I got the same blank page and
"Table 'alpatali_smf.smf_sessions' doesn't exist" error again.


Some of the queries were not executed properly. Technical information about the queries:
Line #242: 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 ''window.smfVersions = {
\'SMF\': \'SMF 2.0 Beta 3.1 Public\',
\'SourcesAdmin.p' at line 8
Line #276: 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 'window.smfLanguageVersions = {
\'Admin\': \'2.0 Beta 3\',
\'EmailTemplates\': ' at line 1
Line #385: 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 '', 'text/javascript'),
(3, 'latest-news.js', '/smf/', 'language=%1$s&format=%2$' at line 1
Line #388: 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 'if (window.smfVersion < \"SMF 1.1\")
{
window.smfUpdateNotice = \'SMF 1.1 Final' at line 1
Line #389: 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 'window.smfUpdateCritical = false' at line 1
Line #394: 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 '}

if (document.getElementById(\"yourVersion\"))
{
var yourVersion = getInnerHT' at line 1
Line #396: 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 'if (yourVersion == \"SMF 1.0.4\")
window.smfUpdatePackage = \"http://custom.si' at line 1
Line #399: 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 'else if (yourVersion == \"SMF 1.0.5\" || yourVersion == \"SMF 1.0.6\")
{
wind' at line 1
Line #400: 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 'window.smfUpdateCritical = false' at line 1
Line #404: 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 '}
else if (yourVersion == \"SMF 1.0.7\")
{
window.smfUpdatePackage = \"http:' at line 1
Line #408: 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 '}
else if (yourVersion == \"SMF 1.0.9\")
{
window.smfUpdatePackage = \"http:' at line 1
Line #412: 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 '}
else if (yourVersion == \"SMF 1.0.11\")
{
window.smfUpdatePackage = \"http' at line 1
Line #413: 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 'window.smfUpdateCritical = true' at line 1
Line #418: 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 '}
else if (yourVersion == \"SMF 1.0.12\")
{
// Changed to zip as per http://' at line 1
Line #422: 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 '}
else if (yourVersion == \"SMF 1.1\")
{
window.smfUpdatePackage = \"http://' at line 1
Line #426: 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 '}
else if (yourVersion == \"SMF 1.1.1\")
{
window.smfUpdatePackage = \"http:' at line 1
Line #430: 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 '}
else if (yourVersion == \"SMF 1.1.3\")
{
window.smfUpdatePackage = \"http:' at line 1
Line #431: 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 'window.smfUpdateCritical = true' at line 1
Line #436: 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 '}
else if (yourVersion == \"SMF 1.1.4\")
{
// Changed to zip as per http://w' at line 1
Line #440: 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 '}
else if (yourVersion == \"SMF 2.0 beta 1\")
{
window.smfUpdatePackage = \"' at line 1
Line #441: 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 'window.smfUpdateCritical = true' at line 1
Line #446: 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 '}
else if (yourVersion == \"SMF 2.0 beta 3 Public\")
{
// Changed to zip as ' at line 1
Line #453: 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 '}
}

if (document.getElementById(\'credits\'))
setInnerHTML(document.getElement' at line 1
Line #455: 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 'if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SMF 1.0' at line 1
Line #457: 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 'else if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SM' at line 1
Line #459: 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 'else if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SM' at line 1
Line #461: 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 'else if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SM' at line 1
Line #463: 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 'else if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SM' at line 1
Line #465: 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 'else if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SM' at line 1
Line #467: 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 'else if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SM' at line 1
Line #469: 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 'else if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SM' at line 1
Line #471: 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 'else if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SM' at line 1
Line #473: 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 'else if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SM' at line 1
Line #475: 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 'else if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SM' at line 1
Line #477: 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 'else if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SM' at line 1
Line #479: 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 'else if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SM' at line 1
Line #481: 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 'else if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SM' at line 1
Line #483: 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 'else if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SM' at line 1
Line #485: 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 'else if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SM' at line 1
Line #487: 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 'else if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SM' at line 1
Line #489: 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 'else if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SM' at line 1
Line #491: 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 'else if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SM' at line 1
Line #493: 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 'else if (typeof(window.smfVersion) != \"undefined\" && window.smfVersion == \"SM' at line 1
Line #495: 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 'else if (typeof(window.smfVersion) == \"undefined\")
window.smfLatestPackages =' at line 1
Line #523: 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 'else
{
var smf_modificationInfo = {

1177: {
name: \'Topic Locked Message 1.0' at line 1
Line #524: 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 'var smf_latestModifications = [1177, 1175, 1170]' at line 1
Line #528: 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 'function smf_packagesMoreInfo(id)
{
window.smfLatestPackages_temp = getOuterHTM' at line 1
Line #536: 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 'setOuterHTML(document.getElementById(\"smfLatestPackagesWindow\"),
\'<div id=\"' at line 1
Line #541: 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 '}

function smf_packagesBack()
{
setOuterHTML(document.getElementById(\"smfLate' at line 1
Line #542: 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 'window.scrollTo(0, findTop(document.getElementById(\"smfLatestPackagesWindow\"))' at line 1
Line #549: 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 '}

window.smfLatestPackages = \'\\
<div id=\"smfLatestPackagesWindow\" class=\"' at line 1
Line #553: 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 'for (var i = 0; i < smf_latestModifications.length; i++)
{
var id_mod = smf_lat' at line 1
Line #555: 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 'window.smfLatestPackages += \'<li><a href=\"javascript:smf_packagesMoreInfo(\' +' at line 1
Line #559: 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 '}

window.smfLatestPackages += \'\\
</ul>\'' at line 1
Line #566: 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 'if (typeof(window.smfVersion) != \"undefined\" && (window.smfVersion < \"SMF 1.0' at line 1
Line #572: 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 'else
window.smfLatestPackages += \'\\
<h3 style=\"margin: 0; padding: 4px;\">' at line 1
Line #575: 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 'window.smfLatestPackages += \'\\
</div>\'' at line 1
Line #581: 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 '}

function findTop(el)
{
if (typeof(el.tagName) == \"undefined\")
return 0' at line 1
Line #583: 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 'var skipMe = in_array(el.tagName.toLowerCase(), el.parentNode ? [\"tr\", \"tbody' at line 1
Line #584: 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 'var coordsParent = el.parentNode ? \"parentNode\" : \"offsetParent\"' at line 1
Line #587: 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 'if (el[coordsParent] == null || typeof(el[coordsParent].offsetTop) == \"undefine' at line 1
Line #589: 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 'else
return (skipMe ? 0 : el.offsetTop) + findTop(el[coordsParent])' at line 1
Line #597: 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 '}

function in_array(item, array)
{
for (var i in array)
{
if (array[i] == i' at line 1
Line #600: 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 '}

return false' at line 1
Line #604: 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 '}
', 'text/javascript'),
(5, 'latest-smileys.js', '/smf/', 'language=%1$s&versi' at line 1
Line #607: 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 'if (document.getElementById(\'credits\'))
setInnerHTML(document.getElementById(' at line 1
Line #610: 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 'if (document.getElementById(\'credits\'))
setInnerHTML(document.getElementById(' at line 1
Line #644: 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 '', 'text/javascript'),
(7, 'latest-themes.js', '/smf/', 'language=%1$s&version=' at line 1
Line #645: 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 'var smf_featured = 600' at line 1
Line #646: 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 'var smf_random = 612' at line 1
Line #647: 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 'var smf_latestThemes = [665, 663, 662]' at line 1
Line #650: 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 'function smf_themesMoreInfo(id)
{
window.smfLatestThemes_temp = getOuterHTML(do' at line 1
Line #660: 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 'setOuterHTML(document.getElementById(\"smfLatestThemesWindow\"),
\'<div id=\"sm' at line 1
Line #665: 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 '}

function smf_themesBack()
{
setOuterHTML(document.getElementById(\"smfLatest' at line 1
Line #666: 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 'window.scrollTo(0, findTop(document.getElementById(\"smfLatestThemesWindow\")) -' at line 1
Line #674: 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 '}

window.smfLatestThemes = \'\\
<div id=\"smfLatestThemesWindow\" class=\"tbor' at line 1
Line #677: 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 'for(var i=0; i < smf_latestThemes.length; i++)
{
var id_theme = smf_latestTheme' at line 1
Line #679: 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 'window.smfLatestThemes += \'\\
<li><a href=\"javascript:smf_themesMoreInfo(\' at line 1
Line #683: 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 '}

window.smfLatestThemes += \'\\
</ul>\'' at line 1
Line #692: 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 'if ( smf_featured !=0 || smf_random != 0 )
{

if ( smf_featured != 0 )
window' at line 1
Line #698: 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 'if ( smf_random != 0 )
window.smfLatestThemes += \'\\
<h4 style=\"padding:' at line 1
Line #702: 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 '}
window.smfLatestThemes += \'\\
</div>\\
</div>\'' at line 1
Line #707: 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 'function findTop(el)
{
if (typeof(el.tagName) == \"undefined\")
return 0' at line 1
Line #709: 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 'var skipMe = in_array(el.tagName.toLowerCase(), el.parentNode ? [\"tr\", \"tbody' at line 1
Line #710: 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 'var coordsParent = el.parentNode ? \"parentNode\" : \"offsetParent\"' at line 1
Line #713: 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 'if (el[coordsParent] == null || typeof(el[coordsParent].offsetTop) == \"undefine' at line 1
Line #715: 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 'else
return (skipMe ? 0 : el.offsetTop) + findTop(el[coordsParent])' at line 1
Line #723: 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 '}

function in_array(item, array)
{
for (var i in array)
{
if (array[i] == i' at line 1
Line #726: 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 '}

return false' at line 1
Line #727: 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 '}', 'text/javascript')' at line 1
Line #767: Invalid default value for 'Poster_ID'
Line #812: Table 'alpatali_smf.smf_attachments' doesn't exist
Line #1926: Invalid default value for 'ID_MEMBER'
Line #1934: Table 'alpatali_smf.smf_downloaded_attachments' doesn't exist
Line #3753: Invalid default value for 'id_member_installed'
Line #3771: Table 'alpatali_smf.smf_log_packages' doesn't exist
Line #3877: Invalid default value for 'id_report'
Line #3891: Invalid default value for 'id_task'
Line #4148: Table 'alpatali_smf.smf_log_scheduled_tasks' doesn't exist
Line #4158: Table 'alpatali_smf.smf_log_scheduled_tasks' doesn't exist
Line #4530: Invalid default value for 'log_time'
Line #7348: Invalid default value for 'id_pm_head'
Line #7364: Table 'alpatali_smf.smf_personal_messages' doesn't exist
Line #7547: Invalid default value for 'next_time'
Line #7563: Table 'alpatali_smf.smf_scheduled_tasks' doesn't exist
Line #7577: Invalid default value for 'last_update'
Line #7644: Table 'alpatali_smf.smf_sessions' doesn't exist
Line #7989: Invalid default value for 'ID_GROUP'

karlbenson

Apologies for the lack of a reply.

Maybe the restore backup didn't work properly.

I use BigDump myself
http://www.ozerov.de/bigdump.php

Qahlel

Thanks for your reply. Yet I just solved the problem. Also my host doesn't allow bigdump :(

Here's what I did:

I firstly went phpmyadmin and tried to upload the file. It gave an error. So I changed value of '' to 0 each time it gave an error. I must have imported the sql file about 30 times over. Then it said it loaded successfully. So I deleted all the DB and the files and reinstalled SMF with new DB and then uploaded the DB again. (I also had changed the site's folder from "smf" to "forum" but I had find&replaced all of them so no problems there) but still the site was looking well faulty. Then I remembered that my backup was from 2.3.1 and I was trying to install 1.1.5 and/or 2.3.0 over and over again. So I installed 2.3.1. Now everything looks fine except UTF8 problem I have in the old posts. The new posts in the forum are fully compatible with UTF8 but the old ones have some funny characters instead of some non-latin characters. thanks for your help anyway. I hope this thread helps someone if needed :)

Advertisement: