Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: StarredSkies on December 12, 2023, 12:04:15 AM

Title: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: StarredSkies on December 12, 2023, 12:04:15 AM
While running the upgrader, I am stuck at 14% with the error 'Server has not responded for 30 seconds. It may be worth waiting a little longer before trying again.Click here to try again.', despite waiting some time.  This upgrade is being done in English (referring to previous upgrade issues).

'Executing database changes
Please be patient - this may take some time on large forums. The time elapsed increments from the server to show progress is being made.
Executing upgrade script 1 of 2.
Executing: "Changing column names." (1 of 41 - of this script)'

I tried changing the limit (https://www.simplemachines.org/community/index.php?topic=582045.0) in upgrade_2-1_mysql.sql and have had no luck. (My host is also not GoDaddy and they have been wonderful in helping me with this issue.)

This is also on a subdomain for testing an ACTUAL 2.1 upgrade for my website. (Could this be a database routing issue? It seemed to link up fine. Host confirmed password is correct.)

This is where I am stuck. Am I doing something wrong? Any advice would be helpful. Thank you.
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: StarredSkies on December 12, 2023, 02:02:46 AM
Update: My host attempted to fix the issue (they're amazing) but had no luck. They tried on my main and sub domain. Both encountered the issue.

My first attempt was done without upgrading to 2.0.19, while the host's second attempt was done after upgrading to 2.0.19 (and fixing out of date files with repair_settings.PHP). Obviously, both failed.

One error that came up for them was:
Fatal error: Uncaught Error: Call to undefined function httpsOn() in /home/DOMAIN/SUBDOMAIN/upgrade.php:285 Stack trace: #0 {main} thrown in /home/DOMAIN/SUBDOMAIN/upgrade.php on line 285Hence the upgrade is missing some files. Strange.

So I'm at a loss.
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: Doug Heffernan on December 12, 2023, 07:43:58 AM
Quote from: StarredSkies on December 12, 2023, 02:02:46 AM(and fixing out of date files with repair_settings.PHP).

Can you please tell us what you mean by this? The aforementioned file doesn't 'fix out of date files', but it checks that all paths/urls are pointing to the right location and provides correction if that is not the case.

Quote from: StarredSkies on December 12, 2023, 02:02:46 AMFatal error: Uncaught Error: Call to undefined function httpsOn() in /home/DOMAIN/SUBDOMAIN/upgrade.php:285 Stack trace: #0 {main} thrown in /home/DOMAIN/SUBDOMAIN/upgrade.php on line 285

The function mentioned in your error messages is defined in the Subs.php file and by the looks of it said file hasn't been overwritten. What ftp program did you use to overwrite your forum/folder files?
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: StarredSkies on December 12, 2023, 12:23:54 PM
When the host tried to upgrade to 2.0.19, they mentioned this:
Quote2.0.19 was showing you had 'out of date' files.

I ran repair_settings.php and it no longer gives that error.

Looking at my site (after rolling back to 2.0.17), the detailed version check says my sources, details, and language files are all old (2.0.12). So this lines up.


As for what FTP program, I was using CPanel.

Has anyone had any issues going from 2.0.17 to 2.1.4 before? I'm wondering what happens if a clean install of 2.0.17 is done and then try to upgrade from there.
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: Doug Heffernan on December 12, 2023, 01:07:37 PM
Quote from: StarredSkies on December 12, 2023, 12:23:54 PMAs for what FTP program, I was using CPanel.

Try reuploading the files from the large 2.1.4. upgrade package again, but this time use a ftp program for that. It looks like something didn't go right when you overwrote your forum files through the File Manager section of the cPanel.
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: StarredSkies on December 12, 2023, 01:23:00 PM
Alright. I've never used a FTP program before, so I'll look for one and report back. If you have any recommendations, I'm more than open to downloading a specific one.

Will be a second. :) See ya soon.
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: Tyrsson on December 12, 2023, 01:31:49 PM
Filezilla is free and works. I do not use them often these days so not sure if there are better ones out there.
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: MobileCS on December 12, 2023, 02:04:08 PM
I prefer WinSCP, and it's free as well.

https://winscp.net/
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: Kindred on December 12, 2023, 02:33:16 PM
you can also do what I do when using cpanel

delete the Sources and Themes directories (Save any custom graphics from your default or custom themes that you may want)
delete all php files other than Settings.php in the root
THEN upload/extract all of the 2.1.4 files....
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: StarredSkies on December 12, 2023, 02:53:20 PM
Thank you for the suggestions everyone!

When going from the FTP (WinSCP), it says 'The upgrader found some old or outdated files. Please make certain you uploaded the new versions of all the files included in the package.' (This was not an issue when uploading from CPanel).

I have extracted the upgraded zip file using WinRar while in the subdomain's files.

So, is this an issue with how I am extracting the zip or an overall problem with my files?

I may try Kindred's suggestion in a moment after rolling back.

Edit: trying something else (extracting the upgrade outside of FTP and then moving those files in to the FTP, rather than extracting in FTP)

2nd edit: Trying to do the edit above's idea, it throws out this error: "Warning: Use of undefined constant 'session - assumed ''session' (this will throw an Error in a future version of PHP) in /home/DOMAIN/SUBDOMAIN/Settings.php on line 86

Warning: Use of undefined constant use_only_cookies' - assumed 'use_only_cookies'' (this will throw an Error in a future version of PHP) in /home/DOMAIN/SUBDOMAIN/Settings.php on line 86

Fatal error: Uncaught Error: Call to undefined function httpsOn() in /home/DOMAIN/SUBDOMAIN/upgrade.php:285 Stack trace: #0 {main} thrown in /home/DOMAIN/SUBDOMAIN/upgrade.php on line 285"

Currently using PHP 7.4

Line 86 is: "ini_set('session.use_only_cookies', 1);"
Line 285 is: "if (httpsOn())"
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: StarredSkies on December 12, 2023, 04:23:15 PM
Small update. The host uploaded the upgrade and edited Settings.PHP to match correctly. I will attempt the upgrade now and see if the intimal issues persist.

Edit:
Nope. Still giving me 'Server has not responded for 30 seconds. It may be worth waiting a little longer before trying again.'

Will keep waiting and trying.

Per the host's attempts: "In my testing last night - it did not appear to be doing anything at all while it was 'waiting' beyond waiting. I saw no database queries happening. Not sure where the fault is to be honest."
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: Doug Heffernan on December 12, 2023, 04:37:29 PM
What about your server error log page, are there any errors logged in there recently pertaining to the upgrade?
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: StarredSkies on December 12, 2023, 04:45:08 PM
Nothing is listed. (https://cdn.discordapp.com/attachments/1181409371322843176/1184248841655042108/image.png?ex=658b48ae&is=6578d3ae&hm=db6fd299612416550df284ea400af7f494cabcaa7c71dfa5dd7dc2691df1eec8&) This are the errors from the CPanel (aka none).
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: Kindred on December 12, 2023, 04:46:34 PM
wait wait wait....


you are trying to upgrade a test version of your site?

a copy that you made from your production?
When you made the copy, did you make a database copy and change the references in Settings.php to point to the NEW database and the NEW location of your test site (rather than the production settings?)
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: StarredSkies on December 12, 2023, 04:52:37 PM
Yes. I am testing on a subdomain.

I made a database copy and changed the references in settings.php.

I feel like something is linking because my main site is having troubles logging into the admin panel, editing profiles, and doing a few other things (accessing bookmarks).

Edit: Just used repair_settings.php on the main website's domain and fixed those issues. Even so, it is throwing the same issues as described earlier with line 86 in settings.php.

'Warning: Use of undefined constant 'session - assumed ''session' (this will throw an Error in a future version of PHP) in /home/DOMAIN/public_html/Settings.php on line 86

Warning: Use of undefined constant use_only_cookies' - assumed 'use_only_cookies'' (this will throw an Error in a future version of PHP) in /home/DOMAIN/public_html/Settings.php on line 86

Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in /home/DOMAIN/public_html/Settings.php on line 84

Warning: Use of undefined constant 'session - assumed ''session' (this will throw an Error in a future version of PHP) in /home/DOMAIN/public_html/Settings.php on line 86

Warning: Use of undefined constant use_only_cookies' - assumed 'use_only_cookies'' (this will throw an Error in a future version of PHP) in /home/DOMAIN/public_html/Settings.php on line 86'

Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: Kindred on December 12, 2023, 05:25:34 PM
when you create a copy install - you need to change the database AND the PATHs AND the URLs both in Settings.php and in the database... 

if you don't then every update that you try to make will be applied to your production install, not your copy install
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: StarredSkies on December 12, 2023, 05:28:34 PM
Where is the information that needs to be changed in the database/paths? And what information needs to be changed? (Any guide/specifics would be helpful)

Just to double check I did it correct. (I repaired settings, copied the database (didn't edit anything), etc)

And does it matter that both databases share the same prefix (smfyv_)?

Edit: Doing a clean install of 2.0.17 on a different subdomain. Encountered this issue (https://www.simplemachines.org/community/index.php?topic=561321.msg3981861#msg3981861) and used the fix. Works fine... Going to try upgrading now.
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: StarredSkies on December 12, 2023, 07:16:26 PM
A clean install of 2.0.17 being upgraded to 2.1.14 worked. Hm...

"And does it matter that both databases share the same prefix (smfyv_)?"
Yes. It does. Fool. I switched the database prefix to a new one and edited settings.php to match.

Still nothing.
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: Kindred on December 12, 2023, 08:15:15 PM
prefix doesn't matter, as long as the database itself is different.

The places you have to change are all editable using repair_settings.php -- you will have to run it once to update the database and main path/url settings and then save/exit.  run a second time to update all of the OTHER paths/urls which are stored in the database
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: StarredSkies on December 12, 2023, 08:44:38 PM
Alright. Database is different and the prefix has been changed for my sanity... just in case.

I edited both settings.php and used repair_settings.php. They are both correct.

Out of curiosity, I decided to repeat the process with all of the knowledge above and the error still occurs.

(https://cdn.discordapp.com/attachments/1181409371322843176/1184308337987305502/image.png?ex=658b8017&is=65790b17&hm=e9f9b7b93ce74e1b7bbd9798b9e2831a114f664304687c749d0a13e19d7407b3&)

Also tried editing the limit again. Nothing.

If need be, I am open to providing files and trying to have someone replicate the issue.

Question too: could this be a modification issue? I could try another installation and delete all the themes/modifications.
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: Kindred on December 13, 2023, 06:04:08 AM
Well, if you are coming out of 2.0.x, you need to remove all Themes except the default anyway,  since 2.0 Themes won't work on 2.1... and all mods  ARE removed as part of the upgrade.


So, with that timeout, it does that for me too... just click try again.  It took me 6 or more to complete a big forum upgrade (2.5 million posts)
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: StarredSkies on December 13, 2023, 03:11:08 PM
I did remove the themes as you said. There was no change. (And I will keep the mod thing in mind.)

The issue is that I have waited. Hours. It's been over 24 with the first rendition of this and then 13 for he second attempt. Should it really take this long?

Something isn't right and I'm not sure where to go from here (nor does the host).
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: Doug Heffernan on December 13, 2023, 05:02:47 PM
Quote from: StarredSkies on December 13, 2023, 03:11:08 PMThe issue is that I have waited. Hours. It's been over 24 with the first rendition of this and then 13 for he second attempt. Should it really take this long?

No, it shouldn't take that long unless you have a very very big forum and not a decent host. Something is causing the delay but without seeing any message pertaining to that is difficult to diagnose the problem.
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: Kindred on December 13, 2023, 05:06:42 PM
did you click the button or just wait?
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: StarredSkies on December 13, 2023, 05:38:26 PM
Quote from: Doug Heffernan on December 13, 2023, 05:02:47 PM
Quote from: StarredSkies on December 13, 2023, 03:11:08 PMThe issue is that I have waited. Hours. It's been over 24 with the first rendition of this and then 13 for he second attempt. Should it really take this long?

No, it shouldn't take that long unless you have a very very big forum and not a decent host. Something is causing the delay but without seeing any message pertaining to that is difficult to diagnose the problem.

My forum is almost 100k posts, so it's not huge. It's very strange that there's been no error shown. Checked again in Apache error logs and the upgrade. No changes whatsoever.

Quote from: Kindred on December 13, 2023, 05:06:42 PMdid you click the button or just wait?
Both. I have been waiting a bit and then every now and then, clicking it to see if a connection has formed.

What else could I try to look at? Could the database be corrupted in some way?
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: Sesquipedalian on December 13, 2023, 06:52:54 PM
If you have command line access, you could try running the upgrade that way. The command line can produce much more verbose logging and error reporting.
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: StarredSkies on December 13, 2023, 10:59:57 PM
Well, lord almighty, that worked on the second test subdomain and is functioning just fine. Not the first.

I suppose we could call this solved for now, even if the root of the issue is not known.
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: shawnb61 on December 13, 2023, 11:12:52 PM
If using a subdomain - and especially if using multiple subdomains - look at the cookie settings. 

You may need to specify subdomain independent cookies.  And also specify the primary domain.

Under Admin | Server Settings | Cookies and Sessions.
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: StarredSkies on December 14, 2023, 12:05:14 AM
I will 100% check on that in the future. Thank you so much everyone! As always, you guys are helpful.
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: Andres08 on August 12, 2024, 08:43:13 PM
Is here someone upgrading manualy from 2.0.17 to new version? Somehow I am not that good in it, and lack of trust to overwrite something important. 
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: Aleksi "Lex" Kilpinen on August 13, 2024, 12:15:24 AM
If you for some reason need to test on a copy, make sure the copy actually works before anything related to the upgrade.
ALWAYS start with a working forum. So, first copy the exact same install - files and database, then edit DB settings for the copy or run repair_settings.php to do that and save, then run repair_settings.php (again) and fix all paths and urls, lastly verify everything works correctly. Only then, start with the upgrade.
But you do not need to do this, you should be safe just making a backup and directly working on your live forum. 

The actual upgrade is described in the wiki in fairly good detail https://wiki.simplemachines.org/smf/Upgrading
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: Andres08 on August 13, 2024, 05:13:34 PM
Quote from: Aleksi "Lex" Kilpinen on August 13, 2024, 12:15:24 AMIf you for some reason need to test on a copy, make sure the copy actually works before anything related to the upgrade.
ALWAYS start with a working forum. So, first copy the exact same install - files and database, then edit DB settings for the copy or run repair_settings.php to do that and save, then run repair_settings.php (again) and fix all paths and urls, lastly verify everything works correctly. Only then, start with the upgrade.
But you do not need to do this, you should be safe just making a backup and directly working on your live forum. 

The actual upgrade is described in the wiki in fairly good detail https://wiki.simplemachines.org/smf/Upgrading

Thank you for that.  I would most likely need some support. 

Andres
Title: Re: Upgrading from 2.0.17 to 2.1.14 not going through
Post by: Aleksi "Lex" Kilpinen on August 15, 2024, 07:14:00 AM
Most commonly it really is as simple as uploading the contents of the upgrade package, overwriting old files with the new ones, and then running upgrade.php.