Error Code: 1364

Look here if you're having trouble with BitShop
jhonde
Posts: 2
Joined: Fri Jan 13, 2017 12:41 pm

Error Code: 1364

Postby jhonde » Sat Feb 11, 2017 10:57 am

The application encountered a fatal database error.

Error Code:

1364

Error Message:

Field 'RealName' doesn't have a default value

MySQL Query:

INSERT INTO Accounts (Email, PassHash, PermGroup)
VALUES ('admin', 'ca793c101e80a32ecb4d2ce743eba3c04231cba36e46fc4aab90d2ca0d0da778', 2)

User avatar
bitfreak
Site Admin
Posts: 73
Joined: Thu Dec 10, 2015 6:57 pm
Location: Australia
Contact:

Re: Error Code: 1364

Postby bitfreak » Tue Apr 11, 2017 2:56 pm

Probably due to your mysql configuration according to this: mysql error 1364 Field doesn't have a default values

User avatar
bitfreak
Site Admin
Posts: 73
Joined: Thu Dec 10, 2015 6:57 pm
Location: Australia
Contact:

Re: Error Code: 1364

Postby bitfreak » Wed Apr 12, 2017 4:03 pm

As I was updating BitShop to work with PHP 7 I had a similar problem so I assume it's something to do with the default settings of newer versions of MySQL. I just released a new version of BitShop and I have included a sql script in the installation folder which should allow you to fix your existing database and get rid of these errors. If you do a fresh install of BitShop v1.1.3 then you wont need to apply the fix obviously. For anyone having issues with creating new products or placing new orders, this fix should help with that too. Here is the MySQL fix for those who cannot download the latest version of BitShop:

Code: Select all

ALTER TABLE Products MODIFY COLUMN FileVoteSum INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE Products MODIFY COLUMN FileVoteNum INT UNSIGNED NOT NULL DEFAULT 0;

ALTER TABLE Accounts MODIFY COLUMN PassHash VARCHAR(64) NOT NULL DEFAULT '';
ALTER TABLE Accounts MODIFY COLUMN RealName VARCHAR(50) NOT NULL DEFAULT '';
ALTER TABLE Accounts MODIFY COLUMN Email varchar(50) NOT NULL DEFAULT '';
ALTER TABLE Accounts MODIFY COLUMN Phone VARCHAR(20) NOT NULL DEFAULT '';
ALTER TABLE Accounts MODIFY COLUMN Settings TINYTEXT;
ALTER TABLE Accounts MODIFY COLUMN LastIP TINYTEXT;

ALTER TABLE Orders MODIFY COLUMN Amount DECIMAL(18,8) NOT NULL DEFAULT 0;
ALTER TABLE Orders MODIFY COLUMN Currency VARCHAR(5) NOT NULL DEFAULT '';


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 1 guest