Addressbook with MySQL

Mimmus viggiani@yahoo.com
Wed, 28 Nov 2001 14:15:29 +0100


I tried to configure IMP/Turba to store personal addressbooks in MySQL but I
got the following error message:

Fatal error: Call to undefined function: addobject() in
/usr/local/horde/turba/data.php on line 121

.../horde/test.php output is OK.
MySQL support works well in IMP.
These was my steps: I created the following table:

CREATE TABLE turba_objects (
object_id varchar(32) NOT NULL,
owner_id varchar(32) NOT NULL,
object_name varchar(255),
object_email varchar(255),
object_homeAddress varchar(255),
object_workAddress varchar(255),
object_homePhone varchar(25),
object_workPhone varchar(25),
object_cellPhone varchar(25),
object_fax varchar(25),
object_title varchar(32),
object_company varchar(32),
object_notes text,
PRIMARY KEY (object_id)
);

in the 'horde' database.
Then, I configured .../turba/config/sources.php as:

$cfgSources['contatti'] = array(
    'title' => 'Contatti',
    'type' => 'sql',
    'params' => array(
        'phptype' => 'mysql',
        'hostspec' => 'localhost',
        'username' => 'hordmgr',
        'password' => 'xxxxxxx',
        'database' => 'horde',
        'options' => '',
        'tty' => '',
        'port' => '5432',
        'protocol' => 'unix',
        'table' => 'turba_objects'
    ),
    'map' => array(
        '__key' => 'object_id',
        '__owner' => 'owner_id',
        'name' => 'name',
        'email' => 'email',
        'homeAddress' => 'homeAddress',
        'workAddress' => 'workAddress',
        'homePhone' => 'homePhone',
        'workPhone' => 'workPhone',
        'cellPhone' => 'cellPhone',
        'fax' => 'fax',
        'title' => 'title',
        'company' => 'company',
        'notes' => 'notes'
    ),
    'search' => array(
        'name',
        'email'
    ),
    'strict' => array(
        'object_id'
    ),
    'public' => false,
    'readonly' => false,
    'export' => true
);

Any help? References?
Unfortunately, Turba comes with no documentation at all.

Thanks
Domenico Viggiani


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com