News:

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

Main Menu

1.1.11 to 2.0.11 help

Started by Skumbe, April 19, 2016, 03:59:01 PM

Previous topic - Next topic

Skumbe

Hello SMF,

Our hunting club has its own forum that has been running by itself for almost a decade without any updates or anything. Now the web hotel service provider did some updates and all of a sudden our old forum got all screw'd up (no surprises there). As i'm pretty much only one in club with some knowledge of internets, I ended up with the job of fixing it.

So, the old forum gives all bunch of deprecated errors in pretty much anything you try to do;
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/oulunseu/public_html/forum/Sources/Load.php(225) : runtime-created function on line 3

After doing some studying found out that the villain is most likely new PHP version (server running 5.5.34).
SO, I made copies from everything and started trying out different ways of upgrading the forum, in each case I removed (for best of my knowledge) all of the the language files etc. packs before running upgrade. These are the ways I tried:
-Upgrade current 1.1.11 -> 1.1.x = Deprecated errors.
-Tried to do a fresh install of 1.1.x = Deprecated errors.
-Fresh Install of 2.0.11 , load old 1.1.11 SQL DB, not running install.php but instead editing settings.php by hand and running repair_settings.php = SQL errors (no surprise there)
-Upgrade 1.1.11 -> 2.0.11 with upgrade.php. Seems best option to me as I get no depricated errors, but the upgrade.php runs all messed for me (screenshot below)

Fresh Install of 2.0.11 works just fine, just can't figure out any way of bringing messages, users etc into it.

Any ideas?

edit; here are the rest of web hotel info in case you need it:
Apache Version: 2.2.31
PHP Version :5.5.34
MySQL Version: 5.5.47-cll
Perl Version: 5.8.8
cPanel Version: 11.52.4 (build 0)

Kindred

You HAVE to run upgrade.php you can not run a 2.0.x forum with. 1.1.x database.

Best option...   Upgrade to 1.1.21
Ignore the deprecated errors and complete that upgrade
Then upgrade to 2.0.11
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

margarett

When you say
QuoteI made copies from everything and started trying out different ways of upgrading the forum
That causes your weird upgrade page. Your duplicate copy must be running in order to run the upgrade, which means that you need to fix paths and database connection before.

Check this post for reference:
http://www.simplemachines.org/community/index.php?topic=545016.msg3870090#msg3870090
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Skumbe

#3
Quote from: Kindred on April 19, 2016, 07:01:24 PM
You HAVE to run upgrade.php you can not run a 2.0.x forum with. 1.1.x database.

Best option...   Upgrade to 1.1.21
Ignore the deprecated errors and complete that upgrade
Then upgrade to 2.0.11
Yeah I understand that 1.x DB won't work with 2.x code. Just pointed out that least I tried that as well. I can upgrade the forum to 1.1.21 but after that the 2.x upgrade tool gives the same error as stated in first post. Also my repair_settings.php isn't working properly so I probably should start from there, as explained below:

Quote from: margarett on April 20, 2016, 04:40:18 AM
When you say
QuoteI made copies from everything and started trying out different ways of upgrading the forum
That causes your weird upgrade page. Your duplicate copy must be running in order to run the upgrade, which means that you need to fix paths and database connection before.

Check this post for reference:
http://www.simplemachines.org/community/index.php?topic=545016.msg3870090#msg3870090
I have edited settings.php by hand on copied forum to match the paths and DB / MySQL user on copied database. Also checked that the copied forum works on itself, but I guess that just editing settings.php manually isn't enough then ?

I tried running repair_settings.php on original 1.1.11 forum as well, but instead of "save settings" etc. buttons, it gives me the following error:
Notice: Undefined index: database_error in /home/oulunseu/public_html/forum/Sources/Subs-Db-mysql.php on line 569

Fatal error: Call to undefined function allowedTo() in /home/oulunseu/public_html/forum/Sources/Subs-Db-mysql.php on line 570


edit; the lines in source are as follows:

// Nothing's defined yet... just die with it.
if (empty($context) || empty($txt))
die($query_error);

// Show an error message, if possible.
$context['error_title'] = $txt['database_error'];               <- ROW 569
if (allowedTo('admin_forum'))
$context['error_message'] = nl2br($query_error) . '<br />' . $txt['file'] . ': ' . $file . '<br />' . $txt['line'] . ': ' . $line;
else
$context['error_message'] = $txt['try_again'];

// A database error is often the sign of a database in need of upgrade.  Check forum versions, and if not identical suggest an upgrade... (not for Demo/CVS versions!)
if (allowedTo('admin_forum') && !empty($forum_version) && $forum_version != 'SMF ' . @$modSettings['smfVersion'] && strpos($forum_version, 'Demo') === false && strpos($forum_version, 'CVS') === false)
$context['error_message'] .= '<br /><br />' . sprintf($txt['database_error_versions'], $forum_version, $modSettings['smfVersion']);

if (allowedTo('admin_forum') && isset($db_show_debug) && $db_show_debug === true)
{
$context['error_message'] .= '<br /><br />' . nl2br($db_string);
}

// It's already been logged... don't log it again.
fatal_error($context['error_message'], false);
}

The source looks like it has something to do with DB connections, maybe it doesn't know how to handle todays DB correctly ?

Update
After looking around in SMF forums I noticed the same problem on some case involving DB version to be incompatible with the forum source. Actually now I remember that in some case where I was trying something out the page reported source version to be 1.1.11 and DB  version to be 1.1.9. I'll look into this next

margarett

Not really. If you see
database_error in /home/oulunseu/public_html/forum/Sources/Subs-Db-mysql.php
You already have 2.0.x files in place. repair_settings determines whether which SMF version (files) you are running exactly by having these Subs-Db-xxxx files or not.
If you have them --> 2.0.x files
If you don't have them --> 1.1.x files

So you need to make sure you have the correct files in place ;)

QuoteI have edited settings.php by hand on copied forum to match the paths and DB / MySQL user on copied database. Also checked that the copied forum works on itself, but I guess that just editing settings.php manually isn't enough then ?
It isn't. themes' paths are stored in the database (smf_themes) and that needs to be fixed (that's why your upgrade page is all messed up)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Skumbe

Quote from: margarett on April 20, 2016, 07:32:26 AM
Not really. If you see
database_error in /home/oulunseu/public_html/forum/Sources/Subs-Db-mysql.php
You already have 2.0.x files in place. repair_settings determines whether which SMF version (files) you are running exactly by having these Subs-Db-xxxx files or not.
If you have them --> 2.0.x files
If you don't have them --> 1.1.x files

So you need to make sure you have the correct files in place ;)

Okay... Least I didn't install any 2.x files to original forum so might be that *someone* before me has done that and that is messing up repair_settings. Maybe I should try to do a fresh install of 1.1.11, and try to load the old DB to that with repair_settings ? (I'll look into that)

Quote from: margarett on April 20, 2016, 07:32:26 AM
QuoteI have edited settings.php by hand on copied forum to match the paths and DB / MySQL user on copied database. Also checked that the copied forum works on itself, but I guess that just editing settings.php manually isn't enough then ?
It isn't. themes' paths are stored in the database (smf_themes) and that needs to be fixed (that's why your upgrade page is all messed up)
Fixed those settings on phpmyadmin

Skumbe

UPDATE - SOLVED

Okay, so the problem (apparently?) was that someone before me had tried to install an update to forum without succeeding it. This left behind some 2.x files in Sources/ folder that kept screwing up everything.

What I did was a fresh install of 1.1.21 , used repair_settings.php to load DB including all the messages etc. , double checked & tested everything to be working allright and after that ran the update for 2.0.11. The update went in perfectly.

I want to thank everyone who gave their support on the matter, hopefully this topic will help someone in future as well.

Advertisement: