SMF Support > SMF 1.1.x Support

GoDaddy Upgrade from 2GH to 4GH Linux Hosting Caused Database Connection Error

(1/9) > >>

andrei23:
 
Hello all you amazing SMF Wizards!  I need your help!!

GoDaddy just migrated from 2GH Linux hosting to 4GH Linux Hosting and my SMF forum went down.. 12+ years of content and conversation, gone in a poof I had no control over.  Reeeeeeally hopeful someone knows how to get it back online.    :'(

SimpleMachines 1.1.21 is known to have issues with php 5.6, so I downgraded to 5.4 (last time it worked was 5.2 under 2GH). PHP 5.4 supposedly works with SMF 1.1.21 - does it not?

Could a CHMOD perhaps be needed because 4GH defaults for files and folders may be different then they were under 2GH?  Or would those not change as a result of the upgrade? I made amazing progress just by doing a Save As on a file in UTF-8 instead of ANSI as you'll see below, so I've learned not to overlook the simple stuff.

Oh, and I would prefer NOT to upgrade to SMF 2.0.x if at all poss and lose all custom mods - plus I keep reading about nothing but problems with this upgrade if not done from within SMF, which is unfortunately no longer an option.

Forum link: http://www.fx-knight.com/smForum/index.php


Error we are getting:

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


Their tech suspected the issue might be the syntax of the $db_server path in the settings.php file..

Used to be:
dbname.db.3857732.hostedresource.com

GoDaddy suggested new ones to try are:
grid55mysql277.secureserver.net
shr.prod.phx3.secureserver.net

But.. perhaps unlike WordPress, Simple Machines likes db name to be part of the path as it was originally?
What would be the correct syntax starting with dbname.. and ending with ..secureserver.net?

(This is something that seems to be SMF-specific, what it likes to see here, so the GoDaddy tech didn't want to assume that what works for Word Press would also work for SMF.)


Next, we noticed the settings.php file was being saved as ANSI
Changing to encoding to UTF-8 and doing a Save As generated the following:

Warning: Cannot modify header information - headers already sent by (output started at /home/content/32/3857732/html/_fxK2/smForum/Settings.php:1) in /home/content/32/3857732/html/_fxK2/smForum/Sources/Subs-Auth.php on line 346

Warning: Cannot modify header information - headers already sent by (output started at /home/content/32/3857732/html/_fxK2/smForum/Settings.php:1) in /home/content/32/3857732/html/_fxK2/smForum/Sources/Subs-Auth.php on line 347

Warning: Cannot modify header information - headers already sent by (output started at /home/content/32/3857732/html/_fxK2/smForum/Settings.php:1) in /home/content/32/3857732/html/_fxK2/smForum/Sources/Subs-Auth.php on line 348

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


These are the lines of code in question from /Sources/Subs-Auth.php:

   // Don't cache this page!
   header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
   header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
   header('Cache-Control: no-cache');


So... could it be that 4GH doesn't like the date format 2GH used to use on the headers?
Although.. the error above seems to suggest we already have headers coming from elsewhere?

Really hopeful this gives someone out there a lead on what is causing the database connection error..


Here are the contents of the settings.php file:

########## Forum Info ##########
$mbname = 'fxKnight';      # The name of your forum.
$language = 'english';      # The default language file set for the forum.
$boardurl = 'http://fx-knight.com/smForum';      # URL to your forum's folder. (without the trailing /!)
$webmaster_email = 'support@fxKnight.com';      # Email address to send emails from. (like noreply@yourdomain.com.)
$cookiename = 'fxKnight923';      # Name of the cookie to set for authentication.

########## Database Info ##########
$db_server = 'dbname.db.3857732.hostedresource.com';
$db_name = 'dbname';
$db_user = 'user';
$db_passwd = 'password';
$db_prefix = 'smf_';
$db_persist = 0;
$db_error_send = 1;

########## Directories/Files ##########
# Note: These directories do not have to be changed unless you move things.
$boarddir = '/home/content/32/3857732/html/_fxK2/smForum';      # The absolute path to the forum's folder. (not just '.'!)
$sourcedir = '/home/content/32/3857732/html/_fxK2/smForum/Sources';      # Path to the Sources directory.

 

Any help would be GREATLY appreciated, and I cannot tell you in words how grateful I am for your knowledge & expertise!

-=Andrei 

vbgamer45:
Don't post your settings file. Please remove your login information.

Your best best is contact their support. And or look at the phpmyadmin area in your godaddy hosting for the connection string you should be able to see the database.

andrei23:
User/pass was obviously not included  :)

I have been back and forth with their support, and have gotten about as far as I believe I can with them. They are now saying it's a content issue, not hosting - even though content hasn't changed since everything worked prior to their migration.

They simply do not know enough about SMF.. which is why I came here hoping to find people who know more.

Aleksi "Lex" Kilpinen:

--- Quote from: andrei23 on January 02, 2018, 12:34:15 AM ---Hello all you amazing SMF Wizards!  I need your help!!

GoDaddy just migrated from 2GH Linux hosting to 4GH Linux Hosting and my SMF forum went down.. 12+ years of content and conversation, gone in a poof I had no control over.  Reeeeeeally hopeful someone knows how to get it back online.    :'(

--- End quote ---

See a similar case: Connection problems again! (GoDaddy Host)


--- Quote from: andrei23 on January 02, 2018, 12:34:15 AM ---SimpleMachines 1.1.21 is known to have issues with php 5.6, so I downgraded to 5.4 (last time it worked was 5.2 under 2GH). PHP 5.4 supposedly works with SMF 1.1.21 - does it not?

--- End quote ---

SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)


--- Quote from: andrei23 on January 02, 2018, 12:34:15 AM ---Could a CHMOD perhaps be needed because 4GH defaults for files and folders may be different then they were under 2GH?  Or would those not change as a result of the upgrade? I made amazing progress just by doing a Save As on a file in UTF-8 instead of ANSI as you'll see below, so I've learned not to overlook the simple stuff.

--- End quote ---

The database or the database login should have no effect, specially on linux hosts the character set of the settings files, and the editor used to edit them, may have affect. File permissions should not easily become a problem, and I think problems like that would manifest themselves differently.


--- Quote from: andrei23 on January 02, 2018, 12:34:15 AM ---Oh, and I would prefer NOT to upgrade to SMF 2.0.x if at all poss and lose all custom mods - plus I keep reading about nothing but problems with this upgrade if not done from within SMF, which is unfortunately no longer an option.

--- End quote ---
You cannot upgrade from 1.x to 2.x within SMF, so I don't know what you have been reading.
Upgrading SMF


--- Quote from: andrei23 on January 02, 2018, 12:34:15 AM ---Forum link: http://www.fx-knight.com/smForum/index.php

Error we are getting:

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


Their tech suspected the issue might be the syntax of the $db_server path in the settings.php file..

Used to be:
xx.hostedresource.com

GoDaddy suggested new ones to try are:
xx.secureserver.net
xxx.secureserver.net

But.. perhaps unlike WordPress, Simple Machines likes db name to be part of the path as it was originally?
What would be the correct syntax starting with fxb072.. and ending with ..secureserver.net?

--- End quote ---
That would be whatever is your hosts database address, not in anyway specific to SMF, and the DB name does not need to be there.

---

BACKUP your current settings.php and settings_bak.php, replace them with these ( these are empty from the installation package ) and correct the settings using repair_settings. (Do NOT manually edit them.) There may be something wrong with your settings.php judging from the non-db errors.

What is repair_settings.php?

You will need to do this "twice". First correct the database information and save, then all the rest of the settings and save again.

andrei23:
Really helpful info, Aleksi - THANK YOU!

I have read both of the threads you have referenced prior to posting.  The first one seemed to have additional issues going on beyond what I am experiencing, due to moving his installation to a new folder, and upgrading from SMF 1.x to 2.x, and the second one I have verified I am compatible.. my host is running PHP 5.4 and MySQL 5.5 (SMF 1.1.21 should work with both according to the article).

I have followed your instructions carefully in regards to Settings.php and the repair tool and alas, same issue persists. Cannot connect to the database. So we can rule out paths, I guess. 

Back to what other differences there might be between 2GH Linux hosting and 4GH that offend SMF or might prevent it form connecting to its database?

Or how about the headers error referenced in /Sources/Subs-Auth.php ?  Perhaps 4GH uses a different date format that SMF doesn't like?

Navigation

[0] Message Index

[#] Next page

Go to full version