#138 can not add new contacts

v1.0_(example)
closed
nobody
6
2012-10-29
2012-10-15
Bauer
No

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.

Discussion

  • chatelao

    chatelao - 2012-10-15

    Hi. there should be no issue with this columns.
    => What was the error displayed?

     
  • Bauer

    Bauer - 2012-10-15

    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).

     
  • chatelao

    chatelao - 2012-10-15

    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 install from the scratch or upgrade from an older version?
    • Did you change the config (not only user/pass/server/db)?

    • status: open --> pending

     
  • Bauer

    Bauer - 2012-10-18

    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.

     
  • chatelao

    chatelao - 2012-10-29

    Add mysql_query("SET SQL_MODE = 'MYSQL40';"); to dbconnect.php

     
  • chatelao

    chatelao - 2012-10-29
    • status: pending --> closed
     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks