HostwareSupport-Linux Hosting technical support for cPanel, Plesk, Directadmin servers

Linux Hosting technical support for cPanel, Plesk, Directadmin and No control panel servers offers and listing
http://hostwaresupport.com/

Dec 9, 2011

phpBB SQL Error - 'phpbb_sessions' is marked as crashed and should be repaired

General errorL
SQL ERROR [ mysqli ]


Table './mysql/phpbb_login_attempts' is marked as crashed and should be repaired [145]
**********************************************************************

Recently, my phpBB forum encountered a SQL error, shown below:
'phpbb_sessions' is marked as crashed and should be repaired [145]
The first thing that I did was to access phpMyAdmin to try an repair the table with the SQL command:
REPAIR TABLE 'phpbb_sessions'
Unfortunately, that does not work. I did some research online and finally, I managed to resolve the issue. It takes a bit of tweaking nonetheless, but it's a fairly simple procedure.
Solution to Resolve phpBB error
If you have access to phpMyAdmin application, under cPanel (from your web hosting service provider), then it would make things a lot simpler.
  1. Under your control panel , click on phpMyAdmin icon.
Select your phpBB database, and then click on the "xxx_sessions", where "xxx" represents your phpBB database suffix (In my example, my prefix is phpbb).
php Sessions

Next, click on SQL, located that top of the phpMyAdmin application. This will then open up the dialog box.
phpMyAdmin SQL

  1. In the dialog box (shown below), type in the following SQL command.
    SQL Dialog box
    SQL Code Below
    DROP TABLE IF EXISTS phpbb_sessions;
    CREATE TABLE phpbb_sessions (
    session_id binary(32) DEFAULT '' NOT NULL,
    session_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
    session_forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
    session_last_visit int(11) UNSIGNED DEFAULT '0' NOT NULL,
    session_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
    session_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
    session_ip varbinary(40) DEFAULT '' NOT NULL,
    session_browser varbinary(150) DEFAULT '' NOT NULL,
    session_forwarded_for varbinary(255) DEFAULT '' NOT NULL,
    session_page blob NOT NULL,
    session_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
    session_autologin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
    session_admin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
    PRIMARY KEY (session_id),
    KEY session_time (session_time),
    KEY session_user_id (session_user_id),
    KEY session_fid (session_forum_id)
    );
  2. The above code will typically delete the 'phpbb_sessions' table and re-create a new one.
After you have completed the above procedure, you should see no error on the phpBB Forums now.
Fixed..!
***************************************************************************************************************************

6 comments:

  1. A gigantic moonlike of recommendation, keep moving on.

    Look for Kinken Hikaku

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Nice Post. Thanks for sharing informative Post. For More New Science, Internet and Marketing Blogs Check Out additional hints reseller web hosting offers.

    ReplyDelete
  5. Only aspire to mention ones content can be as incredible. This clarity with your post is superb and that i may think you’re a guru for this issue. High-quality along with your concur permit me to to seize your current give to keep modified by using approaching blog post. Thanks a lot hundreds of along with you should go on the pleasurable get the job done. microsoft web hosting small business

    ReplyDelete
  6. There are a lot of blogs over the Internet. But I can surely say that your blog is amazing in all. It has all the qualities that a perfect blog should have. webhosting

    ReplyDelete