Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Kantis on December 25, 2023, 12:50:56 AM

Title: Upgdade script 2.1.4 failing: incorrect string
Post by: Kantis on December 25, 2023, 12:50:56 AM
My site is currently running 2.0.19. When trying to upgrade, the script stops around on 92% (updating smileys) and says "incorrect string".

This site is using Finnish language. I've tried converting the database to UTF-8 but always the same thing.

Any idea how to proceed with this?
Title: Re: Upgdade script 2.1.4 failing: incorrect string
Post by: Steve on December 25, 2023, 07:46:45 AM
Switch to English and try again?
Title: Re: Upgdade script 2.1.4 failing: incorrect string
Post by: Kantis on December 25, 2023, 06:32:46 PM
Quote from: Steve on December 25, 2023, 07:46:45 AMSwitch to English and try again?
Does it really solve this? I think I tried, but no 100% sure. It was such a mess. I tried it couple of times with different settings (ISO, UTF-8, finninsh, english).

It would be also interesting to understand what causes this. The debug message doesn't really tell much. Some database operation just fails in "updating smileys" phase because of some illegal characters.
Title: Re: Upgdade script 2.1.4 failing: incorrect string
Post by: Kindred on December 25, 2023, 07:43:27 PM
We KNOW that the upgrade works in English and frequently has problems with other languages being set.
That's why the upgrade instructions say to reset the default language to English before upgrading
Title: Re: Upgdade script 2.1.4 failing: incorrect string
Post by: Sir Osis of Liver on December 25, 2023, 08:09:23 PM
You have to restart upgrade from beginning after setting default language to english.  Upgrader leaves a line of code in Settings.php to mark where it left off, that must be deleted.
Title: Re: Upgdade script 2.1.4 failing: incorrect string
Post by: Kantis on December 25, 2023, 09:41:47 PM
Do I need to convert to UTF-8 before update? Now I'm trying to just upgrade with default as english. My server gives me 500 and empty page and I have no idea how to debug this. If I try to upgrade from command line, upgrade.php say it is finished, but the site still gives me empty HTTP status 500.
Title: Re: Upgdade script 2.1.4 failing: incorrect string
Post by: Sir Osis of Liver on December 25, 2023, 09:50:16 PM
I believe the upgrader converts to utf-8, but that won't cause a 500 error.  You should restore your 2.0.19 install from backups, make sure it's running correctly, set default language to english, then try upgrade again.
Title: Re: Upgdade script 2.1.4 failing: incorrect string
Post by: Kantis on December 25, 2023, 10:12:20 PM
Quote from: Sir Osis of Liver on December 25, 2023, 09:50:16 PMI believe the upgrader converts to utf-8, but that won't cause a 500 error.  You should restore your 2.0.19 install from backups, make sure it's running correctly, set default language to english, then try upgrade again.

Ok thanks, tried it now few times. For some reason my server won't like the upgrade procedure. Maybe my PHP is not fully compatible? This is PHP 8.0.30. upgrade.php finishes from command line but server just spits out 500 after this.

I have full control on this server, so any extra tips for debugging would be very much appreciated.
Title: Re: Upgdade script 2.1.4 failing: incorrect string
Post by: Sir Osis of Liver on December 26, 2023, 05:16:11 PM
If upgrade.php completes database should be upgraded.  Try uploading a clean set of files less Settings.php.  Corrupt file can cause 500 error.
Title: Re: Upgdade script 2.1.4 failing: incorrect string
Post by: Doug Heffernan on December 26, 2023, 05:21:27 PM
Quote from: Kantis on December 25, 2023, 10:12:20 PMOk thanks, tried it now few times. For some reason my server won't like the upgrade procedure.

Are you getting the same error message or new ones? If the latter, can you please post them?

Can you also check the server error log and post here the most recent error messages logged in there pertaining to this?
Title: Re: Upgdade script 2.1.4 failing: incorrect string
Post by: Kantis on December 26, 2023, 07:26:50 PM
Quote from: Doug Heffernan on December 26, 2023, 05:21:27 PM
Quote from: Kantis on December 25, 2023, 10:12:20 PMOk thanks, tried it now few times. For some reason my server won't like the upgrade procedure.

Are you getting the same error message or new ones? If the latter, can you please post them?

Can you also check the server error log and post here the most recent error messages logged in there pertaining to this?

There's absolutely no errors anywhere, just empty page with error 500, even after I tried to restore clean set up files after successful upgrade.php. So the apache access log just says 500, nothing in the error log.

I wish there was some sort of debug mechanism to see after which database query the failure happens.
Title: Re: Upgdade script 2.1.4 failing: incorrect string
Post by: Kindred on December 26, 2023, 08:49:53 PM
If your server is not recording 500 errors, then you need someone to fix your server config
Title: Re: Upgdade script 2.1.4 failing: incorrect string
Post by: Kantis on December 26, 2023, 08:55:43 PM
Quote from: Kindred on December 26, 2023, 08:49:53 PMIf your server is not recording 500 errors, then you need someone to fix your server config
What do you mean? I see the request and status 500 in the logs, but it doesn't tell me anything.

And it is going to be me who does any fixing.
Title: Re: Upgdade script 2.1.4 failing: incorrect string
Post by: Kantis on December 26, 2023, 08:58:49 PM
I suppose I could just run the index.php manually from command line to see what it produces. I think the 500 is caused by php not producing correct HTML.
Title: Re: Upgdade script 2.1.4 failing: incorrect string
Post by: Kantis on December 26, 2023, 09:07:44 PM
I think I found now something from php-fm debug logs... I see lines like this:

PHP Fatal error:  Uncaught Error: Failed opening required '/QueryString.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/index.php:73

So something seems to be problematic with the PHP environment. That's so strange.
Title: Re: Upgdade script 2.1.4 failing: incorrect string
Post by: Kantis on December 26, 2023, 09:28:40 PM
Finally got it! Settings.php was severy corrupted. Thanks for the help guys!
Title: Re: Upgdade script 2.1.4 failing: incorrect string
Post by: Kantis on December 26, 2023, 09:38:19 PM
Ok so it looks like any modification to Settings.php corrupts it, so basically my upgrade is not usable.
Title: Re: Upgdade script 2.1.4 failing: incorrect string
Post by: Sir Osis of Liver on December 26, 2023, 09:59:35 PM
That should not happen in a correctly configured php environment.
Title: Re: Upgdade script 2.1.4 failing: incorrect string
Post by: Kantis on December 26, 2023, 10:39:56 PM
Quote from: Sir Osis of Liver on December 26, 2023, 09:59:35 PMThat should not happen in a correctly configured php environment.


There was something strange with the file, I suppose some unsupported setting from 2.0.19. Basically I created manually new config with db and directory settings, and now the file backup is working without corruption. I don't know what happened, but now the new forum is running and looks stable!