Fatal error: Uncaught mysqli_sql_exception

General forum for discussions regarding UTStatsDB
lepiney
Posts: 4
Joined: Tue Mar 11, 2025 2:49 pm

Fatal error: Uncaught mysqli_sql_exception

Postby lepiney » Fri Mar 28, 2025 4:17 am

UTStatsDB version 3.10
Operating system and version windows11 and also Debian 12
Database type and version 15.1 Distrib 10.11.11-MariaDB sqli
PHP version 8.2.28
Web server and version apache 2.4.62
Unreal Tournament version ut99 v469e
Stat logger type and version ut99 logger

I can install apache, php, mariadb sqli no problem and works perfectly with Windows and Debian with phpmyadmin and phpinfo

But both OS's come up with the error below when I try to open the http://localhost/utstats/admin.php

The admin.php page does not initialize the first time I'm logging in.
It looks to me like it is trying to access a table utstatsdb.ut_config without initialising first.

Any advise?

Error:
Fatal error: Uncaught mysqli_sql_exception: Table 'utstatsdb.ut_config' doesn't exist in /var/www/utstats/includes/logsql.php:176 Stack trace: #0 /var/www/utstats/includes/logsql.php(176): mysqli_query(Object(mysqli), 'SELECT value FR...') #1 /var/www/utstats/admin.php(534): sql_queryb(Object(mysqli), 'SELECT value FR...') #2 /var/www/utstats/admin.php(209): loadpass() #3 {main} thrown in /var/www/utstats/includes/logsql.php on line 176

lepiney
Posts: 4
Joined: Tue Mar 11, 2025 2:49 pm

Re: Fatal error: Uncaught mysqli_sql_exception

Postby lepiney » Fri Mar 28, 2025 4:52 pm

I used SQLite3 ver3.40.1 on windows 10, 11 and debian 12 (bookworm) and works perfectly...see my previous post for specs...

Not ideal for a proper db... I can not figure out why UTSTATSDB does not work with mariadb Ver 15.1 Distrib 10.11.11-MariaDB when you say it does.

Please can you help, I can not do this troubleshooting on my own anyomore...

lepiney
Posts: 4
Joined: Tue Mar 11, 2025 2:49 pm

Re: Fatal error: Uncaught mysqli_sql_exception

Postby lepiney » Thu Apr 03, 2025 5:12 pm

UTStatsDB version 3.10
Operating system and version Debian 12
Database type and version 15.1 Distrib 10.11.11-MariaDB sqli
PHP version 8.2.28
Web server and version apache 2.4.62
Unreal Tournament version ut99 v469e
Stat logger type and version ut99 logger

I've had success with with the...
Error:
Fatal error: Uncaught mysqli_sql_exception: Table 'utstatsdb.ut_config' doesn't exist in /var/www/utstats/includes/logsql.php:176 Stack trace: #0

I've managed to get Mariadb working which I am pleased about.
I had to go through all the sql command files in the table directory and make amendments so it made the tables properly.

I am still having problems with parsing ut99 UnrealngLog files.

etting permissions in directory '/var/www/ut99logs/' for 'Unreal.ngLog.*':
Processing directory '/var/www/ut99logs/' for 'Unreal.ngLog.*':
Processing log 'Unreal.ngLog.2025.04.04.10.45.24.7777.log'...
Warning: Undefined variable $link in /var/www/utstats/includes/logutevents.php on line 95

Fatal error: Uncaught TypeError: mysqli_real_escape_string(): Argument #1 ($mysql) must be of type mysqli, null given in /var/www/utstats/includes/logsql.php:441 Stack trace: #0 /var/www/utstats/includes/logsql.php(441): mysqli_real_escape_string(NULL, 'DM-Deck16') #1 /var/www/utstats/includes/logutevents.php(95): sql_addslashes(NULL, 'DM-Deck16') #2 /var/www/utstats/includes/logparse.php(237): tagut_map(4, Array) #3 /var/www/utstats/logs.php(770): parselog('/var/www/ut99lo...', '') #4 /var/www/utstats/admin.php(562): require('/var/www/utstat...') #5 /var/www/utstats/admin.php(298): logparse() #6 {main} thrown in /var/www/utstats/includes/logsql.php on line 441

UT2004 with OLStats works perfectly. I notice the ut99 and ut2004 log files are qquite different...
Should there be something done to convert ut99 logs before parsing?

lepiney
Posts: 4
Joined: Tue Mar 11, 2025 2:49 pm

Re: Fatal error: Uncaught mysqli_sql_exception

Postby lepiney » Sat Apr 05, 2025 9:51 pm

I know you did a lot of work getting UTStatsDB going,
Please understand I appreciate all the work you did , I could not have done what you did.

I do say though that I went through this forum to try to get a solution to the errors I was getting,

In my defense your documentation is out of date , you give your old versions like it will work with 3.10
It does not

I went through line by line on the SQL tables and had to amend for all the sql tables for Mysqli
for MariaDB, which you say you support...

Also I went through all the .php files following the trail of all the the functions and variables... I found where where my errors were occuring and was able to correct them.

I did a lot of hours going through and admiring your work

I am up and going with UTStatsDB with the latest Linuxgsm, Debian, Apache, php, mariadb.

It took me al lot of effort and not giving up

I am sad that you did not care to respond

Yvon

Panther
Site Admin
Posts: 505
Joined: Sat Dec 08, 2007 12:51 am
Contact:

Re: Fatal error: Uncaught mysqli_sql_exception

Postby Panther » Wed May 21, 2025 11:22 pm

I do apologize for not seeing your messages until now. I did not receive the system notifications of your new posts and though I had visited the forums a few times I did not log in, so did not see the posts with pending approval. Your account is now fully registered. I've been working on some updates to UTStatsDB and have already corrected at least one of the issues you mentioned (mysqli_real_escape_string). I will be posting this update soon and will try to review the documentation. If you have any specific recommendations I can see about incorporating them. It is never easy to write documentation for a program that you've written and are extremely familiar with. Although, now it's been such a long time since most of this was written...decades in fact.


Return to “UTStatsDB”