[Solved] I need help fast. Critical Error.

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
rfournier13
Registered User
Posts: 84
Joined: Fri Oct 04, 2002 12:55 am

[Solved] I need help fast. Critical Error.

Post by rfournier13 »

I just opened my board to students at the school I graduated as a help forum (go figure) and not I am getting this error.


phpBB : Critical Error
Error creating new session


I have no idea what to do, and I cant access any files. (I can get to them through ftp) but I dont know what to do with them.

What is MYadmin? Will that help? If someone could help me I would be very grateful. I would give a moderator my info if you could help me.
User avatar
primedomain
Former Team Member
Posts: 25944
Joined: Sat Dec 15, 2001 10:23 am

Post by primedomain »

Please enable debug mode and post the complete error message:
http://www.phpbb.com/phpBB/viewtopic.php?t=13308

If the error message is "The table 'phpbb_sessions' is full" , empty the table manually and/or install a fix (backup first!):
http://www.phpbb.com/phpBB/viewtopic.php?t=39397
rfournier13
Registered User
Posts: 84
Joined: Fri Oct 04, 2002 12:55 am

Post by rfournier13 »

Thanks, I read that post somewhere else.


I dont know how to enter debug mode.
User avatar
primedomain
Former Team Member
Posts: 25944
Joined: Sat Dec 15, 2001 10:23 am

Post by primedomain »

rfournier13
Registered User
Posts: 84
Joined: Fri Oct 04, 2002 12:55 am

Post by rfournier13 »

ok, if I seem pissy, its just stress. I am getting somewhere, so if this gets cleared up, I owe you a beer. :lol:


phpBB : Critical Error
Error creating new session
DEBUG MODE
SQL Error : 1114 The table 'phpbb_sessions' is full
INSERT INTO phpbb_sessions (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in) VALUES ('580af40e7cb38ddec98a022d66997fe7', 2, 1038077029, 1038077029, '927342f0', 0, 1)
Line : 152
File : /home/rfournier13/public_html/phpBB2/includes/sessions.php


This is the error
User avatar
primedomain
Former Team Member
Posts: 25944
Joined: Sat Dec 15, 2001 10:23 am

Post by primedomain »

primedomain wrote: As the error message is "The table 'phpbb_sessions' is full" , empty the table manually and/or install a fix (backup first!):
http://www.phpbb.com/phpBB/viewtopic.php?t=39397

:) :wink:
rfournier13
Registered User
Posts: 84
Joined: Fri Oct 04, 2002 12:55 am

Post by rfournier13 »

File : /home/rfournier13/public_html/phpBB2/includes/sessions.php



Can I just replace that file?
User avatar
primedomain
Former Team Member
Posts: 25944
Joined: Sat Dec 15, 2001 10:23 am

Post by primedomain »

?? Why do you want to replace that file? It's a database issue. The easiest way to fix is to install the fix mentioned in the other topic.
rfournier13
Registered User
Posts: 84
Joined: Fri Oct 04, 2002 12:55 am

Post by rfournier13 »

I dont understand how to do it, I know its laid out right in from of me, but its not making sense.

Thank you for being patient. :)


How can I back this up if I cant get into the site?

Which one is the fix?


This is all really new to me and I am really lost.
Last edited by rfournier13 on Sat Nov 23, 2002 6:59 pm, edited 1 time in total.
User avatar
primedomain
Former Team Member
Posts: 25944
Joined: Sat Dec 15, 2001 10:23 am

Post by primedomain »

open sessions.php with a text editor.

look for

Code: Select all

message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql); 
then replace the code by the follwing code:

Code: Select all

$error = TRUE; 
if (SQL_LAYER == "mysql" || SQL_LAYER == "mysql4") 

.... see details in the other topic....

      message_die(CRITICAL_ERROR, "Error creating new session", "", __LINE__, __FILE__, $sql); 
} 
save the file and re-uplaod it in ASCII. Before changing anything, make a copy of your current sessions.php
rfournier13
Registered User
Posts: 84
Joined: Fri Oct 04, 2002 12:55 am

Post by rfournier13 »

It happens to work again.....But I didnt update the sessions.php yet either.

Would you recommend updating it anyway?

do you use instant messanger? or if I PM'd you the site, Id like to send you my site address so maybe you could check it out?
User avatar
primedomain
Former Team Member
Posts: 25944
Joined: Sat Dec 15, 2001 10:23 am

Post by primedomain »

rfournier13 wrote: Would you recommend updating it anyway?
yes (or monitor the session table "manually" with your mySQL control panel, e.g. www.phpmyadmin.net (might be pre-installed). Please read the whole other topic, it explains pretty well why this happens.
rfournier13
Registered User
Posts: 84
Joined: Fri Oct 04, 2002 12:55 am

Post by rfournier13 »

so the code should read?

$sql = "INSERT INTO " . SESSIONS_TABLE . "
(session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in)
VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login)";
if ( !$db->sql_query($sql) )
{
$error = TRUE;
if (SQL_LAYER == "mysql" || SQL_LAYER == "mysql4")

.... see details in the other topic....

      message_die(CRITICAL_ERROR, "Error creating new session", "", __LINE__, __FILE__, $sql);
}


if ( $user_id != ANONYMOUS )
{// ( $userdata['user_session_time'] > $expiry_time && $auto_create ) ? $userdata['user_lastvisit'] : (
$last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time; [/b]
rfournier13
Registered User
Posts: 84
Joined: Fri Oct 04, 2002 12:55 am

Post by rfournier13 »

you probably got sick of my posts.... :lol:

Thanks for your help.
rfournier13
Registered User
Posts: 84
Joined: Fri Oct 04, 2002 12:55 am

Post by rfournier13 »

Prime Domain, or any admin, this is a response email I got from my Hosting Support.


apparently the table actually was created with a "max_rows" option set to 500 when created, limiting the database size to 28k.  I've increased it to 10000/500k, so that should fix you up just fine.  Maybe you should post the fix on their forum, since it is extremely simple. Just run this command:
alter table phpbb_sessions max_rows=10000;

You can set it to anything you want, (the table increases dynamically, so I'm not really certain what the point of limitting the size would be) but I think that 20x the old size should be OK for the near future.  Let me know if you have any other questions.


and

http://www.mysql.com/doc/en/Full_table.html


Where it says:
    * You are using MyISAM tables and the needed data or index size is bigger than what MySQL has allocated pointers for. (If you don't specify MAX_ROWS to CREATE TABLE MySQL will only allocate pointers to hold 4G of data). You can check the maximum data/index sizes by doing
      SHOW TABLE STATUS FROM database LIKE 'table_name';
      or using myisamchk -dv database/table_name. If this is the problem, you can fix it by doing something like:
      ALTER TABLE table_name MAX_ROWS=1000000000 AVG_ROW_LENGTH=nnn;
      You only have to specify AVG_ROW_LENGTH for tables with BLOB/TEXT fields as in this case MySQL can't optimise the space required based only on the number of rows.

So the problem was really how the table was created by phpBB2 as far as I can see.



So, by them allocating more space to the MAX ROWS, it solved my problem, but I am afraid it would be only temporary.

Can anyone shed some light on this or have an opinion on what they said?
Locked

Return to “2.0.x Support Forum”

cron