[horde] TURBA: Failed to access the address book: The address book "" does not exist.
spdesai@gnvfc.net
spdesai at gnvfc.net
Sat Nov 4 02:08:55 PST 2006
dear,
i have checked source.php file but i cant find any error pl. check my
source.php file and let me know if any error.
thanks
====================================================================
$cfgSources['localsql'] = array(
'title' => _("My Address Book"),
'type' => 'sql',
// The default connection details are pulled from the Horde-wide SQL
// connection configuration.
//
// The old example illustrates how to use an alternate database
// configuration.
//
// New Example:
'params' => array_merge($conf['sql'], array('table' => 'turba_objects')),
// Old Example:
// 'params' => array(
// 'phptype' => 'mysql',
// 'hostspec' => 'localhost',
// 'username' => 'horde',
// 'password' => '*****',
// 'database' => 'horde',
// 'table' => 'turba_objects',
// 'charset' => 'iso-8859-1'
// ),
// Using two tables as datasource.
// 'params' => array_merge($conf['sql'],
// array('table' => 'leaddetails LEFT JOIN
leadaddress ON leaddetails.leadid = leadaddress.leadaddressid',
// 'filter' => 'leaddetails.converted = 0')),
'map' => array(
'__key' => 'object_id',
'__owner' => 'owner_id',
'__type' => 'object_type',
'__members' => 'object_members',
'__uid' => 'object_uid',
'name' => 'object_name',
'email' => 'object_email',
'alias' => 'object_alias',
'homeAddress' => 'object_homeaddress',
'workAddress' => 'object_workaddress',
'homePhone' => 'object_homephone',
'workPhone' => 'object_workphone',
'cellPhone' => 'object_cellphone',
'fax' => 'object_fax',
'title' => 'object_title',
'company' => 'object_company',
'notes' => 'object_notes',
'pgpPublicKey' => 'object_pgppublickey',
'smimePublicKey' => 'object_smimepublickey',
'freebusyUrl' => 'object_freebusyurl'
),
'search' => array(
'name',
'email'
),
'strict' => array(
'object_id',
'owner_id',
'object_type',
),
'export' => true,
'browse' => true,
'use_shares' => true,
);
if (Util::extensionExists('ldap')) {
if (!empty($GLOBALS['conf']['imsp']['enabled']) ||
!isset($GLOBALS['conf']['imsp']['enabled'])) {
// First, get the user name to login to IMSP server with.
$uid = $GLOBALS['prefs']->getValue('imsp_auth_user');
$pass = $GLOBALS['prefs']->getValue('imsp_auth_pass');
if (!strlen($uid)) {
$uid = Auth::getBareAuth();
$pass = Auth::getCredential('password');
}
// Note we always use the horde username to append to the key even if we
// have an alternate username set in prefs. This is to prevent the
// (fringe) case where an IMSP username for one user might be a valid
// horde username for another user.
$cfgKey = 'IMSP_' . Auth::getAuth();
$cfgSources[$cfgKey] = array(
'title' => _("IMSP"),
'type' => 'imsp',
'params' => array(
'server' => $GLOBALS['conf']['imsp']['server'],
'port' => $GLOBALS['conf']['imsp']['port'],
'auth_method' => $GLOBALS['conf']['imsp']['auth_method'],
// socket, command, and auth_mechanism are for imtest driver.
'socket' => isset($GLOBALS['conf']['imsp']['socket']) ?
$GLOBALS['conf']['imsp']['socket'] . $uid . '.sck' :
'',
'command' => isset($GLOBALS['conf']['imsp']['command']) ?
$GLOBALS['conf']['imsp']['command'] : '' ,
'auth_mechanism' => isset($GLOBALS['conf']['imsp']
['auth_mechanism']) ?
$GLOBALS['conf']['imsp']
['auth_mechanism'] : '',
'username' => $uid,
'password' => $pass,
'name' => $uid,
'group_id_field' => 'group',
'group_id_value' => 'group',
'contact_ownership' => false,
// Dynamically generated acl rights for current user.
'my_rights' => '',
// Flags this as the user's 'root' IMSP address book.
'is_root' => true
),
'map' => array(
'__key' => 'name',
'__type' => '__type',
'__members' => '__members',
'__owner' => '__owner',
'__uid' => '__uid',
'name' => 'fullname',
'email' => 'email',
'alias' => 'alias',
'company' => 'company',
'notes' => 'notes',
'workPhone' => 'phone-work',
'fax' => 'fax',
'homePhone' => 'phone-home',
'cellPhone' => 'cellphone',
'freebusyUrl' => 'freebusyUrl'
),
'search' => array(
'name',
'email',
'alias',
'company', ),
'strict' => array(),
'export' => true,
'browse' => true,
);
require_once 'Net/IMSP/Utils.php';
$result = Net_IMSP_Utils::getAllBooks($cfgSources[$cfgKey]);
$count = 2;
if (!is_a($result, 'PEAR_Error')) {
$resultCount = count($result);
for ($i = 0; $i < $resultCount; $i++) {
// Make sure we didn't define this source explicitly,
// but set the acls from the server regardless.
$dup = false;
foreach ($cfgSources as $key => $thisSource) {
if (($thisSource['type'] == 'imsp') &&
($thisSource['params']['name'] == $result[$i]['params']
['name'])) {
$dup = true;
$acl = $result[$i]['params']['my_rights'];
$cfgSources[$key]['params']['my_rights'] = $acl;
break;
}
}
if (!$dup) {
$cfgSources[sprintf('IMSP_%d', $count++)] = $result[$i];
}
}
} else {
$notification->push($result);
}
}
/* End IMSP sources. */
/* Begin Kolab sources. */
if (!empty($GLOBALS['conf']['kolab']['enabled'])) {
$cfgSources['kolab_global'] = array(
'title' => _("Global Address Book"),
'type' => 'ldap',
'params' => array(
'server' => $GLOBALS['conf']['kolab']['ldap']['server'],
'port' => $GLOBALS['conf']['kolab']['ldap']['port'],
'tls' => false,
'root' => $GLOBALS['conf']['kolab']['ldap']['basedn'],
'sizelimit' => 200,
'dn' => array('cn'),
'objectclass' => array(
'top',
'inetOrgPerson'
),
'scope' => 'one',
'charset' => 'iso-8859-1',
'version' => 3,
'bind_dn' => $GLOBALS['conf']['kolab']['ldap']['binddn'],
'bind_password' => $GLOBALS['conf']['kolab']['ldap']['bindpw'],
),
'map' => array(
'__key' => 'dn',
'name' => 'cn',
'firstname' => 'givenName',
'lastname' => 'sn',
'email' => 'mail',
'alias' => 'alias',
'title' => 'title',
'company' => 'o',
'workStreet' => 'street',
'workCity' => 'l',
'workProvince' => 'st',
'workPostalCode' => 'postalCode',
'workCountry' => 'c',
'homePhone' => 'homePhone',
'workPhone' => 'telephoneNumber',
'cellPhone' => 'mobile',
'fax' => 'fax',
'notes' => 'description',
'freebusyUrl' => 'kolabHomeServer',
),
'search' => array(
'name',
'firstname',
'lastname',
'email',
'title',
'company',
'workAddress',
'workCity',
'workProvince',
'workPostalCode',
'workCountry',
'homePhone',
'workPhone',
'cellPhone',
'fax',
'notes',
),
'strict' => array(
'dn',
),
'export' => true,
'browse' => true,
);
/**
* A local address book for a Kolab user. This is stored in a specially
* flagged 'Contacts' folder within the users Cyrus IMAP mailbox. By
* default this folder can only be accessed by its owner, however it can
* be shared via Cyrus ACLs.
*/
// We need to sync our (dummy) share list for Turba, and as Turba does not
// use Horde_Share we can't rely on a _horde_hook_share_init() call, so we
// perform the same task here.
require_once 'Horde/Kolab.php';
$dummy = null;
Kolab::synchroniseShares($dummy, 'turba');
// TODO: auto-generate a $cfgSources[] entry for every contact folder that
// the user has access to, setting 'title' to the name of the specific
// folder.
$cfgSources['kolab_local'] = array(
'title' => 'My Contacts',
'type' => 'kolab',
'params' => array(
'share' => Auth::getAuth(),
),
'map' => array(
'__key' => 'uid',
'__owner' => 'owner',
//'__uid' => 'uid',
'name' => 'full-name',
'firstname' => 'given-name',
'lastname' => 'last-name',
'title' => 'job-title',
'company' => 'organization',
'notes' => 'body',
'website' => 'web-page',
'nickname' => 'nick-name',
'email' => 'smtp-address',
'homeStreet' => 'home-street',
'homeCity' => 'home-locality',
'homeProvince' => 'home-region',
'homePostalCode' => 'home-postal-code',
'homeCountry' => 'home-country',
'workStreet' => 'business-street',
'workCity' => 'business-locality',
'workProvince' => 'business-region',
'workPostalCode' => 'business-postal-code',
'workCountry' => 'business-country',
'homePhone' => 'home1',
'workPhone' => 'business1',
'cellPhone' => 'mobile',
'fax' => 'businessfax',
),
'search' => array(
'name',
'firstname',
'lastname',
'email',
'title',
'company',
'homeStreet',
'homeCity',
'homeProvince',
'homePostalCode',
'homeCountry',
'workStreet',
'workCity',
'workProvince',
'workPostalCode',
'workCountry',
'homePhone',
'workPhone',
'cellPhone',
'fax',
'notes',
'website',
'nickname',
),
'strict' => array(
'uid'
),
'export' => true,
'browse' => true,
======================================================================
Quoting Craig White <craigwhite at azapple.com>:
> On Fri, 2006-11-03 at 14:38 +0530, spdesai at gnvfc.net wrote:
> >
> > ----- Forwarded message from "spdesai at gnvfc.net" <spdesai at gnvfc.net> -----
> > Date: Fri, 3 Nov 2006 09:26:55 +0530
> > From: "spdesai at gnvfc.net" <spdesai at gnvfc.net>
> > Reply-To: "spdesai at gnvfc.net" <spdesai at gnvfc.net>
> > Subject: [horde] Turba address book error
> > To: "horde at lists.horde.org" <horde at lists.horde.org>
> >
> > Dear All,
> >
> > I have running latest version of horde/imp/turba on rhle.
> >
> > i can create address book successfully but when i go for
> search.import/export
> > i m getting error like
> >
> > Failed to access the address book: The address book "" does not exist.
> >
> > my /turba/config/conf.php file as per below
> >
> > <?php
> > /* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
> > // $Horde: turba/config/conf.xml,v 1.6.2.3 2006/05/09 15:58:10 jan Exp $
> > $conf['menu']['import_export'] = true;
> > $conf['menu']['apps'] = array('turba');
> > $conf['client']['addressbook'] = 'localsql';
> > $conf['shares']['source'] = 'localsql';
> > $conf['comments']['allow'] = true;
> > $conf['documents']['type'] = 'horde';
> > /* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
> >
> > i have created db table turba_objects as per given script..in turba
> ----
> make sure that you configure horde/turba/config/sources.php and remove
> all the sources you don't need and that the one (apparently localsql)
> exists and is properly configured.
>
> Craig
>
> --
> Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
More information about the horde
mailing list