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?