Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Galaxy Computers on September 06, 2017, 01:58:18 AM

Title: Error Connecting to the DB.
Post by: Galaxy Computers on September 06, 2017, 01:58:18 AM
I just now notice this today. I was working fine a while back now I got this error trying to connect to the DB.

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home1/xxxxx/public_html/support/Sources/Subs-Db-mysql.php:58 Stack trace: #0 /home1/xxxxx/public_html/support/Sources/Load.php(2550): smf_db_initiate('localhost', 'hkeaton_xxxxx...', 'hkeaton_xxxxx', 'xxxxxxx', 'smf_', Array) #1 /home1/xxxxx/public_html/support/index.php(69): loadDatabase() #2 {main} thrown in /home1/xxxxxx/public_html/support/Sources/Subs-Db-mysql.php on line 58

How can I get this fixed?
Title: Re: Error Connecting to the DB.
Post by: Illori on September 06, 2017, 05:09:36 AM
which version of SMF are you using?
Title: Re: Error Connecting to the DB.
Post by: Galaxy Computers on September 06, 2017, 10:46:29 AM
I can't remember what version it is. But it won't tell me due to the error.
Title: Re: Error Connecting to the DB.
Post by: d3vcho on September 06, 2017, 10:57:00 AM
And what PHP version are you using? Can you try to upgrade it to PHP 5.4 at least?
Title: Re: Error Connecting to the DB.
Post by: Galaxy Computers on September 06, 2017, 10:59:16 AM
I am using the latest php Version 7.0
Title: Re: Error Connecting to the DB.
Post by: d3vcho on September 06, 2017, 11:02:51 AM
Then you're not using SMF 2.0.14 (the only one compatible with PHP7), try to downgrade to another PHP version and then upgrade SMF to 2.0.14
Title: Re: Error Connecting to the DB.
Post by: Galaxy Computers on September 06, 2017, 11:07:19 AM
Should I try to Upgrade 2.0.14 version?
Title: Re: Error Connecting to the DB.
Post by: Illori on September 06, 2017, 11:10:23 AM
either do that or downgrade your php version.
Title: Re: Error Connecting to the DB.
Post by: d3vcho on September 06, 2017, 11:11:35 AM
Quote from: mtechama on September 06, 2017, 11:07:19 AM
Should I try to Upgrade 2.0.14 version?

Yes, but you should downgrade first since you don't have access yet to your forum. After upgrading to 2.0.14, you can have PHP 7 back.