• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

AAC Znote

chrallaz

Active Member
Joined
Jan 1, 2022
Messages
50
Reaction score
29
@Znote
Hello do someone know why

PHP:
[Thu Oct 20 22:56:42.832150 2022] [php:error]
[pid 1760:tid 1796] [client 127.0.0.1:3724] PHP Fatal error:  Uncaught mysqli_sql_exception: Field 'comment' doesn't have a default value in E:\\UniServerZ\\www\\engine\\database\\connect.php:90\nStack trace:\n#0
E:\\UniServerZ\\www\\engine\\database\\connect.php(90): mysqli_query()\n#1
E:\\UniServerZ\\www\\engine\\database\\connect.php(80): voidQuery()\n#2
E:\\UniServerZ\\www\\engine\\function\\users.php(1435): mysql_insert()\n#3
E:\\UniServerZ\\www\\createcharacter.php(97): user_create_character()\n#4
{main}\n  thrown in E:\\UniServerZ\\www\\engine\\database\\connect.php on line 90, referer: http://127.0.0.1/createcharacter.php

using

Code:
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 4
sort_buffer_size = 512K
read_buffer_size = 512K
read_rnd_buffer_size = 512K
net_buffer_length = 8K
thread_stack = 1024K

After I saw a few post from @Znote himself explaining

Alright someone might "Know" what I need to do here.
I imported a brand-new OTServBR "schema.sql". and then it WORKED
But now I wanted to import an already existing "schema.sql" thats exported.
Appearently this is when the error occurs..
So far I seem to "understand I'm missing a field" somewhere in the MySQLdb for something thats why its refeering to " 'comment' ".
Problem is I don't know how to figure out where.

I found that this is the difference between the two schema.sql
Lua:
created  
hidden  
comment
Question is now, can I delete these or add/make the createcharacter.php (users.php) to add these values somehow?

Solved?
Code:
            'comment' => 0,
            'created' => 0,
            'hidden' => 0,
added to users.php
 
Last edited:
If you don't know how to do this programatically, use a admin tool such as PhpMyAdmin to edit the table and give the 'comment' field a default value.
 
Back
Top