Discussion:
[turba] Contact View with ldap backend not working
Philipp Faeustlin
2017-11-28 15:05:03 UTC
Permalink
Hi list,

I try to setup an read-only ldap backend which is only searchable. My
turba backend configuration works to the point where I can search for
an entry and get some results displayed.

When I try to view, copy or download vcard on one of the results, I
get an "Read error: (2) Protocol error"

My Horde Turba Version is 4.2.21 from pear.

My backend config look like this:
$cfgSources['localldap'] = array(
    'disabled' => false,
    'title' => "Co-Workers",
    'type' => 'ldap',
    'params' => array(
        'server' => 'ldaps://localhost',
        'port' => 636,
        'tls' => false,
        'root' => 'o=localhost,c=DE',
        'scope' => 'sub',
        'charset' => 'utf-8',
        'checkrequired' => false,
        'checkrequired_string' => ' ',
        'checksyntax' => false,
        'version' => 3,
        'sizelimit' => 3,
    ),
    'map' => array(
        '__key' => 'dn',
        'name' => 'cn',
        'email' => 'mail',
        'lastname' => 'sn',
        'company' => 'ou',
    ),
    'tabs' => array(
        'All' => array(
            'name',
            'email',
            'lastname',
            'company'
        )
    ),
    'search' => array(
        'name',
        'email',
        'lastname',
        'company'
    ),
    'strict' => array(
        'dn'
    ),
    'approximate' => array(
        'cn', 'sn'
    ),
    'export' => false,
    'browse' => false,
    'use_shares' => false,
    'all_shares' => false,
);

---

The horde global rights for this addressbook are show/view.

Where is my mistake, what is missing?

My horde.log is showing some PHP Error, perhaps they are related, but
I don't know their meaning, or how to solve them:
-- horde.log --
2017-11-28T15:57:20+01:00 DEBUG: HORDE [turba] PHP ERROR: Declaration
of Horde_Form_Type_country::init() should be compatible with
Horde_Form_Type::init() [pid 13076 on line 0 of
"/usr/share/pear/Horde/Form/Type.php"]
2017-11-28T15:57:20+01:00 DEBUG: HORDE [turba] PHP ERROR: Non-static
method Horde_Form::getType() should not be called statically, assuming
$this from incompatible context [pid 13076 on line 75 of
"/var/www/webmail/turba/templates/browse/row.inc"]
2017-11-28T15:57:20+01:00 DEBUG: HORDE [turba] PHP ERROR: Only
variables should be passed by reference [pid 13076 on line 75 of
"/var/www/webmail/turba/templates/browse/row.inc"]
-- --
Philipp Fäustlin
Universität Hohenheim
--
turba mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail:
Jan Schneider
2017-12-07 11:40:08 UTC
Permalink
Post by Philipp Faeustlin
Hi list,
I try to setup an read-only ldap backend which is only searchable.
My turba backend configuration works to the point where I can search
for an entry and get some results displayed.
When I try to view, copy or download vcard on one of the results, I
get an "Read error: (2) Protocol error"
My Horde Turba Version is 4.2.21 from pear.
$cfgSources['localldap'] = array(
    'disabled' => false,
    'title' => "Co-Workers",
    'type' => 'ldap',
    'params' => array(
        'server' => 'ldaps://localhost',
        'port' => 636,
        'tls' => false,
        'root' => 'o=localhost,c=DE',
        'scope' => 'sub',
        'charset' => 'utf-8',
        'checkrequired' => false,
        'checkrequired_string' => ' ',
        'checksyntax' => false,
        'version' => 3,
        'sizelimit' => 3,
    ),
    'map' => array(
        '__key' => 'dn',
        'name' => 'cn',
        'email' => 'mail',
        'lastname' => 'sn',
        'company' => 'ou',
    ),
    'tabs' => array(
        'All' => array(
            'name',
            'email',
            'lastname',
            'company'
        )
    ),
    'search' => array(
        'name',
        'email',
        'lastname',
        'company'
    ),
    'strict' => array(
        'dn'
    ),
    'approximate' => array(
        'cn', 'sn'
    ),
    'export' => false,
    'browse' => false,
    'use_shares' => false,
    'all_shares' => false,
);
---
The horde global rights for this addressbook are show/view.
Where is my mistake, what is missing?
My horde.log is showing some PHP Error, perhaps they are related,
-- horde.log --
Declaration of Horde_Form_Type_country::init() should be compatible
with Horde_Form_Type::init() [pid 13076 on line 0 of
"/usr/share/pear/Horde/Form/Type.php"]
2017-11-28T15:57:20+01:00 DEBUG: HORDE [turba] PHP ERROR: Non-static
method Horde_Form::getType() should not be called statically,
assuming $this from incompatible context [pid 13076 on line 75 of
"/var/www/webmail/turba/templates/browse/row.inc"]
2017-11-28T15:57:20+01:00 DEBUG: HORDE [turba] PHP ERROR: Only
variables should be passed by reference [pid 13076 on line 75 of
"/var/www/webmail/turba/templates/browse/row.inc"]
-- --
Philipp Fäustlin
Universität Hohenheim
None of these messages from horde.log are relevant. Try checking the
LDAP logs.
--
Jan Schneider
The Horde Project
https://www.horde.org/
--
turba mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: turba-***@lists.ho
Philipp Faeustlin
2017-12-12 16:36:36 UTC
Permalink
Post by Jan Schneider
Post by Philipp Faeustlin
Hi list,
I try to setup an read-only ldap backend which is only searchable. My
turba backend configuration works to the point where I can search for
an entry and get some results displayed.
When I try to view, copy or download vcard on one of the results, I
get an "Read error: (2) Protocol error"
My Horde Turba Version is 4.2.21 from pear.
$cfgSources['localldap'] = array(
    'disabled' => false,
    'title' => "Co-Workers",
    'type' => 'ldap',
    'params' => array(
        'server' => 'ldaps://localhost',
        'port' => 636,
        'tls' => false,
        'root' => 'o=localhost,c=DE',
        'scope' => 'sub',
        'charset' => 'utf-8',
        'checkrequired' => false,
        'checkrequired_string' => ' ',
        'checksyntax' => false,
        'version' => 3,
        'sizelimit' => 3,
    ),
    'map' => array(
        '__key' => 'dn',
        'name' => 'cn',
        'email' => 'mail',
        'lastname' => 'sn',
        'company' => 'ou',
    ),
    'tabs' => array(
        'All' => array(
            'name',
            'email',
            'lastname',
            'company'
        )
    ),
    'search' => array(
        'name',
        'email',
        'lastname',
        'company'
    ),
    'strict' => array(
        'dn'
    ),
    'approximate' => array(
        'cn', 'sn'
    ),
    'export' => false,
    'browse' => false,
    'use_shares' => false,
    'all_shares' => false,
);
---
The horde global rights for this addressbook are show/view.
Where is my mistake, what is missing?
My horde.log is showing some PHP Error, perhaps they are related, but
-- horde.log --
2017-11-28T15:57:20+01:00 DEBUG: HORDE [turba] PHP ERROR: Declaration
of Horde_Form_Type_country::init() should be compatible with
Horde_Form_Type::init() [pid 13076 on line 0 of
"/usr/share/pear/Horde/Form/Type.php"]
2017-11-28T15:57:20+01:00 DEBUG: HORDE [turba] PHP ERROR: Non-static
method Horde_Form::getType() should not be called statically, assuming
$this from incompatible context [pid 13076 on line 75 of
"/var/www/webmail/turba/templates/browse/row.inc"]
2017-11-28T15:57:20+01:00 DEBUG: HORDE [turba] PHP ERROR: Only
variables should be passed by reference [pid 13076 on line 75 of
"/var/www/webmail/turba/templates/browse/row.inc"]
-- --
 Philipp FÀustlin
UniversitÀt Hohenheim
None of these messages from horde.log are relevant. Try checking the
LDAP logs.
It tooks some time but I found the problem and a solution.

The problem was an empty "$filter" variable in the _read function of
"turba/lib/Driver/Ldap.php".
The $filter variable is used in the @ldap_read function, which doesn't
allow an empty filter.
http://php.net/manual/en/function.ldap-read.php

My solution is to use the 'objectclass' parameter in the backend
configuration, then it works fine.

But I think it would be nice to set the $filter variable to
"objectClass=*" instead of "null" when missing the objectclass params
for the backend configuration.
Or document the objectclass parameter as mandetory for the ldap backend.
--
Philipp FÀustlin
Jan Schneider
2017-12-12 16:40:28 UTC
Permalink
Post by Philipp Faeustlin
Post by Jan Schneider
Post by Philipp Faeustlin
Hi list,
I try to setup an read-only ldap backend which is only searchable.
My turba backend configuration works to the point where I can
search for an entry and get some results displayed.
When I try to view, copy or download vcard on one of the results,
I get an "Read error: (2) Protocol error"
My Horde Turba Version is 4.2.21 from pear.
$cfgSources['localldap'] = array(
    'disabled' => false,
    'title' => "Co-Workers",
    'type' => 'ldap',
    'params' => array(
        'server' => 'ldaps://localhost',
        'port' => 636,
        'tls' => false,
        'root' => 'o=localhost,c=DE',
        'scope' => 'sub',
        'charset' => 'utf-8',
        'checkrequired' => false,
        'checkrequired_string' => ' ',
        'checksyntax' => false,
        'version' => 3,
        'sizelimit' => 3,
    ),
    'map' => array(
        '__key' => 'dn',
        'name' => 'cn',
        'email' => 'mail',
        'lastname' => 'sn',
        'company' => 'ou',
    ),
    'tabs' => array(
        'All' => array(
            'name',
            'email',
            'lastname',
            'company'
        )
    ),
    'search' => array(
        'name',
        'email',
        'lastname',
        'company'
    ),
    'strict' => array(
        'dn'
    ),
    'approximate' => array(
        'cn', 'sn'
    ),
    'export' => false,
    'browse' => false,
    'use_shares' => false,
    'all_shares' => false,
);
---
The horde global rights for this addressbook are show/view.
Where is my mistake, what is missing?
My horde.log is showing some PHP Error, perhaps they are related,
-- horde.log --
Declaration of Horde_Form_Type_country::init() should be
compatible with Horde_Form_Type::init() [pid 13076 on line 0 of
"/usr/share/pear/Horde/Form/Type.php"]
Non-static method Horde_Form::getType() should not be called
statically, assuming $this from incompatible context [pid 13076 on
line 75 of "/var/www/webmail/turba/templates/browse/row.inc"]
2017-11-28T15:57:20+01:00 DEBUG: HORDE [turba] PHP ERROR: Only
variables should be passed by reference [pid 13076 on line 75 of
"/var/www/webmail/turba/templates/browse/row.inc"]
-- --
 Philipp Fäustlin
Universität Hohenheim
None of these messages from horde.log are relevant. Try checking
the LDAP logs.
It tooks some time but I found the problem and a solution.
The problem was an empty "$filter" variable in the _read function of
"turba/lib/Driver/Ldap.php".
doesn't allow an empty filter.
http://php.net/manual/en/function.ldap-read.php
My solution is to use the 'objectclass' parameter in the backend
configuration, then it works fine.
But I think it would be nice to set the $filter variable to
"objectClass=*" instead of "null" when missing the objectclass
params for the backend configuration.
Or document the objectclass parameter as mandetory for the ldap backend.
Patch?
--
Jan Schneider
The Horde Project
https://www.horde.org/
--
turba mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: turba-uns
Philipp Faeustlin
2017-12-13 15:00:04 UTC
Permalink
Post by Jan Schneider
Post by Philipp Faeustlin
Post by Jan Schneider
Post by Philipp Faeustlin
Hi list,
I try to setup an read-only ldap backend which is only searchable.
My turba backend configuration works to the point where I can search
for an entry and get some results displayed.
When I try to view, copy or download vcard on one of the results, I
get an "Read error: (2) Protocol error"
My Horde Turba Version is 4.2.21 from pear.
$cfgSources['localldap'] = array(
    'disabled' => false,
    'title' => "Co-Workers",
    'type' => 'ldap',
    'params' => array(
        'server' => 'ldaps://localhost',
        'port' => 636,
        'tls' => false,
        'root' => 'o=localhost,c=DE',
        'scope' => 'sub',
        'charset' => 'utf-8',
        'checkrequired' => false,
        'checkrequired_string' => ' ',
        'checksyntax' => false,
        'version' => 3,
        'sizelimit' => 3,
    ),
    'map' => array(
        '__key' => 'dn',
        'name' => 'cn',
        'email' => 'mail',
        'lastname' => 'sn',
        'company' => 'ou',
    ),
    'tabs' => array(
        'All' => array(
            'name',
            'email',
            'lastname',
            'company'
        )
    ),
    'search' => array(
        'name',
        'email',
        'lastname',
        'company'
    ),
    'strict' => array(
        'dn'
    ),
    'approximate' => array(
        'cn', 'sn'
    ),
    'export' => false,
    'browse' => false,
    'use_shares' => false,
    'all_shares' => false,
);
---
The horde global rights for this addressbook are show/view.
Where is my mistake, what is missing?
My horde.log is showing some PHP Error, perhaps they are related,
-- horde.log --
Declaration of Horde_Form_Type_country::init() should be compatible
with Horde_Form_Type::init() [pid 13076 on line 0 of
"/usr/share/pear/Horde/Form/Type.php"]
2017-11-28T15:57:20+01:00 DEBUG: HORDE [turba] PHP ERROR: Non-static
method Horde_Form::getType() should not be called statically,
assuming $this from incompatible context [pid 13076 on line 75 of
"/var/www/webmail/turba/templates/browse/row.inc"]
2017-11-28T15:57:20+01:00 DEBUG: HORDE [turba] PHP ERROR: Only
variables should be passed by reference [pid 13076 on line 75 of
"/var/www/webmail/turba/templates/browse/row.inc"]
-- --
 Philipp FÀustlin
UniversitÀt Hohenheim
None of these messages from horde.log are relevant. Try checking the
LDAP logs.
It tooks some time but I found the problem and a solution.
The problem was an empty "$filter" variable in the _read function of
"turba/lib/Driver/Ldap.php".
allow an empty filter.
http://php.net/manual/en/function.ldap-read.php
My solution is to use the 'objectclass' parameter in the backend
configuration, then it works fine.
But I think it would be nice to set the $filter variable to
"objectClass=*" instead of "null" when missing the objectclass params
for the backend configuration.
Or document the objectclass parameter as mandetory for the ldap backend.
Patch?
I can only offer a diff of the "./turba/lib/Driver/Ldap.php" against the
actual PEAR version.
Jan Schneider
2018-02-16 17:41:03 UTC
Permalink
Post by Philipp Faeustlin
Post by Jan Schneider
Post by Philipp Faeustlin
Post by Jan Schneider
Post by Philipp Faeustlin
Hi list,
I try to setup an read-only ldap backend which is only
searchable. My turba backend configuration works to the point
where I can search for an entry and get some results displayed.
When I try to view, copy or download vcard on one of the
results, I get an "Read error: (2) Protocol error"
My Horde Turba Version is 4.2.21 from pear.
$cfgSources['localldap'] = array(
    'disabled' => false,
    'title' => "Co-Workers",
    'type' => 'ldap',
    'params' => array(
        'server' => 'ldaps://localhost',
        'port' => 636,
        'tls' => false,
        'root' => 'o=localhost,c=DE',
        'scope' => 'sub',
        'charset' => 'utf-8',
        'checkrequired' => false,
        'checkrequired_string' => ' ',
        'checksyntax' => false,
        'version' => 3,
        'sizelimit' => 3,
    ),
    'map' => array(
        '__key' => 'dn',
        'name' => 'cn',
        'email' => 'mail',
        'lastname' => 'sn',
        'company' => 'ou',
    ),
    'tabs' => array(
        'All' => array(
            'name',
            'email',
            'lastname',
            'company'
        )
    ),
    'search' => array(
        'name',
        'email',
        'lastname',
        'company'
    ),
    'strict' => array(
        'dn'
    ),
    'approximate' => array(
        'cn', 'sn'
    ),
    'export' => false,
    'browse' => false,
    'use_shares' => false,
    'all_shares' => false,
);
---
The horde global rights for this addressbook are show/view.
Where is my mistake, what is missing?
My horde.log is showing some PHP Error, perhaps they are
-- horde.log --
Declaration of Horde_Form_Type_country::init() should be
compatible with Horde_Form_Type::init() [pid 13076 on line 0 of
"/usr/share/pear/Horde/Form/Type.php"]
Non-static method Horde_Form::getType() should not be called
statically, assuming $this from incompatible context [pid 13076
on line 75 of "/var/www/webmail/turba/templates/browse/row.inc"]
2017-11-28T15:57:20+01:00 DEBUG: HORDE [turba] PHP ERROR: Only
variables should be passed by reference [pid 13076 on line 75 of
"/var/www/webmail/turba/templates/browse/row.inc"]
-- --
 Philipp Fäustlin
Universität Hohenheim
None of these messages from horde.log are relevant. Try checking
the LDAP logs.
It tooks some time but I found the problem and a solution.
The problem was an empty "$filter" variable in the _read function
of "turba/lib/Driver/Ldap.php".
doesn't allow an empty filter.
http://php.net/manual/en/function.ldap-read.php
My solution is to use the 'objectclass' parameter in the backend
configuration, then it works fine.
But I think it would be nice to set the $filter variable to
"objectClass=*" instead of "null" when missing the objectclass
params for the backend configuration.
Or document the objectclass parameter as mandetory for the ldap backend.
Patch?
I can only offer a diff of the "./turba/lib/Driver/Ldap.php" against
the actual PEAR version.
Fixed in Git, thanks!
--
Jan Schneider
The Horde Project
https://www.horde.org/
--
turba mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, m
Continue reading on narkive:
Search results for '[turba] Contact View with ldap backend not working' (Questions and Answers)
3
replies
Required Java syllabus?
started 2007-07-25 22:08:10 UTC
programming & design
Loading...