News:

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

Main Menu

Fatal Error during login or search

Started by rbogle, June 24, 2017, 05:47:16 PM

Previous topic - Next topic

rbogle

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/ [nofollow]

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

Thanks....Ray

vbgamer45

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;

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

rbogle

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

vbgamer45

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.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

rbogle

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?

Kindred

And, are you running the latest version of 2.1 beta 3, from github?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

rbogle

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?

vbgamer45

You can look in the smf_settings table it should say the db version
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

rbogle

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?

vbgamer45

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
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

rbogle

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?

vbgamer45

This sql command will do it

ALTER TABLE smf_members add column openid_uri text NOT NULL after passwd varchar;
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

rbogle

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!!

vbgamer45

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.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

rbogle

Thanks....I'll give that a try.  Is this a fairly low risk thing to do? 

vbgamer45

Well the site is already broken just grade the upgrade.php file and the .sql files and see if it helps
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

rbogle

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!!

Advertisement: