Fatal error: SQL Error has occurred [message #21592] |
Mon, 06 December 2004 12:15 |
srchild
Messages: 88 Registered: December 2003 Location: UK
Karma: 1
|
Member |
|
|
Fatal error: SQL Error has occurred, please contact the administrator of the forum and have them review the forum's SQL query log in /usr/www/users/web/forum/index.php on line 59
Somehow I broke my forum, which I have just set up. I think what happened was this:
I was logged in as admin and viewing it in firefox. For some reason I fired up IE6 and got error as above. I remembered that last evening I tinkered with multihost setting and wondered if that was something to do with it, especially as I had seen a warning about sessions. Since I was logged in as admin in firefox I went to admin, switched off multi-host, and went to the consistency checker. That seemed to work fine.
But then I found that I got the same problem with both ie and firefox, and have continued getting it ever since. I also can't login to adm, same problem:
Fatal error: SQL Error has occurred, please contact the administrator of the forum and have them review the forum's SQL query log in /usr/www/users/web/FUDforum/include/theme/default/db.inc on line 56
Here is the first sql error message that occurred:
Mon Dec 6 10:46:35 GMT 2004 (/usr/www/users/web/forum/index.php:126
/usr/www/users/web/forum/index.php:350
/usr/www/users/web/forum/theme/default/index.php:80
/usr/www/users/web/forum/index.php:1164
) 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Query: UPDATE fud_ses SET sys_id='', forum_id=0, time_sec=1102329995, action='Browsing the <a href=\"index.php?t=index\">forum list</a>', returnto='' WHERE id=
Server Version: 4.0.17-log
Subsequent errors are all similar.
Why is the id empty on the end of that query?
I have tried clearing sessions file.
Using 2.6.8 latest stable version.
Suggestions please!
Simon Child
|
|
|
|
|
|
Re: Fatal error: SQL Error has occurred [message #21615 is a reply to message #21614] |
Mon, 06 December 2004 19:08 |
srchild
Messages: 88 Registered: December 2003 Location: UK
Karma: 1
|
Member |
|
|
Ilia wrote on Mon, 06 December 2004 18:53 | Do you have multiple themes on that forum?
|
No, just the default. One or two minor changes to the templates, but not changed those in the last few days.
Simon Child
|
|
|
Re: Fatal error: SQL Error has occurred [message #21616 is a reply to message #21615] |
Mon, 06 December 2004 19:18 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
If you still have an admin login to the forum, can you go into the theme manager and check to make sure that @ least one theme is enabled and set to default.
If you do not check the forum's themes table and let me know what's in it.
FUDforum Core Developer
|
|
|
Re: Fatal error: SQL Error has occurred [message #21617 is a reply to message #21616] |
Mon, 06 December 2004 19:43 |
srchild
Messages: 88 Registered: December 2003 Location: UK
Karma: 1
|
Member |
|
|
Ilia wrote on Mon, 06 December 2004 19:18 | If you still have an admin login to the forum, can you go into the theme manager and check to make sure that @ least one theme is enabled and set to default.
If you do not check the forum's themes table and let me know what's in it.
|
If I go to http://www.mydomain.com/forum/adm I get redirected to a login form at http://www.mydomain.com/forum/adm/admloginuser.php?rid=
If I enter invalid login data then of course I get rejected:
Only administrators with proper access credentials can login via this control panel
If I enter the valid admin id and password then I get:
Fatal error: SQL Error has occurred, please contact the administrator of the forum and have them review the forum's SQL query log in /usr/www/users/web/FUDforum/include/theme/default/db.inc on line 56
mysql> select * from fud_themes;
+----+---------+-----------+---------+--------+-------------+-----------+
| id | name | theme | lang | locale | pspell_lang | theme_opt |
+----+---------+-----------+---------+--------+-------------+-----------+
| 1 | default | path_info | english | C | en | 7 |
+----+---------+-----------+---------+--------+-------------+-----------+
1 row in set (0.00 sec)
Thanks for helping out here. I do have a fallback position. The forum hasn't gone live yet so the only data in the forum is my imported archives, so I could reinstall and reimort. But it would be nice to know what happened here so it doesn't happen again... (and what to do if it does!).
Simon Child
|
|
|
|
Re: Fatal error: SQL Error has occurred [message #21622 is a reply to message #21621] |
Mon, 06 December 2004 21:55 |
srchild
Messages: 88 Registered: December 2003 Location: UK
Karma: 1
|
Member |
|
|
Ilia wrote on Mon, 06 December 2004 21:50 | Could you please tell me what the following query returns:
SELECT theme FROM fud_users;
|
1
(ps I realised that I said there is only one user. In fact there is only the one user that I have setup, an admin, but of course importing an archive has autocreated lots of users, but they do not have valid email addresses or passwords yet, and I have not been trying to login as them. They also all have theme set to 1.)
Simon Child
|
|
|
|
Re: Fatal error: SQL Error has occurred [message #21624 is a reply to message #21623] |
Mon, 06 December 2004 22:22 |
srchild
Messages: 88 Registered: December 2003 Location: UK
Karma: 1
|
Member |
|
|
Ilia wrote on Mon, 06 December 2004 22:01 | Does your forum have a user with an ID of 1?
That should be the anonymous user, what is the theme id for that user?
|
Ah, er, um. Looks like I deleted the anonymous user when I was clearing out my users...
mysql> select * from fud_users where id='1';
Empty set (0.00 sec)
I cleared out the users (except for admin) since they got messed up when I was experimenting with importing my mailing list archives. Maybe I shouldn't have done that...
Simon Child
|
|
|
Re: Fatal error: SQL Error has occurred [message #21625 is a reply to message #21624] |
Mon, 06 December 2004 22:26 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
There is the cause of your problem. That user is absolutely necessary for the forum's proper operation.
You can re-create that user based on the query inside def_users.sql file found inside the sql/ directory.
FUDforum Core Developer
|
|
|
Re: Fatal error: SQL Error has occurred [message #21626 is a reply to message #21625] |
Mon, 06 December 2004 22:34 |
srchild
Messages: 88 Registered: December 2003 Location: UK
Karma: 1
|
Member |
|
|
Ilia wrote on Mon, 06 December 2004 22:26 | There is the cause of your problem. That user is absolutely necessary for the forum's proper operation.
You can re-create that user based on the query inside def_users.sql file found inside the sql/ directory.
|
OK, I have done that. But the anonymous user now has an id of 1605 (since it is an autonumber column, so I can't reclaim id #1).
I still can't see the forum, nor login at /adm
Do I have to propagate this new anonymous user id of 1605 to any other tables??
Simon Child
|
|
|
|
|