Simple Machines Community Forum

SMF Support => Server Performance and Configuration => Topic started by: hiii98 on September 13, 2017, 08:33:02 PM

Title: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: hiii98 on September 13, 2017, 08:33:02 PM
I setup this forum almost 7 years ago, i have periodically done updates and changed the themes around.  I have not been in webdevelopment for the past 4+ years so I am extremely out of loop.  I suddenly was told by the forum users that I have the 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 run the file RepairBoards.php and i get the error "Hacking attempt..."  I am willing to pay someone to help me recover the database or change whatever parameter has broken.  I use Godaddy as a server. I am also willing to do the work as well as the information on that forum was extremely important (well I guess thats relative).  I verified with Godaddy that the settings are correct but again, i'm not a server admin, or web developer or programmer.  THis is out of my field and after trying for 2 weeks now to recover it on my own, i need your help.  the site is www.skinwalkerranch.org/forum
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: hiii98 on September 13, 2017, 09:41:46 PM
I hope i posted this in the correct area.
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: Sir Osis of LiverĀ on September 13, 2017, 10:15:53 PM
Do you have database and file backups?  Have you checked the database credentials in Settings.php?
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: hiii98 on September 14, 2017, 10:34:50 AM
"Do you have database and file backups?"  no idea.  Is that something i need to pay godaddy for? is that hidden on the server automatically? 

Yes i checked the db credentials in settings.php they all look correct but again i'm a amateur and not 100% sure i trust my conclusion.  I also spoke with a godaddy rep who confirmed they should be correct.  I feel something dramatic happened to my db, or something changed overnight. 

Can i start a new SMF board and transfer all the files over and have it magically work?  I've opened up a new board already and its working perfectly however obviously there is no past data in it. 
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: Illori on September 14, 2017, 10:47:18 AM
you need the database otherwise you loose all the content. the files dont hold the users/posts/messages etc that have been made.
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: hiii98 on September 14, 2017, 10:52:00 AM
what can i do to find or check the database?  I'm just familiar with FTP to the server.
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: Illori on September 14, 2017, 10:55:16 AM
do you have access to phpmyadmin it should be in the hosts control panel? you can do backup from there.

are you sure that you are connecting to the correct database server with the correct database username and password? you may need these details to connect to phpmyadmin.
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: hiii98 on September 14, 2017, 11:00:01 AM
yes i am currently logged into phpmyadmin.  absolutely  no idea what to do now from here, but i am in :)
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: Illori on September 14, 2017, 11:01:31 AM
do you see the database listed on the left side?
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: hiii98 on September 14, 2017, 11:03:41 AM
yes
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: Illori on September 14, 2017, 11:06:20 AM
then compare the details you see/used to what is in your Settings.php file. you can also use repair_settings.php to view the details as well.
What is repair_settings.php? (https://wiki.simplemachines.org/smf/Repair_settings.php)
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: hiii98 on September 14, 2017, 11:08:20 AM
please be more specific.  I can ftp and look at my setttings.php file however i cannot load it from the webbrowser.  Also what do i do while in the database?  What do you specifically want me to click and look at that is different than me ftp ing into the server and looking at the settings.php file?
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: Illori on September 14, 2017, 11:10:16 AM
if you use repair_settings.php it will show you the database server name/username/password/prefix you need to confirm they are the same as you use to connect to phpmyadmin.
the prefix is the first few characters for each table name, for example most are smf_
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: hiii98 on September 14, 2017, 11:20:12 AM
settings are spot on as far as i can tell.  i verified each one table (?) by table


when i run the test.php script (someone else posted the code somewhere on here) i get the following error

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/content/70/4821170/html/forum/test.php on line 5
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: Illori on September 14, 2017, 11:21:08 AM
what version of php is being run on your server?

do you know what version of SMF you have installed?
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: hiii98 on September 14, 2017, 11:24:21 AM
smfVersion   1.1.9

mysql-5.0.96
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: Illori on September 14, 2017, 11:24:49 AM
that is not what i asked. php not mysql version.
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: hiii98 on September 14, 2017, 11:26:02 AM
I have absolutely no idea where to find that
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: Illori on September 14, 2017, 11:27:55 AM
smfVersion   1.1.9

mysql-5.0.96

most likely your host has upgraded to php 7.0 and you are running SMF 1.1.* which will never support php 7. you need to upgrade your forum to SMF 2.0.14. you find instructions on the wiki on how to complete the upgrade.
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: hiii98 on September 14, 2017, 11:33:22 AM
in essence does this just involve downloading the lattest version, uploading and OVERWRITING my files on the server via ftp.  Then what?  What about permissions.  I am reading the tutorial...and alittle leary.

Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: hiii98 on September 14, 2017, 11:50:38 AM
I finally got into the UPGRADE.php and got it to somehow work, however i cannot progress as it says

!!Critical Error!
Cannot connect to the database server with the supplied data.

If you are not sure about what to type in, please contact your host.


whenever i put in my username and password.  These are the same username and password i use to enter the mysqladmin .  I am really confused.  The same username i use for FTP, where else can i find the proper credentials?
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: hiii98 on September 14, 2017, 12:01:08 PM
just verified via FTP the username and password work.... so now WTF is the problem??? why doesnt someone just step up take $20 paypal and take alook at this.  I cant imagine its that complicated if you know what your doing.

I am still gettting the error

!!Critical Error!
Cannot connect to the database server with the supplied data.

If you are not sure about what to type in, please contact your host.
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: Illori on September 14, 2017, 12:13:49 PM
then you need to contact your host as the details are incorrect.
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: hiii98 on September 14, 2017, 12:39:44 PM
totally a cop out answer.  Where do i find the exact username and password?  Lets assume i am putting in the exact username and password... NOW WhAT?? asking the host anything is useless they are not programmers and dont care to help me.  I've done everything you've said... NOW WHAT?    I can get the update.php file to run but it wont let me progress past Step 3 database settings.  Obviously whateverr the ****** its looking for is hidden somwhere in the database file.  Where?  How do i get them to match?  I've changed my password countless times to both my database and the ftp user.  Still doesnt work.  I'm logged on via a ftp client with username and password...still wont accept it in the upgrade.  Is the upgrade broken?
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: Illori on September 14, 2017, 12:41:16 PM
if you change the database password you need to enter it in the repair_settings.php file so it gets updated in SMF.
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: hiii98 on September 14, 2017, 12:51:36 PM
i did, what is the table prefix?  mine say smf_  who do I know if thats correct or not?
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: hiii98 on September 14, 2017, 12:57:52 PM
I did enter into repair and yes it updated settings.php .  I get this error in repair_settings.php displayed while running the app

Some settings are not being shown because the database connection information is incorrect.
Check your database login details, table prefix and that the database actually contains your SMF tables.
Title: Re: I am receiving the error "Connection Problems Sorry, SMF was unable to connect"
Post by: Illori on September 14, 2017, 12:58:47 PM
at this point it seems like you may be better posting in the help wanted board and hiring someone to take a look at what is going on and fix it up for you.