Advertisement:

Author Topic: Created new "additional" forum, and now the first one doesn't work  (Read 424 times)

Offline neurosphere

  • Newbie
  • *
  • Posts: 4
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...

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,916
Re: Created new "additional" forum, and now the first one doesn't work
« Reply #1 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.

Offline neurosphere

  • Newbie
  • *
  • Posts: 4
Re: Created new "additional" forum, and now the first one doesn't work
« Reply #2 on: April 25, 2019, 04:32:23 PM »
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?

Offline neurosphere

  • Newbie
  • *
  • Posts: 4
Re: Created new "additional" forum, and now the first one doesn't work
« Reply #3 on: April 25, 2019, 04:35:52 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.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,916
Re: Created new "additional" forum, and now the first one doesn't work
« Reply #4 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.



Offline neurosphere

  • Newbie
  • *
  • Posts: 4
Re: Created new "additional" forum, and now the first one doesn't work
« Reply #5 on: April 25, 2019, 09:35:24 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.


Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,135
  • Gender: Male
    • Kindred-999 on GitHub
Re: Created new "additional" forum, and now the first one doesn't work
« Reply #6 on: April 25, 2019, 11:14:16 PM »
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
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,992
    • StoryBB/StoryBB on GitHub
Re: Created new "additional" forum, and now the first one doesn't work
« Reply #7 on: April 26, 2019, 01:30:53 AM »
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)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,135
  • Gender: Male
    • Kindred-999 on GitHub
Re: Created new "additional" forum, and now the first one doesn't work
« Reply #8 on: April 26, 2019, 08:11:35 AM »
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.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,992
    • StoryBB/StoryBB on GitHub
Re: Created new "additional" forum, and now the first one doesn't work
« Reply #9 on: April 26, 2019, 08:51:48 AM »
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 :)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,916
Re: Created new "additional" forum, and now the first one doesn't work
« Reply #10 on: April 26, 2019, 12:34:01 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.