PHP Error 2.0.13 to 2.0.18

Started by Gus A, October 06, 2021, 06:22:53 PM

Previous topic - Next topic

Gus A

Hey folks,

Moved an smf forum from godaddy to a better host. In the process upgraded from 2.0.13 to 2.0.18.
Getting this error log message:

Wed Oct 06 21:16:32.346293 2021] [php7:error] [pid 1193] [client 66.96.18.13:39584] PHP Fatal error:  Uncaught Error: Call to undefined function mysql_connect() in /var/www/html/forum/Sources/Subs-Db-mysql.php:58\nStack trace:\n#0 /var/www/html/forum/Sources/Load.php(2550): smf_db_initiate('wid191060508332...', 'wid191060508332...', 'wid191060508332...', 'R*********G', 'smf_', Array)\n#1 /var/www/html/forum/index.php(69): loadDatabase()\n#2 {main}\n  thrown in /var/www/html/forum/Sources/Subs-Db-mysql.php on line 58, referer:

Any idea what's causing this? 

shadav

a couple of questions

when you moved your site did you run the repair_Settings tool and change all the urls and paths to the new url and paths
https://wiki.simplemachines.org/smf/Repair_settings.php/en

what php level are you using?

in your forums Sources folder in the file Subs-Db-mysql.php
what is on line 58?

how are you upgrading from 2.0.13 to 2.018?
did you use the Large upgrade file from here: https://download.simplemachines.org/
or are you using the patch files from here: https://custom.simplemachines.org/index.php?action=patches
going from SMF 2.0.13 to SMF 2.0.14, then SMF 2.0.14 to SMF 2.0.15, then SMF 2.0.15 to SMF 2.0.16, then SMF 2.0.16 to SMF 2.0.17, and lastly SMF 2.0.17 to SMF 2.0.18

Gus A

Quote from: shadav on October 06, 2021, 09:46:43 PMwhen you moved your site did you run the repair_Settings tool and change all the urls and paths to the new url and paths
https://wiki.simplemachines.org/smf/Repair_settings.php/en

I have not.

Quote from: shadav on October 06, 2021, 09:46:43 PMwhat php level are you using?

PHP version: 7.3.29-1~deb10u1

Quote from: shadav on October 06, 2021, 09:46:43 PMin your forums Sources folder in the file Subs-Db-mysql.php
what is on line 58?

'db_select_db' => 'mysql_select_db',


Quote from: shadav on October 06, 2021, 09:46:43 PMhow are you upgrading from 2.0.13 to 2.018?
did you use the Large upgrade file from here: https://download.simplemachines.org/
or are you using the patch files from here: https://custom.simplemachines.org/index.php?action=patches
going from SMF 2.0.13 to SMF 2.0.14, then SMF 2.0.14 to SMF 2.0.15, then SMF 2.0.15 to SMF 2.0.16, then SMF 2.0.16 to SMF 2.0.17, and lastly SMF 2.0.17 to SMF 2.0.18

Did a large upgrade. I have a copy of 2.0.13 and can revert back and implement the patch upgrades. Does 2.0.13 work with PHP version: 7.3.29-1~deb10u1?

Thanks for all your help!

shadav

you'll need to run the repair settings and change the urls and paths to your new ones

no need to revert, make sure that all 2.0.18 files were uploaded and overwrote the existing files

I do not believe that 2.0.13 works with php 7.3
If memory serves it isn't until 2.0.14 that php 7 was even supported
and it wasn't until 2.0.17 that php 7.3 was supported
however if you overwrote all of your files with the 2.0.18 large upgrade files then you should be able to run php 7.4 just fine

mathx

#4
Im helping Gus A, Im the backend unixbeard.

Could you indicate exactly what change im looking for in the source that would show we've got the right version?

Cuz literally we've got

-rw-r--r-- 1 500 500 53525 Feb  1  2021 Sources/Subs-Db-mysql.php
b8fc4411058ad81ec8725a7a03469cf3  Sources/Subs-Db-mysql.php

which came from

a78f941bbf2a95b2ae9cf9709c7472be 1695184 smf_2-0-18_upgrade.tar.bz2

# (tar -xjpvf smf_2-0-18_upgrade.tar.bz2 -O Sources/Subs-Db-mysql.php | md5sum) 2>&1 | tr "\n" " "
Sources/Subs-Db-mysql.php b8fc4411058ad81ec8725a7a03469cf3  -

So im pretty sure we got the right one with the right files in place, but it still does not work.

(And this doesnt seem to apply anymore https://www.simplemachines.org/community/index.php?topic=564251.msg4001003#msg4001003 )

(Im a bit astounded m5sum or sha256/512 isnt listed somewhere on the site for the downloads, so the above might not be easily verifiable that i have the right download)




mathx

Further phpinfo():

Additional files parsed:

/etc/php/7.3/apache2/conf.d/10-mysqlnd.ini
/etc/php/7.3/apache2/conf.d/10-opcache.ini
/etc/php/7.3/apache2/conf.d/10-pdo.ini
/etc/php/7.3/apache2/conf.d/15-xml.ini
/etc/php/7.3/apache2/conf.d/20-calendar.ini
/etc/php/7.3/apache2/conf.d/20-ctype.ini
/etc/php/7.3/apache2/conf.d/20-curl.ini
/etc/php/7.3/apache2/conf.d/20-dom.ini
/etc/php/7.3/apache2/conf.d/20-exif.ini
/etc/php/7.3/apache2/conf.d/20-fileinfo.ini
/etc/php/7.3/apache2/conf.d/20-ftp.ini
/etc/php/7.3/apache2/conf.d/20-gd.ini
/etc/php/7.3/apache2/conf.d/20-gettext.ini
/etc/php/7.3/apache2/conf.d/20-iconv.ini
/etc/php/7.3/apache2/conf.d/20-json.ini
/etc/php/7.3/apache2/conf.d/20-mbstring.ini
/etc/php/7.3/apache2/conf.d/20-mysqli.ini
/etc/php/7.3/apache2/conf.d/20-pdo_mysql.ini

vbgamer45

If you are using cpanel you might have multiphp manager in there to change php version. You can do that then upgrade your SMF then change the PHP version to a higher version.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

mathx


mathx

moved forum dir out of way, replaced with untar of the full install (and cp'd attachments dir contents into new attachments, and updated Settings.php).

still getting connection errors, but not getting a logged error about it in apache anymore. verified connection settings by hand on cmd line for the user, def not a user/pass issue.

All we get is

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


shawnb61

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

mathx

Mariadb 10.3 on debian 10.10.

Ok got it working with the full install, but the smf_upgrade still didnt work. Guess we have to reinstall plugins, etc.

Advertisement: