Created new "additional" forum, and now the first one doesn't work

Started by neurosphere, April 25, 2019, 03:56:35 PM

Previous topic - Next topic

neurosphere

I had a working forum on particular domain which was an "addon" to the original domain. It had its own database of course. This is using bluehost.

I wanted to create an entirely different form for another site. So I got a new domain, added it as another "addon" account which created its own subfolder. Created a database in the same way I had before. Uploaded/extracted the forum files and the forum works fine.

BUT, when I navigate to the original forum I now get "Connection Problems Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later."

As far as I can tell, all the files from the original working database are in the folder.

What did I mess up? And is there a way to get both forums to work? I thought I had heeded warnings not to create two forums in the same database. Sigh...

Sir Osis of Liver

Check the database info for both forums in Settings.php, and make sure both databases exist with correct users assigned.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

neurosphere

Ok, both settings files look "ok" to me (not sure what I'm looking for),

But!

Settings file 1 has $db_user = 'me' with password 1
Settings file 2 has the same user with a different password.

Maybe I can just change the password in the original (now non-working forum) to match the one that's working?

neurosphere

Quote from: Sir Osis of Liver on April 25, 2019, 04:21:53 PM
Check the database info for both forums in Settings.php, and make sure both databases exist with correct users assigned.

THANKS SO MUCH!! Changing the passwords to match fixed it. I wouldn't have thought changing the user password just prior to installing the new forum would require editing the settings file?

Regardless, I can't tell you how much I appreciate the quick, helpful response. I would have had no idea whatever where to start.

Whew.

Sir Osis of Liver

If you have two forums each with it's own database, $db_name and $db_user should be different for both, passwords shouldn't matter.  If you've assigned the same user to both databases, it could be causing a problem.  I usually use db name as user name, makes things simpler and avoids conflicts.  Giving the same user two different passwords is never a good idea.  The second password replaces the first one, so it's no longer valid.


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

neurosphere

Quote from: Sir Osis of Liver on April 25, 2019, 04:39:58 PM
If you have two forums each with it's own database, $db_name and $db_user should be different for both, passwords shouldn't matter.  If you've assigned the same user to both databases, it could be causing a problem.  I usually use db name as user name, makes things simpler and avoids conflicts.  Giving the same user two different passwords is never a good idea.  The second password replaces the first one, so it's no longer valid.

Ok, I don't understand all that you've written to be honest. I had $db_user as the same for two different forums. I of course had set ME as the same user for two different forums I created, because I was a "user" (?) for each forum? My user password was set by/within bluehost, and when I started the second forum perhaps I forgot the password for the user (aka ME) so changed the password. I assumed that password change would propagate down the line to all related forums, but obviously not.

What's interesting to me, is that the passwords are not encrypted/salted/whatever, such that the "settings" file contains the password in text format. Not sure what I think about that. Not sure I completely understand the significance/risk of that.


Kindred

There is little risk, as long add your server is secure... and the fcb password has to be readable somewhere.  Pretty much every script had a config file with the database connection into.


As for your problem,  your can not r use the same database and database prefix for two different forums.
Also smf does not handle add on domains afaik
Сл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."

Arantor

SMF supports addon domains just fine provided you set the paths correctly and don't have junk in the top level site with weird htaccess rules. Mostly because addon domains when set up by cPanel (at least) don't do anything weird and just create a folder off the main public_html folder with the domain as the name. Why would SMF know or care in that case? Path's a path... :P (cookies by default wouldn't transfer because of the origin limit)

Kindred

Oh?  Add-on domains are treated like subdomains?

That's not how I've seen it treated on some hosts...   but if so - of course you are right.
Сл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."

Arantor

That's how recent versions of cPanel usually do it from what I've seen, mostly because it's convenient and doesn't require additional FTP setup.

From Apache's point of view they're also the same thing, too :)

Sir Osis of Liver

Quote from: neurosphere on April 25, 2019, 09:35:24 PM
I had $db_user as the same for two different forums. I of course had set ME as the same user for two different forums I created, because I was a "user" (?) for each forum? My user password was set by/within bluehost, and when I started the second forum perhaps I forgot the password for the user (aka ME) so changed the password. I assumed that password change would propagate down the line to all related forums, but obviously not.

Database user is created in cpanel on the server, and can be assigned to more than one database.  Each forum has a Settings.php, which includes $db_passwd for the database connected to that forum.  Your first forum was set with $db_passwd = xyz, when you changed user password to abc in cpanel, xyz no longer works.  Each db user can only have one password, so connection to your first db fails.  You have to change it manually (or use repair_settings.php) in your forum, cpanel knows nothing about Settings.php and doesn't touch it.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: