Fatal error: Uncaught Error: mysqli object is not fully initialized in mysqli.php

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
jeffythedragonslayer
Registered User
Posts: 24
Joined: Fri Mar 03, 2023 2:14 am

Fatal error: Uncaught Error: mysqli object is not fully initialized in mysqli.php

Post by jeffythedragonslayer »

Hi there, I recently setup phpBB3 for the first time ever on my production server, but MySQL started crashing on startup.

When I (on the server) point my browser to http://localhost:8080/phpBB3/, I am greeted with this wall of text:

Code: Select all

Fatal error: Uncaught Error: mysqli object is not fully initialized in C:\xampp\htdocs\phpBB3\phpbb\db\driver\mysqli.php:200 Stack trace:
#0 C:\xampp\htdocs\phpBB3\phpbb\db\driver\mysqli.php(200): mysqli_query(Object(mysqli), 'SELECT config_n...')
#1 C:\xampp\htdocs\phpBB3\phpbb\db\driver\factory.php(345): phpbb\db\driver\mysqli->sql_query('SELECT config_n...', 0)
#2 C:\xampp\htdocs\phpBB3\phpbb\config\db.php(72): phpbb\db\driver\factory->sql_query('SELECT config_n...')
#3 C:\xampp\htdocs\phpBB3\phpbb\config\db.php(55): phpbb\config\db->initialise(Object(phpbb\cache\driver\file))
#4 [internal function]: phpbb\config\db->__construct(Object(phpbb\db\driver\factory), Object(phpbb\cache\driver\file), 'phpbb_config')
#5 C:\xampp\htdocs\phpBB3\vendor\symfony\dependency-injection\ContainerBuilder.php(1176): ReflectionClass->newInstanceArgs(Array)
#6 C:\xampp\htdocs\phpBB3\vendor\symfony\dependency-injection\ContainerBuilder.php(634): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Array, true, 'config')
#7 C:\xampp\htdocs\phpBB3\vendor\symfony\dependency-injection\ContainerBuilder.php(1281): Symfony\Component\DependencyInjection\ContainerBuilder->doGet('config', 1, Array, true)
#8 C:\xampp\htdocs\phpBB3\vendor\symfony\dependency-injection\ContainerBuilder.php(1238): Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices(Object(Symfony\Component\DependencyInjection\Reference), Array, true)
#9 C:\xampp\htdocs\phpBB3\vendor\symfony\dependency-injection\ContainerBuilder.php(1149): Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices(Array, Array, true) #10 C:\xampp\htdocs\phpBB3\vendor\symfony\dependency-injection\ContainerBuilder.php(634): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Array, true, 'cache') #11 C:\xampp\htdocs\phpBB3\vendor\symfony\dependency-injection\ContainerBuilder.php(588): Symfony\Component\DependencyInjection\ContainerBuilder->doGet('cache', 1)
#12 C:\xampp\htdocs\phpBB3\includes\compatibility_globals.php(45): Symfony\Component\DependencyInjection\ContainerBuilder->get('cache')
#13 C:\xampp\htdocs\phpBB3\common.php(146): register_compatibility_globals()
#14 C:\xampp\htdocs\phpBB3\index.php(23): include('C:\\xampp\\htdocs...')
#15 {main} thrown in C:\xampp\htdocs\phpBB3\phpbb\db\driver\mysqli.php on line 200
Several other people have encountered this error message "mysqli object is not fully initialized" too:

viewtopic.php?p=15879661
viewtopic.php?t=2627446
viewtopic.php?t=2628066
viewtopic.php?p=15850601

This topic (viewtopic.php?p=15900661#p15900661) suggests that this error happens when the username/password/server to the database in config.php is incorrect. Does anyone know I can go about fixing it?
User avatar
[Dimetrodon]
Registered User
Posts: 438
Joined: Tue Aug 30, 2022 3:29 am
Location: Paleozoic Era
Contact:

Re: Fatal error: Uncaught Error: mysqli object is not fully initialized in mysqli.php

Post by [Dimetrodon] »

Hello.

Are you unable to launch MySQL from the XAMPP control panel? If so, it may be a problem with your XAMPP instillation.

Edit:

To change passwords in config.php, open it up and find:
$dbname, $dbuser, $dbpasswd, and update the information there to the correct database name, user name, and password respectively.

Code: Select all

$dbname = 'DatabaseNameExample';
$dbuser = 'UserNameExample';
$dbpasswd = 'ExamplePassword*';
Avatar by someone named AdmiralRA on Reddit. (No, I don't have a Reddit account)
When seeking support, please consider filling out the Support Request Template. It makes it easier for anyone trying to help.
jeffythedragonslayer
Registered User
Posts: 24
Joined: Fri Mar 03, 2023 2:14 am

Re: Fatal error: Uncaught Error: mysqli object is not fully initialized in mysqli.php

Post by jeffythedragonslayer »

Hi [Dimetrodon],

When I click "Start" MySQL on the XAMPP Control Panel, this gets printed to the bottom text box:

Code: Select all

10:41:05 PM  [main] 	Initializing Control Panel
10:41:05 PM  [main] 	Windows Version:   64-bit
10:41:05 PM  [main] 	XAMPP Version: 8.2.0
10:41:05 PM  [main] 	Control Panel Version: 3.3.0  [ Compiled: Apr 6th 2021 ]
10:41:05 PM  [main] 	Running with Administrator rights - good!
10:41:05 PM  [main] 	XAMPP Installation Directory: "c:\xampp\"
10:41:05 PM  [main] 	Checking for prerequisites
10:41:05 PM  [main] 	All prerequisites found
10:41:05 PM  [main] 	Initializing Modules
10:41:05 PM  [main] 	Starting Check-Timer
10:41:05 PM  [main] 	Control Panel Ready
10:41:09 PM  [mysql] 	Attempting to start MySQL app...
10:41:10 PM  [mysql] 	Status change detected: running
10:41:12 PM  [mysql] 	Status change detected: stopped
10:41:12 PM  [mysql] 	Error: MySQL shutdown unexpectedly.
10:41:12 PM  [mysql] 	This may be due to a blocked port, missing dependencies, 
10:41:12 PM  [mysql] 	improper privileges, a crash, or a shutdown by another method.
10:41:12 PM  [mysql] 	Press the Logs button to view error logs and check
10:41:12 PM  [mysql] 	the Windows Event Viewer for more clues
10:41:12 PM  [mysql] 	If you need more help, copy and post this
10:41:12 PM  [mysql] 	entire log window on the forums
PFA to this post the mysql_error.log file generated by the "Logs" button.
Attachments
mysql_error.log
(44.67 KiB) Downloaded 19 times
Last edited by jeffythedragonslayer on Fri Mar 03, 2023 3:45 am, edited 1 time in total.
User avatar
[Dimetrodon]
Registered User
Posts: 438
Joined: Tue Aug 30, 2022 3:29 am
Location: Paleozoic Era
Contact:

Re: Fatal error: Uncaught Error: mysqli object is not fully initialized in mysqli.php

Post by [Dimetrodon] »

jeffythedragonslayer wrote: Fri Mar 03, 2023 3:44 am-snip-
Since it is MySQL shutting down on XAMPP, you're going to have to request support here: https://community.apachefriends.org/f/

Sorry, but they will probably be able to help you better than anyone else here can. It is a problem with XAMPP, not phpBB.
Avatar by someone named AdmiralRA on Reddit. (No, I don't have a Reddit account)
When seeking support, please consider filling out the Support Request Template. It makes it easier for anyone trying to help.
jeffythedragonslayer
Registered User
Posts: 24
Joined: Fri Mar 03, 2023 2:14 am

Re: Fatal error: Uncaught Error: mysqli object is not fully initialized in mysqli.php

Post by jeffythedragonslayer »

[Dimetrodon] wrote: Fri Mar 03, 2023 4:14 am
jeffythedragonslayer wrote: Fri Mar 03, 2023 3:44 am-snip-
Since it is MySQL shutting down on XAMPP, you're going to have to request support here: https://community.apachefriends.org/f/

Sorry, but they will probably be able to help you better than anyone else here can. It is a problem with XAMPP, not phpBB.
Ok, I will. The reason I was hesitant to edit config.php directly was this stern warning:

Code: Select all

<?php
// phpBB 3.3.x auto-generated configuration file
// Do not change anything in this file!
If there are situations where editing this file is the correct thing to do, I think we should mention a little bit about them there.
Last edited by jeffythedragonslayer on Fri Mar 03, 2023 4:40 am, edited 1 time in total.
jeffythedragonslayer
Registered User
Posts: 24
Joined: Fri Mar 03, 2023 2:14 am

Re: Fatal error: Uncaught Error: mysqli object is not fully initialized in mysqli.php

Post by jeffythedragonslayer »

I tried to post on the Apache Friends Support Forum, got a message that my post would need to await moderator approval before it is shown publically, but unlike over here on phpbb.com where I can see:
This post is not visible to other users until it has been approved by a moderator.
above my post, I don't see my post at all on apachefriends.org. I hope it didn't get lost in the ether; perhaps they just have phpbb configured different?
User avatar
[Dimetrodon]
Registered User
Posts: 438
Joined: Tue Aug 30, 2022 3:29 am
Location: Paleozoic Era
Contact:

Re: Fatal error: Uncaught Error: mysqli object is not fully initialized in mysqli.php

Post by [Dimetrodon] »

jeffythedragonslayer wrote: Fri Mar 03, 2023 5:00 am I hope it didn't get lost in the ether; perhaps they just have phpbb configured different?
It's a much older version of phpBB3 that they have running there. Apache has a phpBB 3.0.x board while this site is a 3.3.x board.
Avatar by someone named AdmiralRA on Reddit. (No, I don't have a Reddit account)
When seeking support, please consider filling out the Support Request Template. It makes it easier for anyone trying to help.
hiran
Registered User
Posts: 17
Joined: Sun Mar 03, 2024 10:14 pm

Re: Fatal error: Uncaught Error: mysqli object is not fully initialized in mysqli.php

Post by hiran »

I have run into the same issue (PHP Fatal error: Uncaught Error: mysqli object is not fully initialized) although my mariadb has not crashed at all.
But it is a fresh setup on Debian 12,

The confusing thing for me is:
I was able to deactivate/activate extensions on phpbb via the phpbbcli and there were no errors.
But as soon as I run phpbbcli (as root) without parameters I see this output:

Code: Select all

# php bin/phpbbcli.php
PHP Fatal error:  Uncaught Error: mysqli object is not fully initialized in /var/www/phpBB3/phpbb/db/driver/mysqli.php:200
Stack trace:
#0 /var/www/phpBB3/phpbb/db/driver/mysqli.php(200): mysqli_query()
#1 /var/www/phpBB3/phpbb/db/driver/factory.php(353): phpbb\\db\\driver\\mysqli->sql_query()
#2 /var/www/phpBB3/phpbb/config/db.php(86): phpbb\\db\\driver\\factory->sql_query()
#3 /var/www/phpBB3/phpbb/config/db.php(55): phpbb\\config\\db->initialise()
#4 [internal function]: phpbb\\config\\db->__construct()
#5 /var/www/phpBB3/vendor/symfony/dependency-injection/ContainerBuilder.php(1176): ReflectionClass->newInstanceArgs()
#6 /var/www/phpBB3/vendor/symfony/dependency-injection/ContainerBuilder.php(634): Symfony\\Component\\DependencyInjection\\ContainerBuilder->createService()
#7 /var/www/phpBB3/vendor/symfony/dependency-injection/ContainerBuilder.php(1281): Symfony\\Component\\DependencyInjection\\ContainerBuilder->doGet()
#8 /var/www/phpBB3/vendor/symfony/dependency-injection/ContainerBuilder.php(1238): Symfony\\Component\\DependencyInjection\\ContainerBuilder->doResolveServices()
#9 /var/www/phpBB3/vendor/symfony/dependency-injection/ContainerBuilder.php(1149): Symfony\\Component\\DependencyInjection\\ContainerBuilder->doResolveServices()
#10 /var/www/phpBB3/vendor/symfony/dependency-injection/ContainerBuilder.php(634): Symfony\\Component\\DependencyInjection\\ContainerBuilder->createService()
#11 /var/www/phpBB3/vendor/symfony/dependency-injection/ContainerBuilder.php(588): Symfony\\Component\\DependencyInjection\\ContainerBuilder->doGet()
#12 /var/www/phpBB3/phpbb/di/container_builder.php(450): Symfony\\Component\\DependencyInjection\\ContainerBuilder->get()
#13 /var/www/phpBB3/phpbb/di/container_builder.php(162): phpbb\\di\\container_builder->load_extensions()
#14 /var/www/phpBB3/bin/phpbbcli.php(68): phpbb\\di\\container_builder->get_container()
#15 {main}
  thrown in /var/www/phpBB3/phpbb/db/driver/mysqli.php on line 200
Although I experience this only with phpbb, the error seems not directly linked to it. Somehow I believe it is about my PHP installation. Something is missing or just not right.

But what can I check to find out? Is there some PHP code to isolate the problem? Or any way to increase logging that might point me towards the root cause?
Post Reply

Return to “[3.3.x] Support Forum”