Incorrect file format 'smf_sessions'

Started by reddriver, May 06, 2018, 04:45:28 AM

Previous topic - Next topic

reddriver

Hello,
I need help with my forum. the other day the server where i host my site faced problem and went down for 24 h ( power off ) and when they fixed it I found that my forum have problem , give this error Incorrect file format 'smf_sessions'. I contacted my host and they said that db corrupted due down time , they tried to fix it and they did and forum was back online but when I did login I found that I can't see any posts or threads in the forum, when check the boards it's show that there are threads but when open each board then nothing, also I noticed many smiles gone too , it's different images now.
any help or suggestion how fix it ?
P.S. I dont have backup , only old one
thanks in advance

Illori

which version of SMF are you using? any errors in the error log?


vbgamer45

Try to repair your smf_messages table. If not ask if your host has a backup. Did you see any errors in your forum's error log?
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

reddriver

Quote from: vbgamer45 on May 06, 2018, 10:17:14 AM
Try to repair your smf_messages table. If not ask if your host has a backup. Did you see any errors in your forum's error log?
what's you means ? because after downtime they repaired db and I get forum online but without posts or threads .
you means try another repair of  smf_messages table ?
I dont have any backup , or better any new one

Illori

then ask them what exactly they did, it sounds like they have removed the content from that table. if they did that will show what you are seeing. so you would need to restore a backup.

reddriver

Quote from: Illori on May 06, 2018, 11:20:27 AM
then ask them what exactly they did, it sounds like they have removed the content from that table. if they did that will show what you are seeing. so you would need to restore a backup.
they said they repaired smf_messages table.
now I will try repair db with phpmyadmin
btw I should start with repair or better try first optimize tables ?

Shambles

Quote from: reddriver
they said they repaired smf_messages table.
now I will try repair db with phpmyadmin

Use this as a query within phpmyadmin to rebuild the index schema

repair table smf_messages use_frm

reddriver


reddriver

Quote from: Shambles on May 06, 2018, 12:36:04 PM
Quote from: reddriver
they said they repaired smf_messages table.
now I will try repair db with phpmyadmin

Use this as a query within phpmyadmin to rebuild the index schema

repair table smf_messages use_frm

what's you means ?
I use it with corrupt db or with the that host fixed ( with no posts ) ?

vbgamer45

That's alot of errors. Occurs if server is shutoff for no reason at some point Hopefully you have backups
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

reddriver

Quote from: vbgamer45 on May 06, 2018, 12:53:23 PM
That's alot of errors. Occurs if server is shutoff for no reason at some point Hopefully you have backups
yes this is what I said and as I said I dont have backup
there is away to repair it ? I have old db so I can replace tables from old db ?
I don't want loss years of work

Shambles

Quote from: Shambles on May 06, 2018, 12:36:04 PM

Quote from: reddriver
now I will try repair db with phpmyadmin

Use this as a query within phpmyadmin to rebuild the index schema

repair table smf_messages use_frm


Did you try that?

reddriver

Quote from: Shambles on May 06, 2018, 01:18:58 PM
Quote from: Shambles on May 06, 2018, 12:36:04 PM

Quote from: reddriver
now I will try repair db with phpmyadmin

Use this as a query within phpmyadmin to rebuild the index schema

repair table smf_messages use_frm


Did you try that?

no, how to use ? where I put it ?

reddriver

ok I did
repair table smf_collapsed_categories use_frm;
repair table smf_log_notify use_frm;
repair table smf_log_topics use_frm;
repair table smf_members use_frm;
repair table smf_poll_choices use_frm;
repair table smf_sessions use_frm;

now forum is online but when I try view any board I get this
Got error 21 from storage engine
File: /home/xxxx/domains/domain.com/public_html/Sources/MessageIndex.php
Line: 400

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

Shambles

Quotenow I will try repair db with phpmyadmin

How did you intend to do that?

Login to your phpmyadmin, select your database on the left, click the "SQL" tab, then enter that query into the "Run SQL query/queries on database" box, then click "Go"



Repeat what you did for the smf_messages table.

You may need to rebuild the indexes for all the other tables too.

reddriver

Quote from: Shambles on May 06, 2018, 01:59:18 PM
Quotenow I will try repair db with phpmyadmin

How did you intend to do that?

Login to your phpmyadmin, select your database on the left, click the "SQL" tab, then enter that query into the "Run SQL query/queries on database" box, then click "Go"



Repeat what you did for the smf_messages table.

You may need to rebuild the indexes for all the other tables too.

I did repair table smf_messages use_frm;
and nothing change , forum is online but as I said before I got this error when try open any board
Got error 21 from storage engine
File: /home/xxxx/domains/domain.com/public_html/Sources/MessageIndex.php
Line: 400

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

Shambles

As I said, you may have to repeat the schema fix.

Try smf_log_mark_read next

reddriver

Quote from: Shambles on May 06, 2018, 02:07:04 PM
As I said, you may have to repeat the schema fix.

Try smf_log_mark_read next
sorry I'm not expert in all this
you means I must do again
repair table smf_collapsed_categories use_frm;
repair table smf_log_notify use_frm;
repair table smf_log_topics use_frm;
repair table smf_members use_frm;
repair table smf_poll_choices use_frm;
repair table smf_sessions use_frm;
repair table smf_messages use_frm;
and add also this comand too ?
repair table smf_log_mark_read;
thanks to help me

Shambles

I'm just looking at my copy of MessageIndex.php and working out which tables might be around your line 400

Yes, do all the tables in your database, starting with smf_log_mark_read (no need to repeat the ones you've already done)

reddriver

done but the same , anyway when check administrator center and check update I got this
This package is already installed, and no upgrade was found!

You should uninstall the old version first to avoid problems, or ask the author to create an upgrade from your old version.

Please remember to always make regular backups of your sources and database before installing mods, especially beta versions.

Error in Package Installation

Aleksi "Lex" Kilpinen

In PhpMyadmin - Select all the tables in the database, and run "Check table". Please post back the results.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

reddriver

Quote from: Aleksi "Lex" Kilpinen on May 06, 2018, 02:32:35 PM
In PhpMyadmin - Select all the tables in the database, and run "Check table". Please post back the results.
after I did all query, I did check like you asked and give all OK except http://prntscr.com/jehuxo 

Aleksi "Lex" Kilpinen

Ok, select only the table smf_log_topics and try running repair table on it once more, and let us know the result.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

reddriver

Quote from: Aleksi "Lex" Kilpinen on May 06, 2018, 02:43:24 PM
Ok, select only the table smf_log_topics and try running repair table on it once more, and let us know the result.
when try select it I get this error http://prntscr.com/jei0bi
btw I should run this query:
SELECT * FROM `smf_log_topics` WHERE 1
repair table;

Aleksi "Lex" Kilpinen

Contact your host, ask them to look in to that error. That is probably not something you will be able to fix yourself.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

reddriver

Quote from: Aleksi "Lex" Kilpinen on May 06, 2018, 02:56:06 PM
Contact your host, ask them to look in to that error. That is probably not something you will be able to fix yourself.
ok and what about db error upgrade ?

Aleksi "Lex" Kilpinen

Quote from: reddriver on May 06, 2018, 02:59:40 PM
Quote from: Aleksi "Lex" Kilpinen on May 06, 2018, 02:56:06 PM
Contact your host, ask them to look in to that error. That is probably not something you will be able to fix yourself.
ok and what about db error upgrade ?
You can simply ignore the database version error.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

reddriver

ok thanks for the help guys :)
I sent ticket to host , wait a replay
will be back with them answer

Shambles

#29
I'll never understand why forum owners/controllers don't take regular DB backups  :o

It's so important to not leave it upto their host.

vbgamer45

Yeah.  I might make a mod to auto do it...
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

Illori

do keep in mind that the backup in SMF is not reliable and has created partial backup's without any notice to the person running the backup.

Aleksi "Lex" Kilpinen

I have a the option on my server to get automated backups of everything - files, settings and databases -  I have it running every couple of days, and try to remember to download the latest backups offsite at least weekly. It's pretty handy, as it offers everything in one package that can be extracted with 7zip to a be a mirror of the server folder structure. Many hosts offer something similar these days, for free even - so might be something to consider in the future.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

reddriver

they fixed that table , now I can view boards but I can't see any threads or posts .
forum keep show that there are threads and posts but when open any board I can't see nothing

http://prntscr.com/jenrfw

http://prntscr.com/jenrs3

Aleksi "Lex" Kilpinen

If all the tables are now OK according to MySQL, then it is more than likely that you are facing a scenario where your only options are to revert to a backup or start fresh. But first, you may want to go through all the tables one at a time once more, run a check on them, and see if they actually hold data or not. Specifically smf_messages should have all the posts of your forum in it. If everything seems ok on that side, backup everything, and run all the routine maintanence options in SMF admin panel. That might help, or make things worse, hence the backup.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

reddriver

Quote from: Aleksi "Lex" Kilpinen on May 07, 2018, 02:24:20 AM
If all the tables are now OK according to MySQL, then it is more than likely that you are facing a scenario where your only options are to revert to a backup or start fresh. But first, you may want to go through all the tables one at a time once more, run a check on them, and see if they actually hold data or not. Specifically smf_messages should have all the posts of your forum in it. If everything seems ok on that side, backup everything, and run all the routine maintanence options in SMF admin panel. That might help, or make things worse, hence the backup.

how I can check one by one tables ?
I selected all tables and run check and gave me all OK

Aleksi "Lex" Kilpinen

Well, that works too - but then check if you see the posts inside smf_messages. Or is the table really empty, so no posts to show.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

reddriver

when I check it I see only this http://prntscr.com/jeohtq
only 2 posts which I made after forum go online
what's means this ?

Aleksi "Lex" Kilpinen

That would be a strong indication that you cannot recover from this without reverting to a backup.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

reddriver

Quote from: Aleksi "Lex" Kilpinen on May 07, 2018, 04:27:56 AM
That would be a strong indication that you cannot recover from this without reverting to a backup.
I dont have one , I have very old one
maybe I fixed wrong the table.
possible there is no way to fix it manually , or check where is wrong in it an replace it from old db ?

Aleksi "Lex" Kilpinen

I'm sorry -Best I can offer is a suggestion to ask your host if they have a backup they can roll you back to.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

reddriver

Quote from: Aleksi "Lex" Kilpinen on May 07, 2018, 02:14:16 PM
I'm sorry -Best I can offer is a suggestion to ask your host if they have a backup they can roll you back to.
no they dont have

Kindred

you don't seem to understand....   that table *IS* the contents.

You can either retsore form your old backup or restart the forum with no contents.

There is no way to recover the messages if they are missing from the table.

and, restoring the messages table from the old backup is extremely difficult, because messages tie into multiple tables - and restoring JUST the messages table will put your forum in a bad state because of missing references in other tables.
Сл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: