News:

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

Main Menu

Upgrading from SMF 1.1 RC3 to 2.1.2

Started by Imago, August 26, 2022, 12:56:16 AM

Previous topic - Next topic

Imago

got this error on Step 4

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 2 of 3.
Executing: "Updating attachment data..." (12 of 41 - of this script)

Illori

i dont see that you posted any error. all that is normal.

Imago

#2
Thanks for replying.

It's stuck for three hours now. Debugging says there's a problem with some hash on updating the attachment table. Tried with the 2.0.19 updater with the same result. So reverted to 1.1 RC3 and now looking for patch to 1.1 Stable

Doug Heffernan

Quote from: Imago on August 26, 2022, 05:22:17 AMThanks for replying.

It's stuck for three hours now. Debugging says there's a problem with some hash on updating the attachment table. Tried with the 2.0.19 updater with the same result. So reverted to 1.1 RC3 and now looking for patch to 1.1 Stable

How big is your forum? Do you have a lot of attachments, and what does the debugging say precisely?

Imago

Quote from: Doug Heffernan on August 26, 2022, 05:57:18 AMHow big is your forum? Do you have a lot of attachments, and what does the debugging say precisely?


Tried again to upgrade. 17 attachments. Forum has been offline for 12 years.

1. Decompressed the 2.1.2 upgrade over the existing files
2. Added the latest forum BG language files
3. Changed the PHP from 5.3 to 8.0
4. Started the /upgrade.php

and got this error message
...
Updating indexes on "messages"...done
Updating table indexes...done
Reordering boards and categories...done
Updating indexes and data on "smileys"...done
Updating indexes on "log_boards"...done
Updating indexes on "log_mark_read"...done
Updating indexes on "themes"...done
Updating data in "settings"...done
Adding new settings...done
Adding PM spam protection settings...done
Cleaning old values from "settings"...done
Encoding SMTP password...done
Adjusting timezone settings...done
Checking for "classic" and removing it if necessary...done
Renaming personal message tables...done
Updating indexes on "pm_recipients"...done
Updating columns on "pm_recipients"...done
Updating columns on "members"...done
Updating columns on "members" - part 2...done
Updating member approval...done
Adding new holidays...done
Updating event start and end dates...done
Converting other date columns...done
Checking for an old table...done
Creating "message_icons"...done
Inserting "message_icons"...done
Creating "package_servers"...done
Inserting "package_servers"...done
Updating flood control log...done
Updating ip address storage...done
Converting "log_online"...done
Updating poll column sizes...done
Updating attachments table...done
Updating boards and topics...done
Updating members...done
Recounting member pm totals (step 1)...done
Recounting member pm totals (step 2)...done
Converting server stored setting...done
Converting avatar upload setting...done
Updating attachments...done
Updating settings...done
Registering thumbs...done
Adding image dimensions...done
Splitting ban table...done
Updating ban statistics...done
Deleting some very old permissions...done
Renaming permissions...done
Upgrading "deny"-permissions...done
Upgrading post based group permissions...done
Upgrading by-board permissions...done
Removing all guest deny permissions...done
Removing guest admin permissions (if any)...done
Creating search cache tables...done
Rebuilding fulltext index...done
Indexing topic subjects...done
Converting settings...done
Creating log table indexes (this might take some time!)...done
Preparing log table upgrade...done
Converting log tables (this might take some time!)...done
Updating last message IDs for boards...done
Cleaning up old log indexes...done
Preparing messages table for strict upgrade...done
Adjusting text fields...done
Replacing messages index...done
Adding log_topics index...done
Updating the members table ...done
Expanding message column size...done
Sorting the boards...done
Moving to next script file...done
Renaming table columns...done
Converting "log_online"...done
Implementing board redirects...done
Creating spider table...done
Removing a spider...done
Creating spider hit tracking table...done
Making some changes to spider hit table...done
Creating spider statistic table...done
Resetting settings_updated...done
Changing stats settings...done
Enable cache if upgrading from 1.1 and lower..done
Changing visual verification setting...done
Changing visual verification setting, again...done
Changing default personal text setting...done
Removing allow hide email setting...done
Ensuring stats index setting present...done
Ensuring forum width setting present...done
Replacing old calendar settings...done
Deleting old calendar settings...done
Adjusting calendar maximum year...done
Adding advanced signature settings...done
Updating spam protection settings...done
Adjusting timezone settings...done
Checking theme layers are correct for default themes...done
Adding index to log_notify table...done
GDPR compliance settings...done
Creating "custom_fields" table...done
Adding search ability to custom fields...done
Fixing default value field length...done
Enhancing privacy settings for custom fields...done
Checking display fields setup correctly...done
Adding new custom fields columns...done
Creating "log_digest" table...done
Adding digest option to "members" table...done
Creating "log_packages" table...done
Adding extra "log_packages" columns...done
Changing URL to SMF package server...done
Creating "mail_queue" table...done
Adding new mail queue settings...done
Change mail queue indexes...done
Adding type to mail queue...done
Creating "log_reported" table...done
Creating "log_reported_comments" table...done
Adding moderator center permissions...done
Adding moderation center preferences...done
Creating member notices table...done
Creating comments table...done
Adding user warning column...done
Ensuring warning settings are present...done
Creating "log_group_requests" table...done
Adding new membergroup table columns...done
Creating "group_moderators" table...done
Altering attachment table...done
Adding file hash...done

Error!
Server has not responded for 30 seconds. It may be worth waiting a little longer before trying again.Click here to try again.


Steve

Quote from: Imago on August 26, 2022, 07:38:03 AMForum has been offline for 12 years
Did you mean ONline or off line? If it's been offline as you said, I'm wondering if it would be easier to just create a whole new forum ...
DO NOT pm me for support unless asked to!

Imago

Quote from: Steve on August 26, 2022, 07:49:21 AMIf it's been offline as you said, I'm wondering if it would be easier to just create a whole new forum ...

From the PoV of ksanika-vada, you are right - there is no use of being attached to 15-year old memories. But since this was a Buddhist forum, I value the opinion of all past members - no matter how fleeting is our life and we ourselves.

Steve

Understood and I don't blame you.

Unfortunately, this isn't my area of expertise but someone who can help you should be along soon.
DO NOT pm me for support unless asked to!

Doug Heffernan

Quote from: Imago on August 26, 2022, 07:38:03 AMError!
Server has not responded for 30 seconds. It may be worth waiting a little longer before trying again.Click here to try again.

What happens when you click the Click here to try again link?

What about this?

Quote from: Doug Heffernan on August 26, 2022, 05:57:18 AMHow big is your forum? Do you have a lot of attachments?


Sir Osis of Liver

You can try upgrading in steps - 1.1RC3 > 1.1.0 > 1.1.23 > 2.0 > 2.1 - starting out with lowest php version your host allows.  Older upgrade packages are in Downloads > Archived Releases.

When in Emor, do as the Snamors.
                              - D. Lister

Imago

Thank you, guys!

Doug, the problem is not in the number of the attachments but rather in the combination of php different versions and MariaDB last version. Forum is small - about 400 members.

Sir Osis of Liver, I have discovered the Archived Releases one hour ago and was trying what you suggested - up to some stage (1.1.21) with success. As for 2.0.19, it almost updated the db and stuck at the smileys table crying to check my SQL syntax for code DESC which is not accepted by MariaDB.

I will keep trying :-)

vbgamer45

If it's the alter table by order DESC you can just comment it out.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Imago

Quote from: vbgamer45 on August 26, 2022, 02:11:45 PMIf it's the alter table by order DESC you can just comment it out.

This unfortunately doesn't work. The installer goes to the end only with SMF 1.1.21. But then all non-Latin letters from the DB are displayed as question marks, say, "??????" for "портал". Cyrillic texts though are readable in the DB. All texts taken from files are also fine. Like in this



Here Joomla is bridged to SMF by your 15-year old bridge. When I revert to the original Joomla files with the same DB, I get this picture



In this case SMF is not affected and the database is also intact.

All files are UTF-8 w/o BOM, DB is utf8_general_ci. PHP compilation is also not responsible for the question marks. Neither is .htaccess

Sir Osis of Liver

If you're at 1.1.21, you should be able to upgrade directly to 2.1.2.  Language must be set to english, php 7.
When in Emor, do as the Snamors.
                              - D. Lister

Imago

Quote from: Sir Osis of Liver on August 27, 2022, 11:04:07 PMIf you're at 1.1.21, you should be able to upgrade directly to 2.1.2.  Language must be set to english, php 7.


Done 1.1.21 upgrade with question marks, proceeding with 2.1.2, English, php-fpm 7.2, and getting the same error message



Unified the collation of tables and columns to utf8mb4, upgraded to php8, same bula******ah...

BTW, I am getting the question marks even before starting the upgrade to 1.1.21 - just by decompressing the archive and overwriting the existing files.

Kindred

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

Imago

Quote from: Kindred on August 28, 2022, 08:46:16 AMSmf does not use utf8mb4
Yes, but it works fine with this collation - which is not the cause of the issue.




Doug Heffernan

Can you check your server error log and see if any errors are logged in there pertaining to this?

Imago

There are some repeating errors related to the upgrade, most frequent of which are

Got error 'PHP message: PHP Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in .../Sources/Load.php(219) : runtime-created function on line 3PHP message: PHP Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in .../Sources/Load.php(219) : runtime-created function on line 3'
Got error 'PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 67629432 bytes) in .../Sources/Subs.php on line 2482', referer: https://sangha.eurasia.bg/index.php/board,5.0.html

Doug Heffernan

Quote from: Imago on August 28, 2022, 11:58:52 AMGot error 'PHP message: PHP Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback

The \e modifier was deprecated in php 5.5, and as of php 7.0 it was removed, if I recall it correctly. It should be replaced with preg_replace_callback, as indicated in the error message above.

My question is, are you sure that you overwrite all your files and have upgraded your php version correctly?

Quote from: Imago on August 28, 2022, 11:58:52 AMGot error 'PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 67629432 bytes) in .../Sources/Subs.php on line 2482', referer: https://sangha.eurasia.bg/index.php/board,5.0.html

This indicates an issue with the memory allocation. What is the value set to for memory_limit in php.ini?

Sir Osis of Liver

Seem to be several different problems here.  1.1.21 upgrade is borked due to collation.  All tables should be utf8_general_ci, Settings.php must have $db_character_set = 'utf8';.  Shouldn't be hitting a memory limit at 134mb, I've upgraded much larger forums with 256mb.  Default on my host is 128mb.   Could also be bad config in MariaDB (that's a host issue), or possibly a problem with the joomla bridge (that's beyond me).

I'd suggest reverting to original db and files, get it running correctly, then fix collation and upgrade to 1.1.21 again.  If it works, try upgrading to 2.0.
When in Emor, do as the Snamors.
                              - D. Lister

Imago

#21
php.ini

Quotedate.timezone=Europe/Sofia
register_globals=Off
display_errors=Off
post_max_size=32M
memory_limit=256M
upload_max_filesize=32M
max_execution_time=30
expose_php=Off
session.save_path=/tmp
magic_quotes_gpc=On
magic_quotes_sybase=Off
error_reporting=E_ALL & ~E_NOTICE & ~E_DEPRECATED
engine=On
file_uploads=On
upload_tmp_dir=/tmp
session.use_trans_sid=Off

mod_security - off for this subdomain
php-fpm 74, then 8.0
MariaDB 10.4.26 (afraid to change it, as there are other sites on the server using it)

upgrade to 2.1.2 after altering the attachments table and adding the hash - as in the images above
Error logs recorded for this subdomain and date
QuoteGot error 'PHP message: PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in .../upgrade.php on line 47'

As for 1.1.21 - question marks persist immediately after uploading files

BTW, I have reverted to old RC3 files and DB but the question marks still remained. It turned out that the php was still 5.6. Changed to php 5.3 and the question marks disappeared. Seems that php56 is retaining some data from the previous installation - as for instance reading the old Settings.php that is no more on the server. Change to 5.3 and data from the new Settings.php appear. This is very strange...

Sir Osis of Liver

Are you using a vps?  Shouldn't have any problems with MariaDB unless it's badly configured.  My host is currently running 10.0.16, and I'm using php 7.4 on a Litespeed box for 2.0.19 and 2.1.2 forum installs.  Try disabling server caching, forum caching, and clear forum /cache. 
When in Emor, do as the Snamors.
                              - D. Lister

Imago

Quote from: Sir Osis of Liver on August 29, 2022, 12:32:52 PMAre you using a vps?

Yes. And CWP Pro for 12 bucks/yr. There are still some issues with CWP. Probably I should buy some cheap cPanel shared hosting, install my old cpbackups, upgrade to the last versions of all ancient installations and then migrate CPanel tarballs to CWP. Or install Lightspeed (thanks!) and try again...

Imago

Update. Seems that the problem is in Centos Web-panel. Successfully upgraded to 1.1.21 - on a new cPanel shared hosting. Further upgrade requires VPS with cPanel to manage mySQL versions.

Copied the files of 1.1.21 from the cPanel account to the CWP one and there were no more question marks. Will take it from here.

Thank you, guys, for the help and suggestions!

Steve

Marking solved then. If you run into more issues, go ahead and mark it unsolved.
DO NOT pm me for support unless asked to!

Advertisement: