News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

site broken after upgrade to php 7.3

Started by dsanchez, September 18, 2022, 08:56:34 AM

Previous topic - Next topic

dsanchez

After upgrading PHP from 7.1.x to 7.3.x the message
QuoteSorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.
is being shown.

Apache error logs show this:

Quote[Sun Sep 18 11:46:24.441747 2022] [php7:error] [pid 26746] [client 216.244.66.196:38210] PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_error() in /var/www/html/smf/Sources/Errors.php:456\nStack trace:\n#0 /var/www/html/smf/Sources/Subs-Db-mysql.php(76): display_db_error()\n#1 /var/www/html/smf/Sources/Load.php(3655): smf_db_initiate('localhost', 'db', 'user', 'password', 'smf_', Array)\n#2 /var/www/html/smf/index.php(94): loadDatabase()\n#3 {main}\n  thrown in /var/www/html/smf/Sources/Errors.php on line 456
[Sun Sep 18 11:46:25.895841 2022] [php7:error] [pid 26745] [client 185.191.171.40:46594] PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_error() in /var/www/html/smf/Sources/Errors.php:456\nStack trace:\n#0 /var/www/html/smf/Sources/Subs-Db-mysql.php(76): display_db_error()\n#1 /var/www/html/smf/Sources/Load.php(3655): smf_db_initiate('localhost', 'db', 'user', 'password', 'smf_', Array)\n#2 /var/www/html/smf/index.php(94): loadDatabase()\n#3 {main}\n  thrown in /var/www/html/smf/Sources/Errors.php on line 456

please advise. thank you!

dsanchez

some things needed to be installed after the php upgrade:

Quotesudo apt install php7.3-mysql

also

Quotesudo apt-get install php7.3-mbstring

of course later we need to restart apache

Quotesudo /etc/init.d/apache2 restart

that solved the issue.

Advertisement: