News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Having a problem upgrading from 1.1.18 to 2.0.5

Started by Morning, August 31, 2013, 11:17:53 AM

Previous topic - Next topic

Morning

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:
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


Morning


margarett

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

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

Morning

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.

margarett

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

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

Kindred

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?
Сл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."

Morning

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. :?

Arantor

You could even use repair_settings.php to update the URLs before running the updater...

Morning

Yes. I am working from a backup. And it is working -- I was able to:

QuoteWorking 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.

Morning

Ah  ;D replies coming over replies!

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

Morning

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.

Arantor

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)

Morning

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.

Arantor

No, it's a general maintenance tool, but some things only apply in 2.0.

Morning

'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)?

margarett

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

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

Morning

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:

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.

Arantor

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.

Morning

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

Morning

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!

Advertisement: