URL to your eFiction: http://www.rachelshaven.com/library/
Version of eFiction: 3.1
Have you bridged eFiction, if so with what?: SMF 1.1.1 (Using included SMF Bridge)
Version of PHP: Not Sure
Version of MySQL: 5.0.16
Have you searched for your problem: Yes.
If so, what terms did you try: Every Part of the error message. Also searched for Bridge and SMF
State the nature of your problem:
When not logged into SMF:
A fatal MySQL error was encountered.
Query: SELECT * FROM eftn_fanfiction_blocks
Error: (1046) No database selected
When logged into SMF:
A fatal MySQL error was encountered.
Query: SELECT * FROM smf_members as author LEFT JOIN eftn_fanfiction_authorprefs as ap ON ap.uid = author.ID_MEMBER WHERE author.ID_MEMBER = '2'
Error: (1046) No database selected
This is only when I bridge Efiction 3.1 to SMF 1.1.1. I have had SMF 1.1.1 bridged to Efiction 3.0, and it worked perfectly. I see that error message means I have something wrong with my DB. I know the DB is good, but to be 100% sure I completely blew away the install of Efiction and the Tables in MYSQL. I have reinstalled from scratch all of the files, and again get this error. If I remove the bridge files, I am able to get Efiction to run.
I have looked at all of the files, and everything seems still to be ok. All of these tables exist with that prefix on my MYSQL server.
I have a second install of this on a different part of this server and it works perfectly for my testing. This is the one I am trying to make work.
I also did try using that newest file that was added to the SMF Bridge folder. the QueryString.php. It is made for 1.0.8. I tried the file, and got more errors. I think I found the changes in it and moved it into the QueryString.php 1.1 version of the file.
I hate to be a pain on this, but I really was at my last options here. Any help anyone can give would be greatly appreciated.
Do you have a test account for us? Cannot seem to even get to that point to create an account while it is bridged.
I guess my biggest confusion here is it worked before, and works in test, but now it just won't work.
Thank you!
I'm sorry, there's not much I can tell you. Check that you've got all the files in the SMF bridge folder moved. Check for this in the queries.php:
$db_connection = $dbconnect;
As you're working with a 1.1.1 SMF install and this was written for a 1.0.8 you might want to see if that has changed somehow.
This is so weird, because it did work for me before, and then with the upgrade, it just started giving me this error.
That code is still in the file.
Any other thoughts on this?
I've got 3.1 bridged with SMF 1.1.1 with no issue. I'd offer up double checking your config.php, but looking at my 3.1 zip there wasn't one in there to accidentally overwrite I don't think [unless I deleted it to make sure I didn't do just that]

Yeah, I have this working with my other site, so I know it can work.
I am just at a loss as to why it is giving me this trouble now.
And, it did work... Very strange.
I wish I knew why it was giving me this error message like that. I blew everything away so there is nothing as far as I can tell in there that should be giving me any errors.
And I know the config.php is good because it works when not bridged...
I've got 3.1 bridged with SMF 1.1.1 with no issue. I'd offer up double checking your config.php, but looking at my 3.1 zip there wasn't one in there to accidentally overwrite I don't think [unless I deleted it to make sure I didn't do just that]
Did you need to make any changes to the QueriesString.php file?
The changes to the QueryString.php file only affect the blocks admin page.
I'm not familiar enough with SMF that I can hunt up what's wrong for you. It seems like your database name isn't being supplied to the connection. It's a shot in the dark, but try adding:
$db_name = $dbname;
Right after that first line I told you to check.
$db_name = $dbname;
I added above code, and it did not seem to make any difference. Still having the same problem.
I am wondering if something has changed my SMF code to make this the problem. As I said before, I did have it working before. You know how when you work on something a lot, after a little time it blurs together. I am thinking now that I may have had this whole problem before I upgraded. I have been working on this for 10 - 12 plus hours over the course of 4 days, so I think I may have just gotten myself to the point where it is all blurred together.
I guess my problem might not be the bridge at all, and instead it is something on my SMF DB. I am not sure anymore...
Well, I do appreciate everyones help here. If anyone has any ideas on this, I am very open to suggestions at this point.
And thank you for all the help so far. I appreciate it!
EDIT:
I tried something today, and this is what I get. I restored the get_session_vars.php from Efiction, not the Bridge to the Includes folder. When I did this, I now am able to get back into Efiction.
When I log in, I get redirected back to my SMF install, but it does pass me as a SMF user to there. However, when I go back into Efiction, I am not logged in. So, seems like it might be something with the get_session_vars.php from the bridge.
Not 100% sure though...
Did you need to make any changes to the QueriesString.php file?
I only edited the queries.php in the SMF bridge folder to point to the path of my SMF install. I didn't edit anything else other than moved the files as directed. session-vars and queries in the includes and the rest into user.

YAHOO!
Figured it out finally!
My problem was with SMF, and nothing with the Bridge at all...
Darn thing drove me crazy...
Anyways, it was in the Server Settings on SMF, Use a persistent connection was checked, and that seemed to lock the MYSQL database and prevented Efiction from reading it when SMF had it...
Turned it off, and loaded up 3.1.1 and I am back in business!
Love this program, and so happy it works, now the daunting task of rebuilding the rest of what I lost when I tried my rebuilds, but at least it works!
UPDATE:
Figured out more why this was checked...
We are using SMF bridged with Joomla, and that seems to have been the issue, the bridge for that needed that check, but found a work around in unchecking the "Use subdomain independent cookies" box...
So far so good, but still a lot more work to get this whole site worked out!
Just thought I would post this all as someone might be in the same scenario as we are in. Also have Copermine also bridged back to SMF, so it is a pretty busy little DB.
