turncate sessions_table via CRON JOB

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Alex Zuyev
Registered User
Posts: 32
Joined: Sun Dec 28, 2003 1:47 pm
Location: Moscow

turncate sessions_table via CRON JOB

Post by Alex Zuyev »

Will anyone help me to make a line for a cron job so sessions_table will turncate automatically? I shall set it in my cPanel. Thanx a lot!

Now I have only

Code: Select all

mysqlcheck --repair --analyze --optimize --phpbb --table-phpbb_sessions --auto-repair --user=*** --password=***
and it is not solving the problem.
Best wishes,

Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Post by espicom »

If you have the table set to type "myisam" instead of type "heap", you don't have to worry about the table size... The code you've posted only does a repair on the table, which heap tables don't support anyway.

To trunctate it, you need to send the following SQL statements to the database:

Code: Select all

use mydatabase;
truncate table phpbb_sessions;
You would, of course, substitute your database and table name information for "mydatabase" and "phpbb_sessions". Or the PHP script found in Script to clear/alter sessions table would work, too.
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer


Return to “2.0.x Support Forum”