Advertisement:

Author Topic: Having a problem upgrading from 1.1.18 to 2.0.5  (Read 4600 times)

Offline Morning

  • Semi-Newbie
  • *
  • Posts: 58
  • Gender: Male
Having a problem upgrading from 1.1.18 to 2.0.5
« on: August 31, 2013, 11:17:53 AM »
Hi. I have an old forum with an intergrated joomla 1.0.X and SMF 1.1.18.

I want to do two things:
1. remove the integration/bridge and continue with 2.0.5 forums in wrapped mode
2. once that is working go through the headache of updating the joomla to something else

I have moved the whole integrated site to a test server, and I have moved only the forums - both proceed easily.

Working from 'forums' only (no joomla tables in database) I can access everything, and have removed all modules to make the remainder as clean as possible.

downloaded the smf_2-0-5_upgrade.tar.bz2 file, and unpacked in the forums area, go to http:/..../forums/upgrade.php. The upgrade script says all is well, I enter password (also tried editing upgrade.php so that password was not needed) - and all I get is errors.

At the moment I am tired of seeing this:
Code: [Select]
Thank you for choosing to upgrade to SMF 2.0.5. All files appear to be in place, and we're ready to proceed.
!!
Warning!
"Michael" has been running the upgrade script for the last 19 hours - and was last active 17 minutes ago.

You can choose to either run the upgrade again from the beginning - or alternatively continue from the last step reached during the last upgrade.

And as I want this to be repeatable (I am working from a backup and want the process verified before I put the live system into maintenance mode - what I shall actually do is just copy the new forums directory and point it at the new database).

I am wondering if part of the problem is that during the update it says it is going to the live site (browser bottom left says contacting "live URL").

So, I conclude that there are references in the database that the upgrade is looking at - where, and I will work on some scripts to manually update the SQL backup before 'installing it' and/or running SQL updates to it afterwards (depending on complexity).

Q1: where is update finding the reference to 'live' URL? Not from Settings.php is all I am certain of.
Q2: as I am trying to repeat this process - deleting the forums and restoring the files and database is not enough the reset the 'update timer'. This is not a cookie (I conclude) because the timer value is independent of the system used to manage the update. And it is not in the database (I hope) because I think I am working from a clean backup (if the value is kept in the database I make a new starting point from the live site).
Q3: can the upgrade be done from the command line rather than via a browser. Maybe that way I can get better error messages and understand what needs to be 'corrected'.

Thanks for reading all this. I hope it is clear enough. Looking forward to suggestions!

Michael

« Last Edit: September 01, 2013, 11:36:56 AM by Morning »

Offline Morning

  • Semi-Newbie
  • *
  • Posts: 58
  • Gender: Male
Re: Having a problem upgrading from 1.1.18 to 2.0.5
« Reply #1 on: September 01, 2013, 06:00:45 AM »
still looking forward to assistance :)

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: Having a problem upgrading from 1.1.18 to 2.0.5
« Reply #2 on: September 01, 2013, 08:10:53 AM »
Can you try to do the upgrade in your local machine using xampp, wamp, etc?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

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

Offline Morning

  • Semi-Newbie
  • *
  • Posts: 58
  • Gender: Male
Re: Having a problem upgrading from 1.1.18 to 2.0.5
« Reply #3 on: September 01, 2013, 09:27:47 AM »
This (the test) is a local machine, ubuntu, etc. etc. While the live system is AIX. And just in case it was an issue with different mysql versions (5.1 live, versus 5.5 test) I now have it connecting to the same mysql server over the net, but different database. As "extracted" forums, everything is working - only the upgrade is not working.

The biggest difference is the url change - from www.domain.net to felt-1.domain.net (i.e., felt-1 is test and www is live)

Thanks for asking.

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: Having a problem upgrading from 1.1.18 to 2.0.5
« Reply #4 on: September 01, 2013, 09:45:52 AM »
Hummm. I'm not sure if you are supposed to do it under a different domain (even if that it is a subdomain).
I would try to do it under a different subfolder. If it is successful, than you can move it to your subdomain using repair_settings.php

But I'm just guessing, sorry :(
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

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

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,339
  • Gender: Male
    • Kindred-999 on GitHub
Re: Having a problem upgrading from 1.1.18 to 2.0.5
« Reply #5 on: September 01, 2013, 10:05:42 AM »
you say that you are working form a backup...


Did you confirm that the backup was fully working - e.g. running on the local install - BEFORE you attempted the upgrade?
In other words...   Did you just dump your "backup" into a directory and expect the upgrade to work or did you configure and confirm that your backup worked in the backup location before running upgrade?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Morning

  • Semi-Newbie
  • *
  • Posts: 58
  • Gender: Male
Re: Having a problem upgrading from 1.1.18 to 2.0.5
« Reply #6 on: September 01, 2013, 10:09:33 AM »
I fear you may be correct - and so this is a workup to a feature request - "offline", or "offsite" updater. 1) I do not want to take the old version offline while I test. I amy not have that many users, just a lot of history - but someone with a forum that is "busy enough", say 1+ new posts per minute - is "hurt" with a long downtime for testing only.

At the moment: I am rather unhappy that the update process is looking "somewhere" in the database for the original URL. This implies I cannot develop something on a test domain, and then move it all - including test users - to a new domain, because "somewhere" there is still a reference to the initial domain.

If someone can tell me "where" that is, I can modify the database to look at the test domain (and the feature for upgrade/update - look at the HOST of the request and compare to hostname in database, and update that as well.

thinking aloud: have I missed a sentence about instructions about moving a forum to a new URL. Id so, I should probably do that first, then start the upgrade. :?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,254
    • StoryBB/StoryBB on GitHub
Re: Having a problem upgrading from 1.1.18 to 2.0.5
« Reply #7 on: September 01, 2013, 10:11:25 AM »
You could even use repair_settings.php to update the URLs before running the updater...
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Morning

  • Semi-Newbie
  • *
  • Posts: 58
  • Gender: Male
Re: Having a problem upgrading from 1.1.18 to 2.0.5
« Reply #8 on: September 01, 2013, 10:17:15 AM »
Yes. I am working from a backup. And it is working -- I was able to:

Quote
Working from 'forums' only (no joomla tables in database) I can access everything, and have removed all modules to make the remainder as clean as possible.

My apologies that I was not clear enough to say that these modifications were made to the test/verification copies.

Basically, I have copied the directory structure to a new server, and restored the database on two different mysql servers (localhost mysql 5.5, not localhost 5.1 (same as live)).

The PHP versions are different on the two servers (live is 5.2.13, test is 5.2.17)

Again, I am keeping them seperate as I do not want to modify my live service until I know the updated one will work - I also need to install new (version 2.X versions) of several mods. I am not going to assume that the old mods work. So, that is why I have uninstalled the mods/packages and do the upgrade. I hoped that would simplify the upgrade.

Thanks.

Offline Morning

  • Semi-Newbie
  • *
  • Posts: 58
  • Gender: Male
Re: Having a problem upgrading from 1.1.18 to 2.0.5
« Reply #9 on: September 01, 2013, 10:18:17 AM »
Ah  ;D replies coming over replies!

Thanks for the suggestion to repair_settings. Will do, and I'll be back.

Offline Morning

  • Semi-Newbie
  • *
  • Posts: 58
  • Gender: Male
Re: Having a problem upgrading from 1.1.18 to 2.0.5
« Reply #10 on: September 01, 2013, 10:21:12 AM »
is repair_settings.php in the upgrade package? I do not see it directly. Will google as well, but want to make sure I am not missing something extremely obvious.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,254
    • StoryBB/StoryBB on GitHub
Re: Having a problem upgrading from 1.1.18 to 2.0.5
« Reply #11 on: September 01, 2013, 10:21:42 AM »
No, it's in the downloads area on this site. Because it has the power to modify Settings.php, it is not shipped by default (because it would be a security risk)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Morning

  • Semi-Newbie
  • *
  • Posts: 58
  • Gender: Male
Re: Having a problem upgrading from 1.1.18 to 2.0.5
« Reply #12 on: September 01, 2013, 10:24:33 AM »
Thanks. Also found it.

Verification: on http://wiki.simplemachines.org/smf/Repair_settings.php it seems to say it is for 2.0.X only, and the forums - before upgrade are still 1.1.18.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,254
    • StoryBB/StoryBB on GitHub
Re: Having a problem upgrading from 1.1.18 to 2.0.5
« Reply #13 on: September 01, 2013, 10:25:33 AM »
No, it's a general maintenance tool, but some things only apply in 2.0.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Morning

  • Semi-Newbie
  • *
  • Posts: 58
  • Gender: Male
Re: Having a problem upgrading from 1.1.18 to 2.0.5
« Reply #14 on: September 01, 2013, 10:29:09 AM »
Code: [Select]
'database_settings' => array(
'db_server' => array('flat', 'string', 'localhost'),
'db_name' => array('flat', 'string'),
'db_user' => array($db_type == 'sqlite' ? 'hidden' : 'flat', 'string'),
'db_passwd' => array($db_type == 'sqlite' ? 'hidden' : 'flat', 'string'),
'ssi_db_user' => array($db_type == 'sqlite' ? 'hidden' : 'flat', 'string'),
'ssi_db_passwd' => array($db_type == 'sqlite' ? 'hidden' : 'flat', 'string'),
'db_prefix' => array('flat', 'string'),
'db_persist' => array('flat', 'int', 1),
),

Do I need to change localhost to my server (no longer localhost)?

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: Having a problem upgrading from 1.1.18 to 2.0.5
« Reply #15 on: September 01, 2013, 10:32:44 AM »
Usually the server is localhost (because it's the same server where the page is being loaded).
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

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

Offline Morning

  • Semi-Newbie
  • *
  • Posts: 58
  • Gender: Male
Re: Having a problem upgrading from 1.1.18 to 2.0.5
« Reply #16 on: September 01, 2013, 10:37:45 AM »
Usually I have that too.

Anyway, all the settings it shows are how it is already configured in Settings.php.

It suggests localhost - but has the correct IP address;

further suggests SMPCookie771 rather the SMFCookie283 value I have now.

And two errors:
Code: [Select]

Notice: Undefined index: database_error in /var/httpd/htdocs/forums/Sources/Subs-Db-mysql.php on line 572

Fatal error: Call to undefined function allowedTo() in /var/httpd/htdocs/forums/Sources/Subs-Db-mysql.php on line 573

Suggestions. - Or will the repair make the missing index?

allowedTo() is that a php 5.3.X function?

Update: And I am missing the "OK"/Apply action/button.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,254
    • StoryBB/StoryBB on GitHub
Re: Having a problem upgrading from 1.1.18 to 2.0.5
« Reply #17 on: September 01, 2013, 10:44:57 AM »
allowedTo() is an internal SMF function. The name of cookie is fine (it's based in part on the URL) but more curiously is that database error, I don't know why there's a DB error.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Morning

  • Semi-Newbie
  • *
  • Posts: 58
  • Gender: Male
Re: Having a problem upgrading from 1.1.18 to 2.0.5
« Reply #18 on: September 01, 2013, 11:02:25 AM »
Not a lot wiser from:
<?php
  2
  3 /**
  4  * Simple Machines Forum (SMF)
  5  *
  6  * @package SMF
  7  * @author Simple Machines http://www.simplemachines.org
  8  * @copyright 2011 Simple Machines
  9  * @license http://www.simplemachines.org/about/smf/license.php BSD
 10  *
 11  * @version 2.0.4
 12  */

<?php
  2
  3 /**
  4  * Simple Machines Forum (SMF)
  5  *
  6  * @package SMF
  7  * @author Simple Machines http://www.simplemachines.org
  8  * @copyright 2011 Simple Machines
  9  * @license http://www.simplemachines.org/about/smf/license.php BSD
 10  *
 11  * @version 2.0.4
 12  */
...
571         // Show an error message, if possible.
572         $context['error_title'] = $txt['database_error'];
573         if (allowedTo('admin_forum'))
574                 $context['error_message'] = nl2br($query_error) . '<br />' . $txt['file'] . ': ' . $file . '<br />' . $txt['line'] . ': ' . $line;
575         else
576                 $context['error_message'] = $txt['try_again'];
577

Since it is 2.0.4 as version I am assuming it is coming from the upgrade package.

Checking my original site, I do not even see this file, so... will go back to original test files/database and try repair_settings.php

Offline Morning

  • Semi-Newbie
  • *
  • Posts: 58
  • Gender: Male
Re: Having a problem upgrading from 1.1.18 to 2.0.5
« Reply #19 on: September 01, 2013, 11:09:24 AM »
Going back to files/database with no knowledge of upgrade and repair_settings loads.

Found: themes (used to that) and avatars and smiley references to original site.

I have found these three before in previous moves - just did not recall them all. Will try the upgrade again shortly!