- 
    
Bug
 - 
    Resolution: Fixed
 - 
    
Minor
 - 
    3.3.8
 - 
    None
 
This might be related to this: https://tracker.phpbb.com/browse/PHPBB3-12387
and I found solution with this: https://github.com/MioVisman/punbb/commit/ea37df5b1c1de3456de965ca6915f9f11550a9ef
Running a clean install with:
- PHPBB 3.3.8
 - PHP 8.0.20
 - mysqli 8.0.20
 - MariaDB 10.5.16
 
Everything fails due to errors like:
					PHP Fatal error: Uncaught Error: mysqli_result object is already closed in /var/www/www.foo.bar/phpbb/db/driver/mysqli.php:264  | 
		
					Stack trace:
			 | 
		
					#0 /var/www/www.foo.bar/phpbb/db/driver/mysqli.php(264): mysqli_fetch_assoc()  | 
		
					#1 /var/www/www.foo.bar/phpbb/db/driver/factory.php(305): phpbb\db\driver\mysqli->sql_fetchrow()  | 
		
					#2 /var/www/www.foo.bar/phpbb/session.php(1180): phpbb\db\driver\factory->sql_fetchrow()  | 
		
					#3 /var/www/www.foo.bar/phpbb/session.php(1338): phpbb\session->check_ban()  | 
		
					#4 /var/www/www.foo.bar/phpbb/session.php(657): phpbb\session->check_ban_for_current_session()  | 
		
					#5 /var/www/www.foo.bar/phpbb/session.php(472): phpbb\session->session_create()  | 
		
					#6 /var/www/www.foo.bar/app.php(26): phpbb\session->session_begin()  | 
		
					#7 {main}  | 
		
					thrown in /var/www/www.foo.bar/phpbb/db/driver/mysqli.php on line 264  | 
		
Following the above suggestion, I disabled the function sql_freeresult in phpbb/db/driver/mysqli.php (just did a return true at the beginning) and everything started working.
Note: I was able to run php bin/phpbbcli.php --safe-mode db:migrate without issues.
See: https://www.phpbb.com/community/viewtopic.php?p=15894431

