Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: rbogle on June 24, 2017, 05:47:16 PM

Title: Fatal Error during login or search
Post by: rbogle on June 24, 2017, 05:47:16 PM
Folks.....I've got a SMF 2.1 forum that has been live for some time that has static data in it so I rarely look into it.  A user reported that they got the following error when trying to do a search:
Fatal error: Function name must be a string in /....../Sources/SearchAPI-Fulltext.php on line 138

I am able to verify this and unfortunately I get the same error when trying to login in so i can get into the admin functions

I can manually access topics so that's good but search and login don't work so it's not much good at this point.

I'd appreciate any thoughts folks might have to help me get this back up and running.

I can access the DB via myphpadmin so can check things out there if needed but I'm not an expert in navigating the DB so will need some pointers.

Here's the URL: http://archives.clayartarchives.com/

Also just noticed that if I click on my username to go to my user profile I get "Database Error" :(

Thanks....Ray
Title: Re: Fatal Error during login or search
Post by: vbgamer45 on June 24, 2017, 07:06:34 PM
It's a bug with SMF 2.0.x

Open Sources/SearchAPI-Fulltext.php
find

// Do we have to do some work with the words we are searching for to prepare them?
public function prepareIndexes($word, &$wordsSearch, &$wordsExclude, $isExcluded)
{
global $modSettings;

Change to

// Do we have to do some work with the words we are searching for to prepare them?
public function prepareIndexes($word, &$wordsSearch, &$wordsExclude, $isExcluded)
{
global $modSettings, $smcFunc;

Title: Re: Fatal Error during login or search
Post by: rbogle on June 24, 2017, 07:22:59 PM
That took are of it for the search.....Thanks for the prompt response!!!

Unfortunately I still can't login.  When I try to login I get the message below:

Database Error
Please try again. If you come back to this error screen, report the error to an administrator.

Any ideas on the login issue??

Ray
Title: Re: Fatal Error during login or search
Post by: vbgamer45 on June 24, 2017, 07:32:16 PM
You would have to login your smf's error log database table. Or you php error log.
I can't see the error since it is hidden to non admin's I can only see the same text as a guest.
Title: Re: Fatal Error during login or search
Post by: rbogle on June 24, 2017, 09:19:13 PM
In the smf_log_errors table I get two new entries each time I try to\ login.

1st error: Database Error: Unknown column 'openid_uri' in 'field list'
2nd error: 8: Undefined index: linktree_link

Last error in the error_log is the one that was fixed by updating the .....fulltext.php file.  As it doesn't appear that new entries are made to the error_log file when the login fails?
Title: Re: Fatal Error during login or search
Post by: Kindred on June 24, 2017, 09:51:23 PM
And, are you running the latest version of 2.1 beta 3, from github?
Title: Re: Fatal Error during login or search
Post by: vbgamer45 on June 24, 2017, 10:25:27 PM
It says 2.0.14 on his site http://archives.clayartarchives.com/
Title: Re: Fatal Error during login or search
Post by: rbogle on June 24, 2017, 10:51:45 PM
I set it up quite awhile ago and thought I was using and earlier beta version...but, it does say 2.0.14 on the site though. Is there a way for me to confirm the version via the DB or any of the other log files?

Anyway to bypass/fix the DB error so I can get logged in?
Title: Re: Fatal Error during login or search
Post by: vbgamer45 on June 24, 2017, 10:54:51 PM
You can look in the smf_settings table it should say the db version
Title: Re: Fatal Error during login or search
Post by: rbogle on June 24, 2017, 10:57:54 PM
Just checked the smf_settings table and it says 2.0.14 so I guess it isn't a version of 2.1? 

I'm guessing I should open a new topic in the 2.0.X area?
Title: Re: Fatal Error during login or search
Post by: vbgamer45 on June 24, 2017, 11:04:57 PM
Did you upgrade from SMF 1.1.x it is strange to be missing openid_uri

openid_uri text NOT NULL,  needs to be added to the smf_members table
Title: Re: Fatal Error during login or search
Post by: rbogle on June 24, 2017, 11:21:18 PM
Don't remember doing an upgrade but was too long ago so can't be sure?

There is one entry in the smf_members table which is for me.

How do I add the information openid_uri text NOT NULL to the table?
Title: Re: Fatal Error during login or search
Post by: vbgamer45 on June 24, 2017, 11:23:06 PM
This sql command will do it

ALTER TABLE smf_members add column openid_uri text NOT NULL after passwd varchar;
Title: Re: Fatal Error during login or search
Post by: rbogle on June 25, 2017, 12:13:41 AM
OK....Good news but still some issues:

1. I am able to login and get to admin sections!!  :)

2. I ran all the maintenance tasks and there were no errors.

3. But....I did a DB backup and it came back with a 0 file size file....I ran optimize after that anyway and had no errors and just a very small amount of space was restored.

But:

1. When I click on "Home" I get the following error: Table 'xxxxx.smf_collapsed_categories' doesn't exist
File: /home/...../public_html/archives/Sources/Subs-BoardIndex.php
Line: 72

2. When I click on "Profile" I get the following error: Unknown column 'mem.location' in 'field list'
File: /home/....../public_html/archives/Sources/Load.php
Line: 1043

3. When I click on "My Messages" I get the following: Unknown column 'labels' in 'field list'
File: /home/....../public_html/archives/Sources/PersonalMessage.php
Line: 223

4. When I click on "Members" I get the following: Unknown column 'mem.location' in 'field list'
File: /home/....../public_html/archives/Sources/Load.php
Line: 1043

Seems like some more missing columns?  Any idea how this may have happened?  I haven't logged into this forum in a bit so am not sure when this started but it wasn't doing this last time I looked at it?

BTW...Thanks for the help so far!!
Title: Re: Fatal Error during login or search
Post by: vbgamer45 on June 25, 2017, 12:15:59 AM
I would download large upgrade package for SMF 2.0 and run it on your forum. You see to be missing a lot of database changes.
Title: Re: Fatal Error during login or search
Post by: rbogle on June 25, 2017, 12:18:12 AM
Thanks....I'll give that a try.  Is this a fairly low risk thing to do? 
Title: Re: Fatal Error during login or search
Post by: vbgamer45 on June 25, 2017, 12:21:19 AM
Well the site is already broken just grade the upgrade.php file and the .sql files and see if it helps
Title: Re: Fatal Error during login or search
Post by: rbogle on June 25, 2017, 12:32:39 AM
Thanks very much for the support tonight. I have downloaded the large upgrade you recommended but I think I'm going to leave well enough alone for now. It's just a static site for folks to search on some pottery related info and that is working now.  And I can log in and do all the maintenance stuff. 

Someday I'll give the upgrade a try and cross my fingers.

Thanks again!!