Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: covs67 on June 20, 2013, 02:42:57 AM

Title: I Don't have access to my Smf forum any longer
Post by: covs67 on June 20, 2013, 02:42:57 AM
I can no longer access my site because it is offline.

Sometimes it displays this error:

Connection Problems
Sorry, SMF was unable to connect to the database.
This may be caused by the server being busy.
Please try again later.




I've contacted my host about this but they said it wasn't their fault and they can't do anything about it.
They told me to contact Smf because their job is to host my files.

Please help me as the site has been offline for over 2 weeks now.

The site is name is: http://www.moneymakingdiscussions.com
Title: Re: I Don't have access to my Smf forum any longer
Post by: shadow82x on June 20, 2013, 03:12:10 AM
It means just that, SMF can't reach your forum's database. Verify you have the right database information in Settings.php. Otherwise there isn't much we can do here to help you.
Title: Re: I Don't have access to my Smf forum any longer
Post by: covs67 on June 20, 2013, 03:54:50 AM
Quote from: shadow82x on June 20, 2013, 03:12:10 AM
It means just that, SMF can't reach your forum's database. Verify you have the right database information in Settings.php. Otherwise there isn't much we can do here to help you.

I've contacted my host and they said that settings.php has the right database.
Please help me solve this problem.
Title: Re: I Don't have access to my Smf forum any longer
Post by: LiroyvH on June 20, 2013, 04:03:11 AM
Does it have the right database user and database password as well?
And is there actually anything in the database? (Check with something like phpMyAdmin)
Title: Re: I Don't have access to my Smf forum any longer
Post by: Storman™ on June 20, 2013, 04:41:37 AM
If it was working before what did you do or change immediately before it went wrong ?
Title: Re: I Don't have access to my Smf forum any longer
Post by: covs67 on June 20, 2013, 05:22:55 AM
Quote from: Storman™ on June 20, 2013, 04:41:37 AM
If it was working before what did you do or change immediately before it went wrong ?

That is exactly why am worried because i never tampered with the database before this issue came up. I just visited the site and saw the error. I never altered anything.
Title: Re: I Don't have access to my Smf forum any longer
Post by: covs67 on June 20, 2013, 05:26:35 AM
Quote from: CoreISP on June 20, 2013, 04:03:11 AM
Does it have the right database user and database password as well?
And is there actually anything in the database? (Check with something like phpMyAdmin)
Honestly i don't know what're talking about because i have never visited mysql and the databases with the hope that all was well.
Title: Re: I Don't have access to my Smf forum any longer
Post by: Storman™ on June 20, 2013, 05:39:18 AM
QuoteVerify you have the right database information in Settings.php.

As previously mentioned the first thing you need to do is check the file Settings.php which you'll find in the root of your site.

Make sure the database entries within it are correct. Have you done that yet ?
Title: Re: I Don't have access to my Smf forum any longer
Post by: covs67 on June 20, 2013, 05:53:43 AM
Quote from: Storman™ on June 20, 2013, 05:39:18 AM
QuoteVerify you have the right database information in Settings.php.

As previously mentioned the first thing you need to do is check the file Settings.php which you'll find in the root of your site.

Make sure the database entries within it are correct. Have you done that yet ?
I've not done that yet because i dont know the normal database entries in the settings.php. can you help me with the normal structure of the settings.php?


Title: Re: I Don't have access to my Smf forum any longer
Post by: Storman™ on June 20, 2013, 06:07:24 AM
Those entries will be unique to your setup.

You would have chosen the values when you initially installed SMF.
Title: Re: I Don't have access to my Smf forum any longer
Post by: margarett on June 20, 2013, 06:32:55 AM
Anyway, if you are sure you changed nothing then it's your host's fault...

If it works sometimes and some other don't, it means that MySQL is sometimes available and others not. It's not clear in your message if this is random or permanent but if it is random, then it's your host. If it's permanent AND YOU ARE SURE YOU CHANGED NOTHING, then it's probably your host, but with a couple of other possible causes...
Title: Re: I Don't have access to my Smf forum any longer
Post by: Kindred on June 20, 2013, 07:25:46 AM
please note...  You say that you did not change anything "in the database"
That is not actually relevant to the problem...

Did you change ANYTHING prior to this happening? Any new theme? New mods? manual changes?

Does your settings file have data in it, or is it empty?

Looking in the settings.php file...
http://wiki.simplemachines.org/smf/Settings.php
Title: Re: I Don't have access to my Smf forum any longer
Post by: covs67 on June 20, 2013, 08:26:31 AM
Quote from: margarett on June 20, 2013, 06:32:55 AM
If it's permanent AND YOU ARE SURE YOU CHANGED NOTHING, then it's probably your host, but with a couple of other possible causes..

Sorry for the delay.

This quoted statement exactly depicts what i  meant.

It's permanent and my host says they can't do anything and i should contact smf support. And i am very sure i never tampered with anything involving mysql and databases.
Title: Re: I Don't have access to my Smf forum any longer
Post by: Storman™ on June 20, 2013, 09:18:22 AM
If you wish, I have a little free time for an hour, if you want to pm me some ftp login details then I'll have a quick look for you.

Before you do read this:

http://www.simplemachines.org/community/index.php?topic=228940.0
Title: Re: I Don't have access to my Smf forum any longer
Post by: MrPhil on June 20, 2013, 10:14:51 AM
There are a handful of database-access settings in your /Settings.php file. First of all, make sure there's content in that file and it's not empty (from the error message you're getting, it doesn't sound like  it's empty, but it doesn't hurt to double check). Make sure you're looking at the right one, in case you have multiple copies scattered around your site for some reason. It's the Settings.php in your forum root, the same place as SSI.php, index.php, etc. The critical lines' values will depend on your host's configuration, so you have to check with them to be sure.

$db_type should be mysql, unless you decided to use another kind of database (in which case you ought to know what you're doing!)
$db_name must match what you set up the forum with. often it has the hosting account name and _ as a prefix
$db_server names the machine it's on. often it's "localhost", but sometimes it's a separate machine name or IP address
$db_user must match the database name the forum was set up with. often it has the hosting account name and _ as a prefix
$db_passwd is the password you set up the user with

Settings.php needs to be readable by PHP -- usually 644 or 444 permissions on a Linux server, and either read-write or read-only on a Windows server. The error doesn't sound like the one you'd get with an unreadable file, but it doesn't hurt to check.

Are you able to fire up phpMyAdmin and get into your database for a look around? Just to see if it has tables with content? If you can't even do that, you've got big problems. Most often, the database server itself is down and your host needs to restart it. You really ought to know how to use phpMyAdmin (or some equivalent) just to browse around the database, if nothing else, to prove it's still alive and still has your data. You should also know how to use phpMyAdmin and/or your hosting control panel to see what users are defined, and the one associated with the SMF database should match (name and password) what's in Settings.php.

There is a known bug in SMF which will empty out your Settings.php. If that's not the problem, could someone have hacked your site and changed Settings.php or deleted/changed your user? It's not unknown for hosts to upgrade PHP and/or MySQL and screw up something, or to restore a backup and mess up something in the process. Then they give the Bart Simpson Defense: "I didn't do it. Nobody saw me do it. You can't prove anything!".
Title: Re: I Don't have access to my Smf forum any longer
Post by: Biology Forums on June 20, 2013, 10:54:42 AM
I would do a repair + optimize using phpmyadmin (if you have access to that). If that doesn't work, try to reverse the last mod you installed prior to this issue by uninstalling it manually. Lost count on how many times this has happened to me. It has either been due to a faulty mod, a mod that was installed incorrectly, Settings.php credentials were incorrect after a server switch, or my website got so packed that one of the tables broke (smf_sessions) in the database.

Good luck, and don't worry.
Title: Re: I Don't have access to my Smf forum any longer
Post by: covs67 on June 20, 2013, 11:23:38 AM
Quote from: Liam_michael on June 20, 2013, 10:54:42 AM
I would do a repair + optimize using phpmyadmin (if you have access to that). If that doesn't work, try to reverse the last mod you installed prior to this issue by uninstalling it manually. Lost count on how many times this has happened to me. It has either been due to a faulty mod, a mod that was installed incorrectly, Settings.php credentials were incorrect after a server switch, or my website got so packed that one of the tables broke (smf_sessions) in the database.

Good luck, and don't worry.

I don't have access to the site at all.
Title: Re: I Don't have access to my Smf forum any longer
Post by: Kindred on June 20, 2013, 11:25:17 AM
you must still have access in cpanel or whatever control panel your webhost is using...
Title: Re: I Don't have access to my Smf forum any longer
Post by: margarett on June 20, 2013, 11:32:22 AM
To be TOTALLY honest, I don't think you can solve this by yourself. You have a database connection issue and you don't know how to get to your database...
You should take Storman™'s offer and let him check it out for you...
Title: Re: I Don't have access to my Smf forum any longer
Post by: covs67 on June 20, 2013, 11:36:31 AM
Quote from: Kindred on June 20, 2013, 11:25:17 AM
you must still have access in cpanel or whatever control panel your webhost is using...

Yes i do have access to the cpanel but i don't know what to do there.

Would you like me to Pm you my site details so you can help me correct any errors there.

Another problem i experience is that sometimes the connection to the server times out while trying to load.
Title: Re: I Don't have access to my Smf forum any longer
Post by: covs67 on June 20, 2013, 11:41:54 AM
Quote from: margarett on June 20, 2013, 11:32:22 AM
To be TOTALLY honest, I don't think you can solve this by yourself. You have a database connection issue and you don't know how to get to your database...
You should take Storman™'s offer and let him check it out for you...

Ok thanks. I'll invite him.