News:

Wondering if this will always be free?  See why free is better.

Main Menu

Transfer to new server.

Started by kitz, July 05, 2024, 02:21:29 PM

Previous topic - Next topic

kitz

My hosts recently retired the server my forum ran on and supposedly migrated everything over to the new.

Since they did so, for the past 3 mornings the forum has been offline

QuoteTable 'smf_sessions' is marked as crashed and should be repaired

I've repaired the table and thought everything was ok,

Some of the other errors were

Quotehttps://forum.kitz.co.uk/index.php?topic=23057.15
2: Unknown: Cannot call session save handler in a recursive manner

https://forum.kitz.co.uk/index.php?action=-1'%20OR%203%2B45-45-1=0%2B0%2B0%2B1%20or%20'0iYQjz5A'=';

2: Unknown: Failed to write session data using user defined save handler. (session.save_path: /var/cpanel/php/sessions/ea-php73)


I thought repairing the session table fixed things, but I have now realised I can't use the £ sign. If I attempt to make a post using the pound sign then I get the following error

QuoteDatabase Error
Incorrect string value: '\xA349.34...' for column 'body' at row 1
File: /home/kitzco/public_html/forum/Sources/Subs-Post.php
Line: 1843

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.19, while your database is at version 2.0. The above error might possibly go away if you execute the latest version of upgrade.php.



Whilst looking through the error log (there was a looooong list so may have missed others) I spotted

QuoteDatabase Error: Incorrect key file for table './kitzco_forum2/smf_sessions.MYI'; try to repair it
File: /home/kitzco/public_html/forum/Sources/Load.php
Line: 2607

https://forum.kitz.co.uk/index.php?action=login2
Database Error: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_0900_ai_ci,COERCIBLE) for operation '='
File: /home/kitzco/public_html/forum/Sources/LogInOut.php
Line: 233


This forum has been operational since 2005 so has quite a large database size - too large for me to transger by phpmyadmin and I dont know how to use ssh. 

Im not a database expert.  I have recent diag with MS so not good when it come to typing and memory these days. So please be gentle with me and treat me like a n00b who doesnt know what they are doing.

Forum was running v 2.0.19 and I thought was up to date apart from some left over mobiqu stuff I couldnt get rid of from tapatalk and why I hadnt got around to upgrading to the new 2.1

Despite this I see the following

SMF File     Your Version     Current Version
SMF Package     SMF 2.0.19     SMF 2.1.4
Sources     2.0.12     2.1.4
Default Templates     2.0.19     2.1.4
Language Files     2.0.18     2.1.4
Current Templates     ??     ??

OK first things first,  running upgrade.php, can I just upload a upgrade.php file taken from the 2.0.19 package and run that without having to upload any other files from the package?


I really appreciate your help here.  TIA



----------------------------------------------------------------------------------------------------
Finally and as an aside

To make matters worse, since migrating to the new server (different IP) Im being bombarded with posts from China.  These are mostly being caught by bans placed over many years, but now they are spewing out several thousand per hour errors in the log files similar to:
Sorry Guest, you are banned from using this forum!
Beijing Spam BL7
This ban is not set to expire.
 

Doug Heffernan

Quote from: kitz on July 05, 2024, 02:21:29 PMMy hosts recently retired the server my forum ran on and supposedly migrated everything over to the new.

Have you run the What is repair_settings.php? after the move? If you haven't run it yet, is best to do so as it will update all paths and urls to point to the right locations.

Quote from: kitz on July 05, 2024, 02:21:29 PMDatabase Error: Incorrect key file for table './kitzco_forum2/smf_sessions.MYI'; try to repair it

This is what is causing the issues with the session. It looks like your server is running out of disk space where the /tmp folder is located. You must change its location to a location with a bigger disk space. That can be done in the MySQL's config file. Or the aforementioned location is corrupted.

Can you run this query and see if it would help?

REPAIR TABLE smf_sessions USE_FRM
Quote from: kitz on July 05, 2024, 02:21:29 PMIncorrect string value: '\xA349.34...' for column 'body' at row 1

You will need to change the database collection set to UTF-8. Foor more on the subject you can read here:

https://wiki.simplemachines.org/smf/UTF-8_Readme

Hope it helps.

Kindred

Looks like they did more than migrate servers...

They seem to have updated your database version, php version and probably changed the database collation

You need to convert to utf8 and probably upgrade...  the problem is -- your database collation dies not match the contents any more... and the forum is still looking for ISO instead of utf8


As for the bots... using the smf ban system is the wrong way to deal with them.  Block by user-agent in the htaccess file.
Сл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."

kitz

Thank you for your input

I've run repair_settings.php.  I dont think it changed anything as I did glance at the settings and paths soon after it was moved over.

QuoteIt looks like your server is running out of disk space where the /tmp folder is located.

The new server is supposed to have more disk space than the old.  :/

QuoteThat can be done in the MySQL's config file.

I cant seem to find the file which google tells me it should be in /etc/my.cnf or etc/mysql/my.cnf  Not that I'd know what I should edit in that file.  I have found some settings in WHM under Database Configuration that has some InnoDB, Heap and temp table size - again I havent a clue what I should be editing.  Bearing in mind the forum is on a subdomain of another user account both users are me its just the way the server is set. Me as owner, then the site and forum subdomain kept seperate.  If I know what Im asking for, I may be able to raise a ticket.  My hosts have let me down quite badly so far with the migration.    The site has been down more that up over the past week. I was kinda backed into a corner to shelling out shat what was supposed to be fully managed and they were supposed to deal with everything.  :(

QuoteYou will need to change the database collection set to UTF-8.;

The pound sign seems to be the only one that is giving me problems.  If anyone attempts to make apost with the £ sign then they will get a database error.  Any previous posts containing the £ symbol shows up as £

I dont think the old forum was UTF-8 with it having been up so long.  We are UK based so we need to use the £ symbol frequently.

The languages setting in SMF under Admin > Languages is showing as English  ISO-8859-1 en_US
It should be UK.  I have never installed any language packs.... but Im sure it said something like en_uk before :/
If I go to the default forum language, the only option is English.

Bearing in mind it wasnt UTF before the move, would changing to UTF8 fix the £ symbol error?    It concerns me that for some reason a lot of the sources files are showing as out of date  (see attached image) :(

I really do appreciate your help to try get me out of this mess.
Im about to try tackle some of these damn china bots that are hitting the server several thousand per hour. 

Kindred

Well, yes, If you are on any 2.0.x version, you are not up to date.
2.1.4 is the current version.


Upgrading to 2.1.4 may fix your utf8 problem.
Сл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."

Advertisement: