Top Hosting Forum

WebHosting Reviews Forum


Budget DirectAdmin hosting and domain names

phpbb_sessions is marked as crashed and should be repaired

Website Development is a general forum for Website Development related issues including questions on codes such as PHP, HTML and Javascript
Hosting Forum Description
Website Development is a general forum for Website Development related issues including questions on codes such as PHP, HTML and Javascript

phpbb_sessions is marked as crashed and should be repaired

Postby hostingforum » Tue Nov 20, 2012 10:44 am

This guide shows how to fix this PHPBB error and how to setup cronjob to repair mysql table automatically :yes

General Error
SQL ERROR [ mysql4 ]

Table './databasename/phpbb_sessions' is marked as crashed and should be repaired [145]

An sql error occurred while fetching this page. Please contact an administrator if this problem persists.


Experienced this error? It may indicate mysql service crashed or something and as a cause table phpbb_sessions in your mysql crashed and need to be fixed.
To fix this mysql table, go to your hosting control panel and launch mysql viever like phpmyadmin. Then find your phpbb forum database. Find table phpbb_sessions and tick the tickbox next to it. Then scroll down and find action: Repair table

If this happen frequently, contact your hosting provider. I also added this cronjob to my hosting control panel to run every 10 minutes:
/usr/bin/wget -q -O - "http://mydomain.com/cron_to_optimise_table.php"

Content of the php file:

Code: Select all
<?php

mysql_connect("localhost", "databaseusernamehere", "passwordtodbhere") or die(mysql_error());
mysql_select_db("databasenamehere") or die(mysql_error());
mysql_query("REPAIR TABLE `phpbb_sessions`, `phpbb_cache`");
mysql_query("OPTIMIZE TABLE `phpbb_posts`, `phpbb_sessions`");

?>


So it repairing two tables and optimising two..

Does anyone have better idea or tweak?



Ad: There You can have your forum site-wide banner/text ad for $99 yearly. Contact admin


User avatar
hostingforum
Site Admin
 
Posts: 656
Joined: Fri May 20, 2011 7:58 pm
Location: Czech Republic

Return to General Website Development & Programming

Who is online

Users browsing this forum: No registered users and 0 guests

.

cron