This error I see was a problem
back in 2007 and it still hasn't been addressed unfortunately in 2.8.1
The fact is that there are a few issues, and they are due to database compatibility with the latest mysql 5.x versions
The root causes...
In Mysql 4.x, auto-increment fields could be set to '' and `text` fields could be ignored
In Mysql 5.x, auto-increment fields must be set to NULL and `text` fields must be given a value on insert
The quick fix to fix all the errors, is to simply add:
mysql_query('set @@session.sql_mode="MYSQL40"');
in the database class in the connect() function right below this line:
$status = $this->db_handle = mysql_connect(DB_HOST, DB_USERNAME, DB_PASSWORD);
But the proper fix is below:
I've stepped through the installer in a php debugger and spotted many places a mysql_error is triggered, but there was no stop point so it just went until it got to the final error on the setting table for the 'value' field not getting an entry, which apparently is required for TEXT fields in 5.x mysql.
So here are the many fixes:
OPEN: install/save.php
ISSUE 1: home_folder needs a valueFIND (~LINE 559):
$insert_admin_user = "INSERT INTO `".TABLE_PREFIX."users` (user_id,group_id,groups_id,active,username,password,email,display_name) VALUES ('1','1','1','1','$admin_username','".md5($admin_password)."','$admin_email','Administrator')";
REPLACE WITH:
$insert_admin_user = "INSERT INTO `".TABLE_PREFIX."users` (user_id,group_id,groups_id,active,username,password,email,display_name,home_folder) VALUES ('1','1','1','1','$admin_username','".md5($admin_password)."','$admin_email','Administrator','')";
ISSUE 2: search_id in search queries should be NULL not ''GLOBALLY REPLACE:
VALUES ('',
WITH:
VALUES (NULL,
The next problem that causes the dreaded Field 'value' doesn't have a default value is this line in the save.php file:
$database->query("INSERT INTO `".TABLE_PREFIX."search` (name) VALUES ('template')");
You are specifying the 'name' but no 'value'.
Replace it with:
$database->query("INSERT INTO `".TABLE_PREFIX."search` VALUES (NULL, 'template', '', '')");
CLOSE save.php
The next issue is for the mod_captcha ct_text not having a default value
OPEN: wb/modules/captcha_control/install.php
FIND AT THE END:
$database->query("
INSERT INTO `$table`
(`enabled_captcha`, `enabled_asp`, `captcha_type`)
VALUES
('1', '1', 'calc_text')
");
REPLACE WITH:
$database->query("
INSERT INTO `$table`
(`enabled_captcha`, `enabled_asp`, `captcha_type`, `ct_text`)
VALUES
('1', '1', 'calc_text', '')
");
CLOSE the mod_captcha/install.php file
The next one is in modules/code/install.php
OPEN: wb/modules/code/install.php
FIND:
$database->query("INSERT INTO ".TABLE_PREFIX."mod_code (page_id,section_id) VALUES ('0','0')");
REPLACE WITH:
$database->query("INSERT INTO ".TABLE_PREFIX."mod_code (page_id,section_id, content) VALUES ('0','0','')");
more to come tomorrow...