#1488562 closed Bugs (worksforme)

Internal Server Error when switching to another page in found contacts (LDAP Addressbook)

Reported by: nivago Owned by:
Priority: 7 Milestone: 0.8-stable
Component: Addressbook Version: 0.7.2
Severity: major Keywords: ldap addressbook paged search
Cc: gamegod@…

Description

I have multiple OpenLDAP addressbooks and everything works fine, except search, if it returns paged result. E.g. search shows 172 contacts found (same number as if I search via OpenLDAP internal tool), RC splits it into a few pages (size of page, i.e. contacts shown per each, doesn't matter); contacts on first page are shown correctly, but if I click to show next page, I get 500 internal server error, with no contacts shown. Logs show 53 LDAP error code ('Paged result control cookie is invalid or old'). If page size is larger then the number of found contacts, which means it's only one page, all works well.

Also, I've tested similar paged search in Apache Directory Studio and same error happens when I double-click page navigation button, i.e. search request had been sent twice. Search via OpenLDAP tool, ldapsearch, works fine as well.

LDAP database itself was tested and no problems there.

Attachments (1)

tb.inc.php (165.7 KB) - added by nivago 10 months ago.
LDAP addressbooks config

Download all attachments as: .zip

Change History (6)

comment:1 Changed 10 months ago by alec

I don't think it's Roundcube issue. As you see it also doesn't work with ADS. Provide Roundcube configuration of ldap addressbooks. What PHP version? What OpenLDAP version? What is the exact error in Roundcobe log? Did you try with 0.8?

comment:2 follow-up: Changed 10 months ago by nivago

PHP 5.4.4 OpenLDAP 2.4.25

I've attached tb.inc.php with LDAP addressbooks configuration, file itself is called by require_once command in main.inc.php.

LOCAL4 LDAP server log error

Jul 24 11:02:06 ldap slapd[59652]: conn=1966 op=15 SRCH base="dc=ts,dc=ldap,dc=myhost,dc=ru" scope=2 deref=3 filter="(objectClass=*)"
Jul 24 11:02:07 ldap slapd[59652]: conn=1966 op=15 SRCH attr=cn objectClass
Jul 24 11:02:07 ldap slapd[59652]: conn=1966 op=15 SEARCH RESULT tag=101 err=53 nentries=0 text=paged results cookie is invalid or old

LOCAL4 Roundcube server log error

Jul 24 11:02:13 mail roundcube: C: Connect [ldaps://ldap.myhost.ru:636]
Jul 24 11:02:13 mail roundcube: S: OK
Jul 24 11:02:13 mail roundcube: C: Bind [dn: cn=rcuser,ou=BND,dc=ts,dc=ldap,dc=myhost,dc=ru] [pass: mypass]
Jul 24 11:02:13 mail roundcube: S: OK
Jul 24 11:02:13 mail roundcube: C: Search [(&(objectClass=mozillaAbPersonAlpha)(|(mail=*102*)(cn=*102*)(o=*102*)(typeOu=*102*)(typeOuFull=*102*)(l=*102*)(givenName=*102*)))][dn: ou=00,ou=PPL,dc=ts,dc=ldap,dc=myhost,dc=ru]
Jul 24 11:02:13 mail roundcube: S: 0 record(s)
Jul 24 11:02:13 mail roundcube: C: Close
Jul 24 11:02:16 mail roundcube: PHP Fatal error:  Using $this when not in object context in /mnt/users/home/webmail/wwws/program/steps/addressbook/list.inc on line 34
Jul 24 11:02:21 mail roundcube: PHP Warning:  implode(): Invalid arguments passed in /mnt/users/home/www/www/includes/router.php on line 352

As for ADS - it works fine if I click once on the navigation button there, error pops up when I double-click it.

And yes, I've tryed RC 0.8 beta, same error there.

Changed 10 months ago by nivago

LDAP addressbooks config

comment:3 in reply to: ↑ 2 Changed 10 months ago by alec

Replying to nivago:

Jul 24 11:02:16 mail roundcube: PHP Fatal error:  Using $this when not in object context in /mnt/users/home/webmail/wwws/program/steps/addressbook/list.inc on line 34

I don't know what version are you using, but there's no $this in line 34 of this file in 0.8-rc. Please, check with current git master version.

comment:4 Changed 10 months ago by nivago

I've just tryed latest git master version, no error there. As I've mentioned later, I was using 0.7.2 stable and tested with 0.8 beta from SF, with error in both cases. Problem solved, anyway.

Best regards,

Vladimir

comment:5 Changed 10 months ago by alec

  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.