XF 2.2 I have a huge problem !!!!

ScrapDog

Member
After updating my xenforo to v2.2.7 Patch 1, i get the following message:

Naamloos.png

An exception occurred: [XF\Db\Exception] MySQL statement prepare error [144]: Table './xenforo/xf_session' is marked as crashed and last (automatic?) repair failed in src/XF/Db/AbstractStatement.php on line 230

  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 198
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 41
  3. XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 56
  4. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
  5. XF\Db\AbstractAdapter->query() in src/XF/Session/DbStorage.php at line 57
  6. XF\Session\DbStorage->writeSession() in src/XF/Session/Session.php at line 217
  7. XF\Session\Session->save() in src/XF/Pub/App.php at line 462
  8. XF\Pub\App->complete() in src/XF/App.php at line 2348
  9. XF\App->run() in src/XF.php at line 512
  10. XF::runApp() in index.php at line 20

I have downloaded the full version again and installed the whole xenforo list. After that i get the same problems, except i can login again to the admin panel.
Can someone help me please to fix this issue !

Sincerely,

ScrapDog
 

Chris D

XenForo developer
Staff member
This is an issue with one of your MySQL tables, specifically the xf_session table. This is more of a server issue so you may want to discuss with your host.

If you have access to your database through PhpMyAdmin or similar then you may want to try clicking the “Repair” option against that table or clicking the “Empty“ or “Truncate” option.

If you don’t have access to do this then your host should be able to help.
 

Chris D

XenForo developer
Staff member
If you click on the table to view its contents, there should be an option to "Empty" the table (if I'm remembering correctly).

Failing that, you may need to delete and recreate the table which you can do by running the following queries:

SQL:
DROP TABLE xf_session;

SQL:
CREATE TABLE `xf_session` (
  `session_id` varbinary(32) NOT NULL,
  `session_data` mediumblob NOT NULL,
  `expiry_date` int unsigned NOT NULL,
  PRIMARY KEY (`session_id`),
  KEY `expiry_date` (`expiry_date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
 

ScrapDog

Member
Hello Chris,

thank you so very much for the help. It finally worked by the second option.
I am very glad it is saved.

But what can be the cause of this error, i like to know so i can prevent having another error like this....

thanks again,

sincerely,

ScrapDog
 
Top