Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: gloudiesaurus on June 24, 2022, 04:13:53 AM

Title: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on June 24, 2022, 04:13:53 AM
I'm trying to upgrade www.gppits.net/forum from 2.0.19 to 2.1.2.

When I use package manager I get this message:
QuoteAn Error Has Occurred!
Package upload failed due to the following error:
"Although the package was downloaded to the server it appears to be empty. Please check the Packages directory, and the "temp" sub-directory are both writable. If you continue to experience this problem you should try extracting the package on your PC and uploading the extracted files into a subdirectory in your Packages directory and try again. For example, if the package was called shout.tar.gz you should:
1) Download the package to your local PC and extract it into files.
2) Using an FTP client create a new directory in your "Packages" folder, in this example you may call it "shout".
3) Upload all the files from the extracted package to this directory.
4) Go back to the package manager browse page and the package will be automatically found by SMF."

I tried to upload all extracted files from the extracted package into the "package directory" but SMF doesn't find version 2.1.2?

What can I do? Thanks!
Title: Re: Upgrading from 2.0.19 tot 2.1.2 problem
Post by: Arantor on June 24, 2022, 04:25:49 AM
Please see the upgrade guide - https://wiki.simplemachines.org/smf/Upgrading

Going up a major version such as 2.0 to 2.1 is too big for the package manager to handle.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Doug Heffernan on June 24, 2022, 06:36:02 AM
Indeed, major upgrades, such as going from one serie to another, as in this case, should be done manually and not through the Package Manager.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Arantor on June 24, 2022, 07:08:05 AM
The package manager fails *hard* on doing so and can leave the forum in a completely broken state, possibly almost irrecoverable state. It's simply too big a job.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Kindred on June 24, 2022, 07:13:39 AM
However, as this is an ongoing confusion, maybe we should add a package identifier file which doesn't do the upgrade but does fail gently with a clear error/instruction......
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Arantor on June 24, 2022, 07:15:52 AM
Now that is a good idea.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Steve on June 24, 2022, 07:32:49 AM
He has them now and then. j/k Kindred!  ;D
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Arantor on June 24, 2022, 08:25:10 AM
I miss the days when support issues were not just things to explained by a link to the docs, but a thing you could improve in the code and solve them once and for all.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on June 25, 2022, 09:01:54 AM
I followed the steps from https://wiki.simplemachines.org/smf/Upgrading.

Made back ups, unzipped all files, uploaded them with FTP into the "forum" folder.
Now I want to run upgrade.php, but the page is completely blanco?

What I'm doing wrong?
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Doug Heffernan on June 25, 2022, 09:04:28 AM
Quote from: gloudiesaurus on June 25, 2022, 09:01:54 AMI followed the steps from https://wiki.simplemachines.org/smf/Upgrading.

Made back ups, unzipped all files, uploaded them with FTP into the "forum" folder.
Now I want to run upgrade.php, but the page is completely blanco?

What I'm doing wrong?

What do you mean by blanco, a blank page?
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on June 25, 2022, 09:05:29 AM
Yes, blank page
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Doug Heffernan on June 25, 2022, 09:11:48 AM
Quote from: gloudiesaurus on June 25, 2022, 09:05:29 AMYes, blank page

What is your php version?
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on June 25, 2022, 09:14:36 AM
PHP 5.6
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Doug Heffernan on June 25, 2022, 09:16:06 AM
Quote from: gloudiesaurus on June 25, 2022, 09:14:36 AMPHP 5.6

There lies the problem. You must upgrade your php to at least 7.4. as php 5.x is not supported by smf 2.1.x. After you have upgraded the php try the upgrader again and it should load fine.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: m4z on June 27, 2022, 02:46:00 PM
Quote from: Kindred on June 24, 2022, 07:13:39 AMHowever, as this is an ongoing confusion, maybe we should add a package identifier file which doesn't do the upgrade but does fail gently with a clear error/instruction......

I believe https://github.com/SimpleMachines/SMF/issues/7379 goes in a similar direction.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Doug Heffernan on June 28, 2022, 10:47:53 AM
@gloudiesaurus, I am following up on this. Did the upgrade of php solve the issue?
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 09, 2022, 09:39:16 AM
Quote from: Doug Heffernan on June 28, 2022, 10:47:53 AM@gloudiesaurus, I am following up on this. Did the upgrade of php solve the issue?

No I still got the same problem
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Kindred on September 09, 2022, 10:29:50 AM
Same problem,  meaning exactly what?
Let's try again

What version of smf I'd currently running, what version of php?

What version are you trying to upgrade to?
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 12, 2022, 04:36:40 PM
SMF version 2.0.19
PHP 7.4.

This is what happens when running upgrade.php (for version :


Warning: Use of undefined constant mysql - assumed 'mysql' (this will throw an Error in a future version of PHP) in /home/gppitsnet/domains/gppits.net/public_html/forum/Settings.php on line 285

Notice: Trying to access array offset on value of type null in /home/gppitsnet/domains/gppits.net/public_html/forum/Themes/default/languages/index.dutch.php on line 113
SMF-upgradescript
Simple Machines Forum
Voortgang

    Stap 1: Login
    Stap 2: Upgrade Options
    Stap 3: Backup
    Stap 4: Database Changes
    Stap 5: Convert serialized strings to JSON
    Stap 6: Convert to UTF-8
    Stap 7: Delete Upgrade.php

Totale voortgang
4%
Voortgang van stap
0%
0%
Verstreken tijd: 3 minuten, 8 seconden.
Backup Database
Please wait while a backup is created. For large forums this may take some time!
Completed 0 out of 71 tables.
Current Table: "admin_info_files"

Backup Complete! Click Continue to Proceed.

When clicking on continue nothing changes.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 12, 2022, 04:44:48 PM
And this is the message now when visiting gppits.net/forum

Warning: Use of undefined constant mysql - assumed 'mysql' (this will throw an Error in a future version of PHP) in /home/gppitsnet/domains/gppits.net/public_html/forum/Settings.php on line 285

Upgrading the forum...
We zijn spoedig terug!
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 12, 2022, 04:45:40 PM
Upgrade.php:


Warning: Use of undefined constant mysql - assumed 'mysql' (this will throw an Error in a future version of PHP) in /home/gppitsnet/domains/gppits.net/public_html/forum/Settings.php on line 285
SMF Upgrade Utility
Simple Machines Forum
Progress

    Step 1: Login
    Step 2: Upgrade Options
    Step 3: Backup
    Step 4: Database Changes
    Step 5: Convert serialized strings to JSON
    Step 6: Convert to UTF-8
    Step 7: Delete Upgrade.php

Overall Progress
0%
0%
Time Elapsed: 17 mins, 56 seconds.
Updating Your SMF Installation!
Thank you for choosing to upgrade to SMF 2.1.2. All files appear to be in place and the upgrade can now proceed.
Warning!
This upgrade script is out of date! The current version of SMF is 2.1.2 but this upgrade script is for 2.1.2.

It is recommended that you visit the Simple Machines Website to ensure you are upgrading to the latest version.
Critical Error!
The upgrade script cannot find script.js or it is out of date. Make sure your theme paths are correct. You can download a setting checker tool from the Simple Machines Website
Warning!

"gloudiesaurus" is running the upgrade script.

The upgrade script has been running for the last 17 minutes and 56 seconds.

The upgrade script was last updated 1 minutes and 4 seconds ago.

We recommend that you do not run this script unless you are sure that gloudiesaurus has completed their upgrade.

You can choose to either run the upgrade again from the beginning or continue from the last step reached during the most recent upgrade.
Admin Login:
For security purposes please login with your admin account to proceed with the upgrade.

Username:
Password:
    Continue from step reached during last execution of upgrade script.

Note: If necessary, the above security check can be bypassed for users who may administrate a server, but may not have admin rights on the forum. In order to bypass the above check, simply open "upgrade.php" in a text editor and replace "$disable_security = false;" with "$disable_security = true;" and refresh this page.

    SMF © 2022, Simple Machines

Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Kindred on September 12, 2022, 08:13:35 PM
Switch to English and try the upgrade
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 13, 2022, 04:04:08 AM
Quote from: Kindred on September 12, 2022, 08:13:35 PMSwitch to English and try the upgrade

I can't reach the admin-panel now.

You mean putting the old back up from the forum (2.0.19) back and select English as language and then run the update?

Maybe also uninstall all mods then?
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 13, 2022, 04:12:25 AM
And this error is no problem?:

QuoteWarning: Use of undefined constant mysql - assumed 'mysql' (this will throw an Error in a future version of PHP) in /home/gppitsnet/domains/gppits.net/public_html/forum/Settings.php on line 285
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: @rjen on September 13, 2022, 05:09:32 AM
Quote from: gloudiesaurus on September 13, 2022, 04:12:25 AMAnd this error is no problem?:

QuoteWarning: Use of undefined constant mysql - assumed 'mysql' (this will throw an Error in a future version of PHP) in /home/gppitsnet/domains/gppits.net/public_html/forum/Settings.php on line 285

It is a warning, due to the php version used by your host, but it is a warning: you can continue..

Try to run the upgrader in English, see the image below...
You cannot view this attachment.

Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 13, 2022, 06:29:15 AM
This is what I see when selecting English language.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: @rjen on September 13, 2022, 07:11:34 AM
Ok, as it seems your upgrade is still running (from when you started in dutch) and it has never been able to get past step 3 (creating the backup)

Now this may take longer for large forums, but should never take this long...

I would expect that you can restart the upgrade (in English), but I do not know right now how to 'stop'  the running process. I assume someone more knowledgable will come along soon to tell us...
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 13, 2022, 10:47:08 AM
I started again in English.
Now I get this screen
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Doug Heffernan on September 13, 2022, 10:52:45 AM
Quote from: gloudiesaurus on September 13, 2022, 10:47:08 AMI started again in English.
Now I get this screen

It is still in dutch. Look at the language on the upper left corner. That should be in english too.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 13, 2022, 11:11:27 AM
Quote from: Doug Heffernan on September 13, 2022, 10:52:45 AM
Quote from: gloudiesaurus on September 13, 2022, 10:47:08 AMI started again in English.
Now I get this screen

It is still in dutch. Look at the language on the upper left corner. That should be in english too.

How can I change this?
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Doug Heffernan on September 13, 2022, 11:16:08 AM
Quote from: gloudiesaurus on September 13, 2022, 11:11:27 AM
Quote from: Doug Heffernan on September 13, 2022, 10:52:45 AM
Quote from: gloudiesaurus on September 13, 2022, 10:47:08 AMI started again in English.
Now I get this screen

It is still in dutch. Look at the language on the upper left corner. That should be in english too.

How can I change this?

For smf 2.0..19 you can change the default language by going to your Admin Panel->Configuration->Languages->Settings->Default Forum Language. Select the English from the drop down and save the changes.

But before you do that, can you check your server error log first and see if there are any errors logged in there?
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: @rjen on September 13, 2022, 12:19:08 PM
Quote from: Doug Heffernan on September 13, 2022, 11:16:08 AMFor smf 2.0..19 you can change the default language by going to your Admin Panel->Configuration->Languages->Settings->Default Forum Language. Select the English from the drop down and save the changes.


Pretty sure he cannot do that, because his forum is in the middle of the upgrade process...
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Doug Heffernan on September 13, 2022, 12:31:09 PM
Quote from: @rjen on September 13, 2022, 12:19:08 PM
Quote from: Doug Heffernan on September 13, 2022, 11:16:08 AMFor smf 2.0..19 you can change the default language by going to your Admin Panel->Configuration->Languages->Settings->Default Forum Language. Select the English from the drop down and save the changes.


Pretty sure he cannot do that, because his forum is in the middle of the upgrade process...

That goes without saying. I meant it should the op want to roll back and change the default language properly.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 13, 2022, 02:33:50 PM
Quote from: Doug Heffernan on September 13, 2022, 11:16:08 AM
Quote from: gloudiesaurus on September 13, 2022, 11:11:27 AM
Quote from: Doug Heffernan on September 13, 2022, 10:52:45 AM
Quote from: gloudiesaurus on September 13, 2022, 10:47:08 AMI started again in English.
Now I get this screen

It is still in dutch. Look at the language on the upper left corner. That should be in english too.

How can I change this?

For smf 2.0..19 you can change the default language by going to your Admin Panel->Configuration->Languages->Settings->Default Forum Language. Select the English from the drop down and save the changes.

But before you do that, can you check your server error log first and see if there are any errors logged in there?

Can't see any errors.
Only:
Got error 'PHP message: PHP Warning:  Use of undefined constant mysql - assumed 'mysql' (this will throw an Error in a future version of PHP) in /home/gppitsnet/domains/gppits.net/public_html/forum/Settings.php on line 285'

Change language not possible now because I can't reach the admin-panel.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Doug Heffernan on September 13, 2022, 04:20:38 PM
Quote from: gloudiesaurus on September 13, 2022, 02:33:50 PMCan't see any errors.
Only:
Got error 'PHP message: PHP Warning:  Use of undefined constant mysql - assumed 'mysql' (this will throw an Error in a future version of PHP) in /home/gppitsnet/domains/gppits.net/public_html/forum/Settings.php on line 285'

Can you check the Settings.php file and see if the $db_type var has the dollar symbol, or is defined without it? When you ran the upgrader, did you select the option to migrate the Settings.php file to a smf 2.1. format or somthing of that nature as I do not recall the precise words off the top of my head?

Quote from: gloudiesaurus on September 13, 2022, 02:33:50 PMChange language not possible now because I can't reach the admin-panel.

I know. That was meant, as mentioned above, for when/if you do a roll back.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 13, 2022, 05:22:57 PM
In settings.php
$db_type = mysql;

I did select this option:
Migrate to a new Settings file.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Sir Osis of Liver on September 13, 2022, 06:06:47 PM
You have to restore the forum to 2.0.19, set default language to english, run upgrade from beginning.  Changing language in middle of upgrade doesn't work.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 14, 2022, 03:47:34 AM
Ok I just can delete all forum files now and upload my back up 2.0.19 via FTP now?
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Kindred on September 14, 2022, 09:44:38 AM
and restore the 2.0.19 database -- because, if any database changes were done during the aborted upgrade, 2.0.19 will not work
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 14, 2022, 01:49:59 PM
I deleted all forum files and put back the back up of 2.0.19. Then it worked.
Changed language to English and upload the 2.1.02 files again.

Choose English for installation and I got exact the same as before. See screenshots.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Doug Heffernan on September 14, 2022, 01:57:23 PM
Quote from: gloudiesaurus on September 14, 2022, 01:49:59 PMI deleted all forum files and put back the back up of 2.0.19. Then it worked.
Changed language to English and upload the 2.1.02 files again.

Choose English for installation and I got exact the same as before. See screenshots.

The error in your second screenshot is what is preventing the upgrade imo. Your urls/paths do not seem to be pointing to the right location, as mentioned in the error message. Can you run the repair_settings.php tool and click on all recommended values?
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 14, 2022, 03:41:55 PM
I ran repair_settings.php.
Also changed language to English.

After that upload the 2.1.02 files again.
But the same problem again, see screenshots.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Doug Heffernan on September 14, 2022, 04:16:25 PM
Quote from: gloudiesaurus on September 14, 2022, 03:41:55 PMI ran repair_settings.php.
Also changed language to English.

After that upload the 2.1.02 files again.
But the same problem again, see screenshots.

Did you click the recommened values and save the changes? If the paths and urs were straightened out, the error message would have been gone.

Can you run the following sql queries at the phpmyadmin and post the results here?

SELECT value FROM smf_themes WHERE variable = 'theme_url';
SELECT value FROM smf_themes WHERE variable = 'theme_dir';

If you are using a different prefix for your database tables, other than smf_, append that to the themes table name in queries above.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 14, 2022, 04:54:21 PM
Quote from: Doug Heffernan on September 14, 2022, 04:16:25 PM
Quote from: gloudiesaurus on September 14, 2022, 03:41:55 PMI ran repair_settings.php.
Also changed language to English.

After that upload the 2.1.02 files again.
But the same problem again, see screenshots.

Did you click the recommened values and save the changes? If the paths and urs were straightened out, the error message would have been gone.

Can you run the following sql queries at the phpmyadmin and post the results here?

SELECT value FROM smf_themes WHERE variable = 'theme_url';
SELECT value FROM smf_themes WHERE variable = 'theme_dir';

If you are using a different prefix for your database tables, other than smf_, append that to the themes table name in queries above.

Yes I did. See screenshots.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 14, 2022, 04:55:02 PM
see screenshots
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Sir Osis of Liver on September 14, 2022, 10:12:44 PM
You shouldn't be seeing the "Try English" prompt.  Restore forum files and database to 2.0.19, make sure it's running correctly, set default language to english in Admin > Languages.  Upload 2.1.2 upgrade package, run upgrade.php.  It should run from beginning and not ask you about language.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 15, 2022, 05:18:00 AM
Quote from: Sir Osis of Liver on September 14, 2022, 10:12:44 PMYou shouldn't be seeing the "Try English" prompt.  Restore forum files and database to 2.0.19, make sure it's running correctly, set default language to english in Admin > Languages.  Upload 2.1.2 upgrade package, run upgrade.php.  It should run from beginning and not ask you about language.

This is exact what I did. But it didnt run from the beginning.
My website uses Cloudfare, is it possible that this plays a role?
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Sir Osis of Liver on September 15, 2022, 06:53:39 PM
Not sure how upgrade.php detects a previous upgrade attempt, but that procedure should restart upgrade.  You may have to purge Cloudflare cache, should be in Dashboard > Configuration > Purge Cache. 
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Illori on September 15, 2022, 07:53:16 PM
Quote from: Sir Osis of Liver on September 15, 2022, 06:53:39 PMNot sure how upgrade.php detects a previous upgrade attempt, but that procedure should restart upgrade.

there should be a line added in Settings.php to give it the status and after it is done i believe that line is deleted.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 16, 2022, 02:46:38 AM
Quote from: Sir Osis of Liver on September 15, 2022, 06:53:39 PMNot sure how upgrade.php detects a previous upgrade attempt, but that procedure should restart upgrade.  You may have to purge Cloudflare cache, should be in Dashboard > Configuration > Purge Cache. 

So the best thing I can do now, is purge Cloudfare cache.
Running repair_settings.php. Upload 2.1.2 files, and try to run upgrade.php again?
Correct?  :)
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Steve on September 16, 2022, 06:09:45 AM
Yep.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Sir Osis of Liver on September 16, 2022, 01:11:20 PM
Just make sure 2.0.19 is running correctly before attempting upgrade again.

Quote from: Illori on September 15, 2022, 07:53:16 PMthere should be a line added in Settings.php to give it the status and after it is done i believe that line is deleted.

That being the case, it should be removed when restoring 2.0.19 backup, which has been tried.  I'm guessing it's a caching issue.
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 16, 2022, 01:51:57 PM
You dont believe it, after those steps:


So the best thing I can do now, is purge Cloudfare cache.
Running repair_settings.php. Upload 2.1.2 files, and try to run upgrade.php again?

It worked, the forum is updated now  :D  ;D  ;D  ;D  ;D
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: gloudiesaurus on September 16, 2022, 01:52:12 PM
Thanks you all so much for your help and time!
Title: Re: Upgrading from 2.0.19 to 2.1.2 problem
Post by: Doug Heffernan on September 16, 2022, 02:22:26 PM
Glad to see that you managed to upgrade your forum successfully.