News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

YABb 2.1 conversion errors

Started by vfrjon, August 06, 2008, 09:48:14 PM

Previous topic - Next topic

vfrjon

tried a couple of variations on this,
reset password via email (no email recieved, but thats a known issue!)
reset password with question
manually edit the database with new password (Guessing MD5, but tried a few others)
via SQL command on database as per above post. Note all my ID_MEMBER fields are null, so I tried with memberName = xyz as well

Still no login. Replies with security statement to renter password, then back to login screen.

Jon

SleePy

SMF should be able to detect the login from yabb (It has a password like abstraction array that can pickup other password formats to update them to its format).
If you just enter the password in plain text in the database, SMF can pick this up and update it to its method.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

vfrjon

Thats what I thought, but when I changed the password to "test" via the above methods (can see the change in the DB) it still wont allow me to login on either of my admin accounts.

SleePy

What version of PHP are you using?
Where you trying this on different browsers?
Is this on your local test site (ie localhost)?
Have you tried to change the cookiename (via settings.php)?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

vfrjon

What version of PHP are you using? Not sure. Its running on Powweb servers, so I imagine the latest.
Where you trying this on different browsers? Firefox and IE7
Is this on your local test site (ie localhost)? No, its in a temp folder on my site
Have you tried to change the cookiename (via settings.php)? Yes, just then. No change

SleePy

Most likely not the most recent versions, Most hosts don't stay on the very current versions.

Are you logging in using the top login box when it prompts the security message? It should be the one in the middle of the page that has the message.
The security login message gets prompted when you use the top login box as it uses prehashing which appears to be failing at the moment (due to it not using SMF password format).
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

vfrjon

Yes, using the one in the centre of the page, when I get these errors. Quicklog in also fails.

Do you want me to email some URL's and settings / passwords so you can take a look?

Jon

SleePy

No, Its something weird in the code then thats making it occur.

Open the /Sources/LogInOut.php

Find:
    // Figure out the password using SMF's encryption - if what they typed is right.
    if (isset($_REQUEST['hash_passwrd']) && strlen($_REQUEST['hash_passwrd']) == 40)


Replace:
    // Figure out the password using SMF's encryption - if what they typed is right.
    if (0 && isset($_REQUEST['hash_passwrd']) && strlen($_REQUEST['hash_passwrd']) == 40)


This will just disable login hashing forcefully in the code :P

Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

vfrjon

#28
After entering user name and password, it now sends me to password reminder options.
Selecting "secret question" options opens a new dialogue that states user is not known!

I am now out of login chances and will have to wait till later! Is there a quick way to reset this via DB perhaps?
Played with this a bit and now have found the code and changed it from 3 to 30 attempts ;) Replaced login code with original.

I noticed on the DB that all members have an ID_MEMBER = 0 . Is this correct?

Interesting......... I changed my ID_MEMBER to 1 ,  and I can now log in, but imediately get this error....

QuoteThe SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
File: mywebsite/htdocs/newforum/Sources/BoardIndex.php
Line: 84


I can get to the admin tab and settings now, but with the above error and no boards shown.

LogInOut.php restored to original, and I can now log in and get to the Admin tab. (Still with above error)
So, the only change I made that is still there, is to change ID_MEMBER to 1 for my login.

Changed my other admin account ID_MEMBER = 2 and I can login with that account now too.

Another test account I have (standard member to check admin and mod boards are hidden to general members) will only login if I give a unique ID_MEMBER number as well



SleePy

How many boards do you have?

Lets try this though
Admin -> Forum Maintenance
Run "Find and Repair Errors."
Then run "Recount Totals and Stats".

It could also be possible your host has turned down the max join size to something really small. Which would be stupid, but some hosts do these things :(
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

vfrjon

#30
Run "Find and Repair Errors."
Quote
Database Error
The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
File: mywebsite/htdocs/newforum/Sources/RepairBoards.php
Line: 809

"Recount Totals and Stats".

Hangs at 60%


Max join size is 7,000,000  (from variable list)


19 boards


SleePy

Ok, lets try this.
Open the /Sources/RepairBoards.php file

Find:
    $to_fix = !empty($_SESSION['repairboards_to_fix']) ? $_SESSION['repairboards_to_fix'] : array();
    $context['repair_errors'] = isset($_SESSION['repairboards_to_fix2']) ? $_SESSION['repairboards_to_fix2'] : array();


Add after:
    db_query("SET @@SQL_BIG_SELECTS = 1" __FILE__, __LINE__);

This should force big selects to be enabled so the script can run.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

vfrjon

Changed too.........

$to_fix = !empty($_SESSION['repairboards_to_fix']) ? $_SESSION['repairboards_to_fix'] : array();
$context['repair_errors'] = isset($_SESSION['repairboards_to_fix2']) ? $_SESSION['repairboards_to_fix2'] : array();
    db_query("SET @@SQL_BIG_SELECTS = 1" __FILE__, __LINE__);

Results in............
Quote
Parse error: syntax error, unexpected T_FILE in mywebsite/htdocs/newforum/Sources/RepairBoards.php on line 768

SleePy

oh sorry,
    db_query("SET @@SQL_BIG_SELECTS = 1", __FILE__, __LINE__);

I missed a comma.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

vfrjon

No problems, it worked with that!

Forum maintenance now runs, found a few errors which it fixed, and Recount totals and stats runs OK too.

Still get the same error when trying to view the boards in the forum. Perhaps I need to add the

     db_query("SET @@SQL_BIG_SELECTS = 1", __FILE__, __LINE__);

to the boardindex.php file too.  If so , where would I put it?

Jon

vfrjon

Playing around, I added db_query("SET @@SQL_BIG_SELECTS = 1", __FILE__, __LINE__);

into BoardIndex.php after
// Find all boards and categories, as well as related information.  This will be sorted by the natural order of boards and categories, which we control.

and it makes it through that stage, but stops with this error.......
Quote2: mysql_query() [<a href='function.mysql-query'>function.mysql-query</a>]: Unable to save result set
File: mywebsite/htdocs/newforum/Sources/Subs.php
Line: 321
   

SleePy

If you go to ?action=stats on your forum.
What does it say about how many boards, categories, posts, topics, etc that you have?

As well, if you use phpMyAdmin, go to smf_boards, smf_categories, smf_topics, and smf_posts. View the structure for each one, then at the bottom left is a table holding information about the indexes in that table.
Can you post each of those. I have a feeling we may be missing that data which is causing your large forum to basically overload mysql since it has no indexes to speed up the process. If any are missing we will be creating them to fix this.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

vfrjon

#37
I ran the maintenence routines again and got this.......

The following errors are fouling up your forum:
Found topics and/or messages with topic or message IDs of 0.

Would you like to fix these errors?
Yes - No

Selected Yes, but it doesnt fix them.


To answer your questions........
STATS
Total Members: 387
Total Posts:    0
Total Topics:    0
Total Categories:    5
Users Online:    1
Most Online:    1 - August 11, 2008, 01:29:05 AM
Online Today:    0
   
Total Boards:     19



Attached images of tables. There is not one for 'posts', did you mean messages?

SleePy

yes sorry I meant smf_messages :P
Interesting,

If you go to smf_messages again, and click browse. Do you see any actual messages?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

vfrjon

#39
Yes they are all there.

Im wondering whether we need to put the sql big select command into the convert process. Remember it crashed out with the error at the end?

Advertisement: