PHP 8.1
Steps to reproduce
- Upgrade PHP 8.0 to PHP 8.1
Expected behaviour
Tell us what should happen TeamPass should work as usually
Actual behaviour
Tell us what happens instead I get an error like: This page is not working HTTP ERROR 500
Server configuration
Operating system: Gentoo Linux
Web server: Apache 2.4
Database: MySQL PHP version: 8.1
Teampass version: 3.0.0.20 Teampass configuration file:
Updated from an older Teampass or fresh install:
PLEASE attach to this issue the file /includes/config/tp.config.php.
Client configuration
Browser: Chrome
Operating system: Windows 11
Logs
Web server error log
Insert your webserver log here
Log from the web-browser developer console (CTRL + SHIFT + i)
Insert the log here and especially the answer of the query that failed.
Try to clear your browser cache, Check the apache logs, ... You need to investigate your server.
Teampass is developped and tested on php 8.1.1

this is the only error, that I could found in apache2 error.log
[Sat Oct 22 08:23:54.581563 2022] [php:error] [pid 2348] [client 192.168.xyz.xyz:49328] PHP Fatal error: Uncaught mysqli_sql_exception: Invalid character set was provided in var/www/passman/includes/libraries/Database/Meekrodb/db.class.php:198\nStack trace:\n#0 /var/www/passman/includes/libraries/Database/Meekrodb/db.class.php(198): mysqli->set_charset()\n#1 /var/www/passman/includes/libraries/Database/Meekrodb/db.class.php(648): MeekroDB->get()\n#2
var/www/passman/includes/libraries/Database/Meekrodb/db.class.php(637): MeekroDB->queryHelper()\n#3
var/www/passman/includes/libraries/Database/Meekrodb/db.class.php(638): MeekroDB->prependCall()\n#4
var/www/passman/includes/libraries/Database/Meekrodb/db.class.php(65):MeekroDB->query()\n#5
var/www/passman/sources/core.php(177): DB::query()\n#6 /var/www/passman/index.php(111):
equire_once('/var/www/passma...')\n#7 {main}\n thrown in
var/www/passman/includes/libraries/Database/Meekrodb/db.class.php on line 198
I do not found a solution with google. Does anyone know this?
I think, I found the solution here!
In my case the value for DB_ENCODING was empty like this:
define("DB_ENCODING", "");
I than changed it to
define("DB_ENCODING", "utf8");
and all worked as expected!