MyBB Community Forums

Full Version: Install fails at Create Administrator Account
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm installing MyBB v 1.6.4 against MySQL 5.5.16 and php 5.3.8, all on XP (need to validate the setup before I install it on a server). During the install process, things go as expected until the create administrator account section. Instead of the dialog to enter a user name and password, I get the following:
________________________________________________
Create Administrator Account

Setting up basic board settings...
Inserted 195 settings into 21 groups.
Updating settings with user defined values.
Inserted 11 scheduled tasks.
MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.
SQL Error:
1364 - Field 'custom_profile_fields' doesn't have a default value
Query:
INSERT INTO mybb_adminviews (uid,type,visibility,title,fields,conditions,sortby,sortorder,perpage,view_type) VALUES ('0','user','2','All Users','a:7:{i:0;s:6:\"avatar\";i:1;s:8:\"username\";i:2;s:5:\"email\";i:3;s:7:\"regdate\";i:4;s:10:\"lastactive\";i:5;s:7:\"postnum\";i:6;s:8:\"controls\";}','a:0:{}','username','asc','20','card')

Please contact the MyBB Group for support.
________________________________________________

The mybb_adminviews table has two additional fields that are not mentioned in the insert statement, the "custom_profile_fields" field, and the "vid" field. While am am not really familiar with how MySQL works, it appears enough like MS SQL that this suggests that "custom_profile_field" is a required column.

I've tried adding a temporary value ("temp") for "custom_profile_fields" to the INSERT statement, and the statement works fine. However, I suspect that this is going to cause reference problems somewhere. It is likely that others are having the same issue on install.

This is a relatively easy fix. In the file mysql_db_tables.php in the .\install\resources directory, remove the text "NOT NULL" from the "custom_profile_fields" variable in the "CREATE TABLE mybb_adminviews" section. With this requirement gone, the install runs to completion.

I'm not sure if this will cause a problem in the actual operation of the forums.