FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » FUD files exist, database doesn't
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
FUD files exist, database doesn't [message #34244] Sun, 15 October 2006 18:42 Go to next message
seagull is currently offline  seagull   Netherlands
Messages: 10
Registered: January 2006
Location: Holland
Karma: 0
Junior Member
Hi,

Not sure if this is the correct place for this, so if not, sorry.

I recently ran the upgrade script for the 2.7.6 release. Everything went fine. Yesterday though I started to get the following error:
UNABLE TO WRITE TO SQL LOG FILE
(/3kompanie.org/public_html/forum/index.php:19
) :
Query: Initiating mysql_connect
Server Version: Unknown


Checking this I find out that the database is 0kb in size and has -1 users. All of the FUD files are there, along with the fudforum_archive that was created during the upgrade.

So it looks like I'll have to create the database from scratch. And to make it a real challenge there's no data dump of the MySQL database.

Is there a way to create the tables (maybe using that part of the install script) and then populate the tables with the existing data from the FUD files (maybe a check consistency or something)?

If this seems like clutching at straws ... it is !! Sad

Cheers
Chris
Re: FUD files exist, database doesn't [message #34262 is a reply to message #34244] Mon, 16 October 2006 13:40 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You can try to re-run the upgrade script.

FUDforum Core Developer
Re: FUD files exist, database doesn't [message #34270 is a reply to message #34262] Mon, 16 October 2006 19:41 Go to previous messageGo to next message
seagull is currently offline  seagull   Netherlands
Messages: 10
Registered: January 2006
Location: Holland
Karma: 0
Junior Member
Tried that. Turns out that the database really doesn't exist anymore. Soemthing went terribly wrong when the admins moved the forum to a different server.

Anyway I'm left with having to create the database again and creating the tables from scratch.
Re: FUD files exist, database doesn't [message #34278 is a reply to message #34270] Tue, 17 October 2006 15:36 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
In this case your best bet is to simply re-install the forum.

FUDforum Core Developer
Re: FUD files exist, database doesn't [message #34279 is a reply to message #34278] Tue, 17 October 2006 15:47 Go to previous messageGo to next message
seagull is currently offline  seagull   Netherlands
Messages: 10
Registered: January 2006
Location: Holland
Karma: 0
Junior Member
That's what I thought. Teach me not to have a database backup. Sad

Anyway, I installed new and used the import forum datadump to set everything back. This seems to have worked (at least the messages are in the messages dir and the database contains what it's supposed to. Unfortunately when I tried to run the consistency checker I can't login in. admlogin gives me the Only administrators with proper access credentials can login via this control panel error. Yet the password is correct.

Cookies are being set in the correct place. At the moment I can't login to the admin control panel and the forum is disabled.

Any hints greatly appreciated. Smile

Chris
Re: FUD files exist, database doesn't [message #34282 is a reply to message #34279] Tue, 17 October 2006 15:55 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You need to use the admin account from the original forum, as all the users were replaced with the ones from the data dump.

FUDforum Core Developer
Re: FUD files exist, database doesn't [message #34287 is a reply to message #34282] Tue, 17 October 2006 21:34 Go to previous messageGo to next message
seagull is currently offline  seagull   Netherlands
Messages: 10
Registered: January 2006
Location: Holland
Karma: 0
Junior Member
I changed the admin password and checked that it worked by getting me into the admin control panel. Then I did the datadump. When I came to do the import everything went fine until the end.
Processed 10000 queries
Processed 20000 queries
Processed 30000 queries
Processed 40000 queries
Processed 50000 queries
Processed 60000 queries
Processed 70000 queries
Your current login (admin) is not found in the imported database.
Therefor you'll need to re-login once the import process is complete
Recompiling Templates
Correcting Avatar Paths
Correcting Attachment Paths
Import process is now complete
To finalize the import process you should now run the consistency checker.


I even made sure that the admin password on the new installation was the same as on the old installation.

No matter what password I use I still can't get in and the forum is disabled.

[Updated on: Tue, 17 October 2006 21:34]

Report message to a moderator

Re: FUD files exist, database doesn't [message #34295 is a reply to message #34287] Wed, 18 October 2006 13:44 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Can select the users_opt column from the users table for the user that is supposedly an admin and post its value here?

FUDforum Core Developer
Re: FUD files exist, database doesn't [message #34300 is a reply to message #34295] Wed, 18 October 2006 14:13 Go to previous messageGo to next message
seagull is currently offline  seagull   Netherlands
Messages: 10
Registered: January 2006
Location: Holland
Karma: 0
Junior Member
The users_opt value is 0.
Re: FUD files exist, database doesn't [message #34316 is a reply to message #34300] Fri, 20 October 2006 01:08 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
This is why, it does not work, value of 0 effectively means no access. Can you see if any users have users_opt field matching the following bitmask.

You can get this information by running a query such as this:

SELECT * FROM fud26_users WHERE users_opt & 1048576;


FUDforum Core Developer
Re: FUD files exist, database doesn't [message #34320 is a reply to message #34316] Fri, 20 October 2006 10:39 Go to previous messageGo to next message
seagull is currently offline  seagull   Netherlands
Messages: 10
Registered: January 2006
Location: Holland
Karma: 0
Junior Member
Yes, there are several users with users_opt returned after running the query. The values of the users_opt are anything from -1858780027 to 1389967628. There doesn't seem to be any pattern to the value, or who has a none 0 entry.

If I try to log in as one of these users I get a fatal error message:
Fatal error: SQL Error has occurred, please contact the administrator of the forum and have them review the forum's SQL query log in /home/eme85/domains/85eme.org/FUD/include/core.inc on line 188


I can't look at the query log because the files are 'locked' and I don't have rights to view them. I'm looking at a way of 'unlocking' the files so that I can do some more investigation.

[Updated on: Fri, 20 October 2006 10:39]

Report message to a moderator

Re: FUD files exist, database doesn't [message #34324 is a reply to message #34320] Fri, 20 October 2006 14:16 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
To view the file simply make a small PHP script that'll readfile() the file or make the script chmod the file 666

FUDforum Core Developer
Re: FUD files exist, database doesn't [message #34341 is a reply to message #34324] Sun, 22 October 2006 08:26 Go to previous messageGo to next message
seagull is currently offline  seagull   Netherlands
Messages: 10
Registered: January 2006
Location: Holland
Karma: 0
Junior Member
Okay, I did that and can now view the error directory.

In the sql_errors file I can see an entry saying (I removed the http part of the error lines)
[Referring Page] ..../adm/admloginuser.php?S=&SQ=0
?819 ?1161336543?(FUD/include/theme/default/db.inc:72
FUD/include/theme/default/users.inc:798
FUD/include/theme/default/users_reg.inc:267
..../forum/adm/admloginuser.php:22
) 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 fud26_users SET sq='4e2a692c8cfcc20b7a77f17bb911bf35' WHERE id=
_POST: array ( 'S' => '', 'SQ' => '0', 'login' => 'admin', 'passwd' => 'MyPassWd', 'btn_login' => 'Login', )
Server Version: 4.1.11-standard
[Referring Page] http://myforum/forum/adm/admloginuser.php?S=&SQ=0


Looking at the 1064 error for MySQL hints at some sort of version change between the backup and the new situation. I'm going ot investigate that, but if you see anything else that may give me a clue as to what's happening please let me know.

Cheers
Chris
Re: FUD files exist, database doesn't [message #34356 is a reply to message #34341] Sun, 22 October 2006 22:12 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The query had failed because the user id field value is missing from the query.

A fix for this can be found in the CVS, you can apply the patch on the users_reg.inc file
http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=11635


FUDforum Core Developer
Re: FUD files exist, database doesn't [message #34370 is a reply to message #34356] Tue, 24 October 2006 13:47 Go to previous messageGo to next message
seagull is currently offline  seagull   Netherlands
Messages: 10
Registered: January 2006
Location: Holland
Karma: 0
Junior Member
Okay, thanks for that. I at least get a bit further along.

Now I'm getting a different error. Basically it's saying one of the tables doesn't exist, yet I know it does and have browsed the contents using phpMyAdmin.

?1228 ?1161695374?(/.../public_html/forum/index.php:75
/.../public_html/forum/index.php:175
/.../public_html/forum/index.php:274
/.../public_html/forum/index.php:946
/.../public_html/forum/index.php:1141
) 1146: Table 'eme85_rdl.fud26_ses' doesn't exist
Query: SELECT s.id AS sid, s.ses_id, s.data, s.returnto, s.sys_id, t.id AS theme_id, t.lang, t.name AS theme_name, t.locale, t.theme, t.pspell_lang, t.theme_opt, u.alias, u.posts_ppg, u.time_zone, u.sig, u.last_visit, u.last_read, u.cat_collapse_status, u.users_opt, u.topics_per_page, u.ignore_list, u.ignore_list, u.buddy_list, u.id, u.group_leader_list, u.email, u.login, u.sq, u.ban_expiry, u.flag_cc FROM fud26_ses s INNER JOIN fud26_users u ON u.id=(CASE WHEN s.user_id>2000000000 THEN 1 ELSE s.user_id END) INNER JOIN fud26_themes t ON t.id=u.theme WHERE s.ses_id='cd38a0d50d497d44b49a76c316a7ef55' AND s.time_sec > 1161677374
_GET: array ( 't' => 'msg', 'S' => 'cd38a0d50d497d44b49a76c316a7ef55', 'th' => '213', 'goto' => '2807', )
Server Version: 4.1.11-standard


Re: FUD files exist, database doesn't [message #34372 is a reply to message #34370] Tue, 24 October 2006 14:34 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Does the table exist in the "eme85_rdl" database? If it does perhaps the table is corrupt you can try to repair it using "REPAIR TABLE fud26_users" command. If it is fine, you may need to check MySQL permissions to ensure that the user account you are using has access to this table.

FUDforum Core Developer
Re: FUD files exist, database doesn't [message #34373 is a reply to message #34370] Tue, 24 October 2006 14:35 Go to previous message
seagull is currently offline  seagull   Netherlands
Messages: 10
Registered: January 2006
Location: Holland
Karma: 0
Junior Member
Okay the above error seems to have been resolved (Repair seems to have done the trick). However I'm still unable to login as admin and no errors are generated in the error files, or shown on the browser.

[Updated on: Tue, 24 October 2006 14:36]

Report message to a moderator

  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: error after install GLOBALS.php
Next Topic: Can't login after upgrade
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 20:55:44 GMT 2024

Total time taken to generate the page: 0.02483 seconds