Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Jade Elizabeth on December 06, 2019, 06:50:48 PM

Title: Forum won't load
Post by: Jade Elizabeth on December 06, 2019, 06:50:48 PM
I get a 500 error when I try to access my forum

and this in error_log

[06-Dec-2019 23:43:30 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function mysql_connect() in /<removed>/Sources/Subs-Db-mysql.php:58
Stack trace:
#0 <removed>/Sources/Load.php(2889): smf_db_initiate(<removed db login info>)
#1 <removed>/index.php(69): loadDatabase()
#2 {main}
  thrown in <removed>/Sources/Subs-Db-mysql.php on line 58


http://creativeburrow.jades-world.com/

The DB info is correct. It was fine last year lol.
Please assist :D
Title: Re: Forum won't load
Post by: Shambles on December 06, 2019, 06:56:33 PM
What version of PHP are you now on?
Title: Re: Forum won't load
Post by: Jade Elizabeth on December 06, 2019, 07:00:16 PM
7 I think :)

I'd really like to avoid losing custom code if possible. Doing a large update will destroy a lot of functionality on the site and I was hoping to keep it up a little longer for people to get their stuff down from it.
Title: Re: Forum won't load
Post by: Jade Elizabeth on December 06, 2019, 07:11:19 PM
It's 7.1
Title: Re: Forum won't load
Post by: Shambles on December 06, 2019, 07:18:43 PM
SMF version?
Title: Re: Forum won't load
Post by: Herman's Mixen on December 06, 2019, 07:20:34 PM
if your on SMF 2.0.15 and in your webhosting control panel you set your php version back to 7.0 does that help, or ask your host if they can downgrade php just for your site :P
Title: Re: Forum won't load
Post by: Jade Elizabeth on December 06, 2019, 08:02:44 PM
Quote from: Shambles on December 06, 2019, 07:18:43 PM
SMF version?

Honestly I have no idea! ha ha ha

My settings file says 2.0 Beta 4.  :-X :-[ O:)
My index file says 2.0.13....which file should I be looking at? ha ha

Quote from: Herman's Mixen on December 06, 2019, 07:20:34 PM
if your on SMF 2.0.15 and in your webhosting control panel you set your php version back to 7.0 does that help, or ask your host if they can downgrade php just for your site :P

I could do this except it's a subdomain not an addondomain so I can't actually do it.
Title: Re: Forum won't load
Post by: Sir Osis of Liver on December 06, 2019, 08:25:16 PM
What else are you running?  If you haven't made any major changes in last year or so, everything should work in php 7.0, probably even in 5.6.
Title: Re: Forum won't load
Post by: Jade Elizabeth on December 06, 2019, 09:58:56 PM
There is something that requires php 7 at the least, I can't for the life of me remember what it is. It could be Wordpress or my other SMF forum :/.

The problem is I have extensive edits to show story and series information so I can't just overwrite it and it's such a monster I'd rather die than manually change it ha ha. This is why it died in the first place it was too big to maintain and then Facebook and Reddit and other social networks became preferred for stories and stuff.
Title: Re: Forum won't load
Post by: Sir Osis of Liver on December 06, 2019, 10:26:09 PM
Don't know why you're getting that error.  $db_type in Settings.php should be 'mysql'.  Subs-Db-mysql.php contains three calls to mysql_connect(), it doesn't appear anywhere else in core code.  Have you checked the file?
Title: Re: Forum won't load
Post by: Illori on December 07, 2019, 04:55:47 AM
does your host give you the ability to change php version to something lower then 7? if so do that and then upgrade to 2.0.15, then you can run php 7.1.

otherwise it is a bit difficult to get you upgraded to 2.0.15 manually.
Title: Re: Forum won't load
Post by: Dave J on December 08, 2019, 03:16:01 AM
Quote from: Illori on December 07, 2019, 04:55:47 AM
does your host give you the ability to change php version to something lower then 7? if so do that and then upgrade to 2.0.15, then you can run php 7.1.

If you can't revert the php through your host then try to either rename the current .htaccess file (if you can see it) and upload the one I have attached or just upload the one I've attached to the public/html folder and see if that helps as a temp measure.
Title: Re: Forum won't load
Post by: Jade Elizabeth on May 28, 2020, 02:50:18 AM
Quote from: davejo on December 08, 2019, 03:16:01 AM
Quote from: Illori on December 07, 2019, 04:55:47 AM
does your host give you the ability to change php version to something lower then 7? if so do that and then upgrade to 2.0.15, then you can run php 7.1.

If you can't revert the php through your host then try to either rename the current .htaccess file (if you can see it) and upload the one I have attached or just upload the one I've attached to the public/html folder and see if that helps as a temp measure.

Oh wow will that work? :D

I kind of gave up because I didn't want to downgrade php, but I also can't upgrade one of those forums. I figured I'd have to get a new account or something. I just wanted to run it for a year so people could get their work off it.
Title: Re: Forum won't load
Post by: SpacePhoenix on May 28, 2020, 03:43:43 AM
The missing function is part of the old mysql_* extension which was REMOVED in PHP 7.0 so to get rid of that error you must downgrade your PHP version to 5.6