With respect to version 8.1.15 there is a discrepance between the file addressbook.sql creating a database with fields im, im2, im3 and the INSERT-command in file "include\address.class.php" (line 86) which does not care for this fields. As a workaround the lines regarding im can be removed from addressbook.sql prior creating the database. As long as this discrepancy is not removed it is not possible to add or edit entries.
Anonymous
Hi. there should be no issue with this columns.
=> What was the error displayed?
There is no error message displayed. After filling out the form (edit.php) and clicking to the "save"-button the homepage (index.php) is displayed but without the newly enterred address. (Even if I create an entry using php MyAdmin, this entry is displayed on the homepage correctly but - after editing and saving - the entry disappears.)
If I debug and capture the INSERT SQL-Statement (include\address.class.php line 73) and try to enter the command manually at a mysql prompt I get the following result:
mysql> INSERT INTO addressbook ( domain_id, id, firstname, lastname, nickname, c
ompany, title, address, home, mobile, work, fax, email, email2, email3, homepage
, aday, amonth, ayear, bday, bmonth, byear, address2, phone2, photo, notes, crea
ted, modified) SELECT 0 domain_id , ifnull(max(id),0)+1 id , 'test' firstname ,
'test' lastname , '' nickname , '' company , '' title , '' address , '' home , '
' mobile , '' work , '' fax , '' email , '' email2 , '' email3 , '' homepage , '
1' aday , '-' amonth , '' ayear , '1' bday , '-' bmonth , '' byear , '' address2
, '' phone2 , '' photo , '' notes , now(), now() FROM addressbook;
ERROR 1364 (HY000): Field 'im' doesn't have a default value
The system is a Windows IIS 6.1 with PHP Version 5.3.15 and 5.5.28 MySQL Community Server (GPL).
Do you use "innodb_strict_mode"?
- http://stackoverflow.com/questions/5000547/error-1364-hy000-field-my-date-doesnt-have-a-default-value
The installation works without any problems under:
- MySQL (client) 5.1.63
- PHP Version 5.3.3-7+squeeze14
- Linux
And under this windows setup too:
- XAMPP 1.9.1-VC9
- Windows 7
- Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7
- PHP Version 5.4.7
- MySQL 5.5.27
Did you change the config (not only user/pass/server/db)?
status: open --> pending
The configuration "innodb_strict_mode" is not used but the MySQL ini-file (my.ini) contains
[mysqld]
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
If the STRICT_TRANS_TABLES is removed the problem dissapears and new entries can be added without problem.
The configuration of MySQL for Windows was out of the box (http://dev.mysql.com/downloads/mysql/) without any modifications.
Add mysql_query("SET SQL_MODE = 'MYSQL40';"); to dbconnect.php