Important Notice: Effective immediately, all support will be handled through Discord. Read more about the changes coming to Anodyne's services.

Error Number: 1364

Having a problem getting Nova installed? Can't figure out why something isn't working right? This is the place to get help and report any bugs you find with Nova!

VAdm Tomari Sat Feb 11, 2012 12:46 pm

Error Number: 1364

I'm trying to install a fresh copy of Nova v2 but I ran into a mysql error 1364

Code: Select all
Field 'field_class' doesn't have a default value

INSERT INTO `characters_fields` (`field_type`, `field_name`, `field_fid`, `field_label_page`, `field_order`) VALUES ('select', 'gender', 'gender', 'Gender', 1)

Filename: D:\apache\htdocs\cms\ucip\nova\ci\database\DB_driver.php

Line Number: 330


I'm running Windows 7 Home Edition with Apache 2, PHP 5, and MySQL 5 using Firefox 10. I'm not sure if this is only effects Windows based systems or not, but considering I didn't find any other posts that had this error, I'm assuming it does.

Note: I just did a fresh install on linux with no issues... so it must be a windows thing.

Posts: 28


AgentPhoenix Sat Feb 11, 2012 2:56 pm

Re: Error Number: 1364

More likely it's some kind of bug with the version of MySQL you're running. Never seen that. Do you know which version of MySQL you're running?
User avatar

Posts: 7596


VAdm Tomari Sat Feb 11, 2012 3:18 pm

Re: Error Number: 1364

I'm using MySQL version 5.0.51a.

Posts: 28


VAdm Tomari Sun Apr 15, 2012 7:05 am

Re: Error Number: 1364

I just tried a fresh install with MySQL version 5.5.23 and came across the Error 1364 issue again about 'field_class' not having a default value.

Update: It seems as if my mysql server doesn't insert NULL values by default for undefined columns.. I've tried looking for how to change this with no such luck.

Update 2: It seems that my troubles have stemmed from my MySQL server being set in strict mode. This is the only difference between my settings and the settings on the host that my simming group uses.

Posts: 28


AgentPhoenix Sun Apr 15, 2012 10:36 am

Re: Error Number: 1364

If you go in to phpMyAdmin you can open the fields table and set a default value of nothing ('' for a blank value) on that field and it should solve the issue.
User avatar

Posts: 7596


Rotten_Emu Tue Feb 26, 2013 11:40 am

Re: Error Number: 1364

I got exactly the same error, my host says it might have something to do with running it on a Windows Server. Tried to apply the suggested fix/workaround but I get the following returned to me from MySQL

Code: Select all
SQL query:

ALTER TABLE  `nova_characters_fields` CHANGE  `field_value`  `field_value` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT  ' '

MySQL said:

#1101 - BLOB/TEXT column 'field_value' can't have a default value
User avatar

Posts: 13


AgentPhoenix Tue Feb 26, 2013 12:13 pm

Re: Error Number: 1364

Change the field in phpMyAdmin to not have a default value.
User avatar

Posts: 7596


Rotten_Emu Tue Feb 26, 2013 1:42 pm

Re: Error Number: 1364

Does that mean that I have to go through every possible option in NOVA to see what fields give this error? Because when I try to send in an Application I get the following

Code: Select all
Error Number: 1364

Field 'main_char' doesn't have a default value

INSERT INTO `nova_users` (`name`, `email`, `password`, `instant_message`, `date_of_birth`, `join_date`, `status`, `skin_main`, `skin_admin`, `skin_wiki`, `display_rank`) VALUES ('me', 'me@myself.com', '14c9ab18f1090cbdf8b1cc12a0c298cfd91127fc', '', '18031988', 1361904044, 'pending', 'lcarsgrey', 'lcarsgrey', 'lcarsgrey', 0)

Filename: D:\var\http\avalon.lcnessie.nl\nova\ci\database\DB_driver.php

Line Number: 330


To me this is the same error in a different part of the database. There is no 'field value' that I can edit to 'not have a default value'. Unless there is something I'm missing. Or could I edit DB_driver.php to perhaps fix this issue? Because appearantly that's the file that's throwing the error all the time.

Might this problem stem from the fact that I am using the blank template rather than, say, a Star Trek oriented one?
User avatar

Posts: 13


LcNessie Tue Feb 26, 2013 1:53 pm

Re: Error Number: 1364

I am Rotten Emu's host. The webserver running the Nova system is a Windows 2003 with Apache, PHP and MySQL 5.6

I have checked the default value of the field "main_char" in the table "nova_users". It already is NONE.

The login user that the system uses to log on to the database should have all rights on the associated database.

Is Nova developed on Linux servers? If so, I could try and deploy those. I am planning to phase out Windows 2003 in favor of Ubuntu anyway.

Kind regards,

Mathijs.

Edit: The user is only allowed full access on it's own database, not the whole MySQL service.

Posts: 12


AgentPhoenix Tue Feb 26, 2013 1:58 pm

Re: Error Number: 1364

You can look at the sql-mode option in the MySQL ini file. It's possible you're in some kind of strict mode for MySQL which is causing the errors.
User avatar

Posts: 7596


LcNessie Tue Feb 26, 2013 2:01 pm

Re: Error Number: 1364

We saw this option in this thread as well. Strict mode has been disabled. Sadly, It did not solve the problem.

Posts: 12


AgentPhoenix Tue Feb 26, 2013 2:22 pm

Re: Error Number: 1364

My guess then would be it's a Windows issue. I don't know much about the server-side administration piece. I have two machines I develop on, one is a Mac, so it's all UNIX based and the other is a Win7 machine, but everything runs through WAMP, not individually compiled components and it just works out of the box for me.
User avatar

Posts: 7596


Rotten_Emu Tue Feb 26, 2013 2:25 pm

Re: Error Number: 1364

Thanks for your time and effort, too bad we couldn't fix it without re-installing the server OS...
User avatar

Posts: 13


LcNessie Thu Jul 05, 2018 5:09 am

Re: Error Number: 1364

Hello, me again...

I just ran into error 1364 again, this time on the WIKI pages.
It would appear that a certain value is required, but no default value is given, causing problems when creating a new page.

I just assigned a default value of "1" to the following field, using phpmyadmin:

Table: nova_wiki_pages
Field: page_draft
Default : As defined : 1

This seems to have alleviated the problem. I asked John to do some rigorous testing afterwards, though. I have no idea whether this is a good solution. It seems to work for now...

Posts: 12


AgentPhoenix Thu Jul 05, 2018 9:24 am

Re: Error Number: 1364

Probably caused by either MySQL being in strict mode or an issue with the latest version of MySQL. We've caught most of them, but there's always a possibility that one snuck through. I'll double check the PR that's out there for this stuff.
User avatar

Posts: 7596


Next

Return to Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron