mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 04:56:03 +03:00
[GH-ISSUE #119] LDAP addressbook not working #102
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#102
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @chlarsen on GitHub (Sep 27, 2016).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/119
Originally assigned to: @jasonmunro on GitHub.
Dear Jason,
I have finally had some time to look into the LDAP addressbook.
Here are my settings:
The OpenLDAP log does not show - - - anything. PHP has access to LDAP; I use this one (http://ltb-project.org/wiki/documentation/self-service-password) in the same FreeBSD jail.
Providing higher-level privileges by using a more powerful LDAP user does not make any difference either.
I also tried, in sync with the IMAP and SMTP settings, to disable TLS (because it may be for SSL only?), and tried port 636 for SSL with TLS enabled. No joy.
Any thoughts?
Thanks a lot!
Chris
@jasonmunro commented on GitHub (Sep 27, 2016):
I need to run for now, but I will dig into this when I can and let you know what I find out.
@chlarsen commented on GitHub (Sep 28, 2016):
Thanks a lot for all you help! Let me know, if/when you need any
debugging done.
Warmest regards from Kenya,
Chris
On 28/09/16 00:22, Jason Munro wrote:
Dr Christoph H. Larsen
synaLinQ
296/33 Lương Định Của, Ngọc Hội 2, Vĩnh Ngọc
Nha Trang, Khánh Hòa, Việt Nam
Mobile: +84-98-9607357 (Vietnam)
+254-776-588224, +254-701-279511 (Kenya)
+256-778-121305 (Uganda)
+49-176-96456254 (Germany)
Fax: +49-231-292734790
E-mail: christoph.larsen@synalinq.com
Skype: christoph.larsen
@jasonmunro commented on GitHub (Sep 28, 2016):
One thing that is not obvious about setting this up is that the ldap.ini file needs to be in the right place. After you edit it, you must move it from the ldap_contacts directory to your app_data_dir as defined in your hm3.ini file (the default location is /var/lib/hm3).
Enabling TLS is for SSL sockets, so if you use TLS you should use the SSL port (typically 636).
So before we dig in deeper, is the ldap.ini file in the right place?
@chlarsen commented on GitHub (Sep 28, 2016):
Am I allowd to call this a gotcha :-)? You certainly got me!
Let me try in a bit...
Thanks!
Chris
On 28/09/16 18:55, Jason Munro wrote:
Dr Christoph H. Larsen
synaLinQ
296/33 Lương Định Của, Ngọc Hội 2, Vĩnh Ngọc
Nha Trang, Khánh Hòa, Việt Nam
Mobile: +84-98-9607357 (Vietnam)
+254-776-588224, +254-701-279511 (Kenya)
+256-778-121305 (Uganda)
+49-176-96456254 (Germany)
Fax: +49-231-292734790
E-mail: christoph.larsen@synalinq.com
Skype: christoph.larsen
@jasonmunro commented on GitHub (Sep 28, 2016):
yes you are allowed to call it that :) There is a section on the install page of cypht.org describing this, however I will add a comment to the top of the ldap.ini file (and the other per-module ini files) explaining this to make it more clear
@chlarsen commented on GitHub (Sep 28, 2016):
Dear Jason,
This is what I did now:
In my hm3.ini it says:
;app_data_dir=/var/lib/hm3/app_data
attachment_dir=/home/cypht.mmc.lan/app_data
;modules[]=ldap_contacts
modules[]=ldap_contacts
(BTW, the explanatory text above would be a good place to stick a
reminder in to put the ldap config file into the right place.)
And ldap.ini is here:
ls ./cypht.mmc.lan/app_data/
0d7d7bd5797b4e30a80cf5f70010e598e796486722dcd253169655c60361f78ba42c222105d5c04292f64c4adc71533e5aaca88e0aa39a3fb818a3e195ebb23c
ldap.ini
But, still, things do not move...
Chris
On 28/09/16 18:59, Jason Munro wrote:
Dr Christoph H. Larsen
synaLinQ
296/33 Lương Định Của, Ngọc Hội 2, Vĩnh Ngọc
Nha Trang, Khánh Hòa, Việt Nam
Mobile: +84-98-9607357 (Vietnam)
+254-776-588224, +254-701-279511 (Kenya)
+256-778-121305 (Uganda)
+49-176-96456254 (Germany)
Fax: +49-231-292734790
E-mail: christoph.larsen@synalinq.com
Skype: christoph.larsen
@jasonmunro commented on GitHub (Sep 28, 2016):
Lets make sure the ldap config is being found by the code:
https://gist.github.com/jasonmunro/8e11554e05337c3a4d8721552e5e88d6
Apply the above change, and watch the PHP error log while loading the contacts page. You must be in debug mode. You should see something like this but with your values:
28-Sep-2016` 11:17:01 America/Chicago] Array
(
[Personal] => Array
(
[server] => localhost
[enable_tls] =>
[port] => 389
[base_dn] => dc=test,dc=com
[search_term] => objectclass=inetOrgPerson
[auth] => 1
[user] =>
[pass] =>
[objectclass] => Array
(
[0] => top
[1] => person
[2] => organizationalperson
[3] => inetorgperson
)
[read_write] => 1
)
)
@chlarsen commented on GitHub (Sep 28, 2016):
I get this, if I click on "Contacts":
Sep 28 19:26:13 www_php php-fpm[7485]: Array ( [0] => Using
Hm_PHP_Session with Hm_Auth_IMAP [1] => Using DB user
configuration [2] => Using sapi: fpm-fcgi [3] => Request type:
HTTP [4] => Request path: /cypht/ [5] => TLS request: 0 [6]
=> Mobile request: 0 [7] => Page ID: contacts [8] => ELOG called
in /home/www_php/mmc.lan/cypht/modules/ldap_contacts/modules.php at line
235 [9] => PHP version 5.6.26 [10] => Zend version 2.6.0
[11] => Peak Memory: 4608 [12] => PID: 7485 [13] => Included
files: 57 )
On 28/09/16 19:18, Jason Munro wrote:
Dr Christoph H. Larsen
synaLinQ
296/33 Lương Định Của, Ngọc Hội 2, Vĩnh Ngọc
Nha Trang, Khánh Hòa, Việt Nam
Mobile: +84-98-9607357 (Vietnam)
+254-776-588224, +254-701-279511 (Kenya)
+256-778-121305 (Uganda)
+49-176-96456254 (Germany)
Fax: +49-231-292734790
E-mail: christoph.larsen@synalinq.com
Skype: christoph.larsen
@jasonmunro commented on GitHub (Sep 28, 2016):
Nothing before that? There should be a log entry just before that one with hopefully the ldap server config.
@chlarsen commented on GitHub (Sep 28, 2016):
Hang on - I guess you mean debug mode for cypht, not PHP. Where di I
switch that one on again?
C.
On 28/09/16 19:29, Jason Munro wrote:
Dr Christoph H. Larsen
synaLinQ
296/33 Lương Định Của, Ngọc Hội 2, Vĩnh Ngọc
Nha Trang, Khánh Hòa, Việt Nam
Mobile: +84-98-9607357 (Vietnam)
+254-776-588224, +254-701-279511 (Kenya)
+256-778-121305 (Uganda)
+49-176-96456254 (Germany)
Fax: +49-231-292734790
E-mail: christoph.larsen@synalinq.com
Skype: christoph.larsen
@jasonmunro commented on GitHub (Sep 28, 2016):
you are in debug mode, otherwise the output you sent me would not be in the log
Debug mode is enabled when you use the top level directory of the cypht download. To use production mode, you use the site subdirectory that is created and updated every time you run the config_gen script.
@chlarsen commented on GitHub (Sep 28, 2016):
Oops, I did not know that, either. RTFM? I do note, however, that in the
said 'site' folrder, there is no LDAP contacts module. Shouldn't this
be there?
On 28/09/16 19:33, Jason Munro wrote:
Dr Christoph H. Larsen
synaLinQ
296/33 Lương Định Của, Ngọc Hội 2, Vĩnh Ngọc
Nha Trang, Khánh Hòa, Việt Nam
Mobile: +84-98-9607357 (Vietnam)
+254-776-588224, +254-701-279511 (Kenya)
+256-778-121305 (Uganda)
+49-176-96456254 (Germany)
Fax: +49-231-292734790
E-mail: christoph.larsen@synalinq.com
Skype: christoph.larsen
@jasonmunro commented on GitHub (Sep 28, 2016):
actually no. The way this works is a bit confusing. In production mode we only include the files that need to be in the document root. Module code can be loaded from outside of the document root. Keeping code that is not loaded directly by the browser outside the document root helps mitigate potential security problems. When the config_gen script is run it determines the correct path to the module and libs code that needs to be included.
While we work through issues you definitely want to stay in debug mode. Once we have everything ironed out, you will want to switch to production mode. Production mode is faster because we pre-calculate module dependencies, and we minify and combine assets like javascript and css that are included in the browser.
@chlarsen commented on GitHub (Sep 28, 2016):
Even faster - great! :-)
On 28/09/16 19:44, Jason Munro wrote:
Dr Christoph H. Larsen
synaLinQ
296/33 Lương Định Của, Ngọc Hội 2, Vĩnh Ngọc
Nha Trang, Khánh Hòa, Việt Nam
Mobile: +84-98-9607357 (Vietnam)
+254-776-588224, +254-701-279511 (Kenya)
+256-778-121305 (Uganda)
+49-176-96456254 (Germany)
Fax: +49-231-292734790
E-mail: christoph.larsen@synalinq.com
Skype: christoph.larsen
@jasonmunro commented on GitHub (Sep 28, 2016):
so back to the issue at hand, just before the entry you showed me there should be another log entry with the ldap.ini data. If it's not found you will see something like this:
[28-Sep-2016 11:50:33 America/Chicago] Array
(
)
@chlarsen commented on GitHub (Sep 28, 2016):
I get this:
Sep 28 19:52:42 www_php php-fpm[8761]: Array ( )
Sep 28 19:52:42 www_php php-fpm[8761]: Array ( [0] => Using
Hm_PHP_Session with Hm_Auth_IMAP [1] => Using DB user
configuration [2] => Using sapi: fpm-fcgi [3] => Request type:
HTTP [4] => Request path: /cypht/ [5] => TLS request: 0 [6]
=> Mobile request: 0 [7] => Page ID: contacts [8] => ELOG called
in /home/www_php/mmc.lan/cypht/modules/ldap_contacts/modules.php at line
235 [9] => PHP version 5.6.26 [10] => Zend version 2.6.0
[11] => Peak Memory: 4608 [12] => PID: 8761 [13] => Included
files: 57 )
Empty array.
On 28/09/16 19:51, Jason Munro wrote:
Dr Christoph H. Larsen
synaLinQ
296/33 Lương Định Của, Ngọc Hội 2, Vĩnh Ngọc
Nha Trang, Khánh Hòa, Việt Nam
Mobile: +84-98-9607357 (Vietnam)
+254-776-588224, +254-701-279511 (Kenya)
+256-778-121305 (Uganda)
+49-176-96456254 (Germany)
Fax: +49-231-292734790
E-mail: christoph.larsen@synalinq.com
Skype: christoph.larsen
@jasonmunro commented on GitHub (Sep 28, 2016):
Is the app_data_dir entry in your hm3.ini file commented out? Looks like it from what you posted:
There are 3 directory settings in the hm3.ini file that need to be set:
app_data_dir this is where module specific ini files go
attachment_dir this is where uploaded attachments are stored before being sent
user_settings_dir this is where user settings are stored if using file based settings.
These can all be the same directory, but I recommend using different dirs for each. I use /var/lib/hm3 for the app data dir, and subdirctories for the attachments and user settings.
Don't forget, anytime you change the ini, you will need to rerun the config_gen script as well.
@jasonmunro commented on GitHub (Sep 28, 2016):
btw, I'm usually logged into IRC, the #hastymail channel at freenode.net. Happy to chat there more directly if you are an IRC person :)
@chlarsen commented on GitHub (Sep 28, 2016):
Dear Jason,
let's complete this thread/issue by you seeing my head banging on the
table. Multi-tasking on several IT issues is not good for efficiency.
Yes, you are 1000% right. It works. Beautifully.
good thing, I learnt about the right spot for the ldap.ini file, ad the
site directory. Huge thanks to you!!!!
IRC noted for next time. Hope you are not scared :-D
Chris
On 28/09/16 20:03, Jason Munro wrote:
Dr Christoph H. Larsen
synaLinQ
296/33 Lương Định Của, Ngọc Hội 2, Vĩnh Ngọc
Nha Trang, Khánh Hòa, Việt Nam
Mobile: +84-98-9607357 (Vietnam)
+254-776-588224, +254-701-279511 (Kenya)
+256-778-121305 (Uganda)
+49-176-96456254 (Germany)
Fax: +49-231-292734790
E-mail: christoph.larsen@synalinq.com
Skype: christoph.larsen
@chlarsen commented on GitHub (Sep 28, 2016):
Stop press:
I can see the address book,
but if i click "Send to", the addressee field is empty.
:-(
On 28/09/16 20:03, Jason Munro wrote:
Dr Christoph H. Larsen
synaLinQ
296/33 Lương Định Của, Ngọc Hội 2, Vĩnh Ngọc
Nha Trang, Khánh Hòa, Việt Nam
Mobile: +84-98-9607357 (Vietnam)
+254-776-588224, +254-701-279511 (Kenya)
+256-778-121305 (Uganda)
+49-176-96456254 (Germany)
Fax: +49-231-292734790
E-mail: christoph.larsen@synalinq.com
Skype: christoph.larsen
@jasonmunro commented on GitHub (Sep 28, 2016):
so it is. That's a bug. Digging into it now!
@chlarsen commented on GitHub (Sep 28, 2016):
Also, the list is not complete: I get 12 entries out of 27. They are all
inetOrgPerson's, my search criterion.
But anyway, we are making progress - you make, i mean!
Thanks a lot!
On 28/09/16 20:10, Jason Munro wrote:
Dr Christoph H. Larsen
synaLinQ
296/33 Lương Định Của, Ngọc Hội 2, Vĩnh Ngọc
Nha Trang, Khánh Hòa, Việt Nam
Mobile: +84-98-9607357 (Vietnam)
+254-776-588224, +254-701-279511 (Kenya)
+256-778-121305 (Uganda)
+49-176-96456254 (Germany)
Fax: +49-231-292734790
E-mail: christoph.larsen@synalinq.com
Skype: christoph.larsen
@jasonmunro commented on GitHub (Sep 28, 2016):
We are making progress! I just fixed the send to links, I broke those accidentally with some recent changes.
Not sure about the missing entries. Looking at the code, we require that a contact have at least an email address and a cn set. Do these entries have those properties?
@chlarsen commented on GitHub (Sep 28, 2016):
Yes, they are all qmailUser's :-)
Let me update the code and revert. I may not be able to do this tonight
any more, but will revert asap!
Thanks a million!
Chris
On 28/09/16 20:17, Jason Munro wrote:
Dr Christoph H. Larsen
synaLinQ
296/33 Lương Định Của, Ngọc Hội 2, Vĩnh Ngọc
Nha Trang, Khánh Hòa, Việt Nam
Mobile: +84-98-9607357 (Vietnam)
+254-776-588224, +254-701-279511 (Kenya)
+256-778-121305 (Uganda)
+49-176-96456254 (Germany)
Fax: +49-231-292734790
E-mail: christoph.larsen@synalinq.com
Skype: christoph.larsen
@jasonmunro commented on GitHub (Sep 28, 2016):
my pleasure. Thanks for your patience and great feedback as we work through this. I'm probably the only one using the ldap contacts module at this time, so there will surely be bugs and changes we need to deal with.
@chlarsen commented on GitHub (Sep 28, 2016):
Certainly my plaeasure.
To add a bit more spice, the contacts are gone again after updating from
Github. ldap.ini is sitting bravely in the app-data directory, untouched.
And the hm3.ini got copied over from the working older version, just ot
be sure.
Weird. I am calling it a day now, but will continue tomorrow. Isn't it
hirrible that computers always do EXACTLY what we tell them to do...
Cheers and good night from Kenya,
Chris
On 28/09/16 20:22, Jason Munro wrote:
Dr Christoph H. Larsen
synaLinQ
296/33 Lương Định Của, Ngọc Hội 2, Vĩnh Ngọc
Nha Trang, Khánh Hòa, Việt Nam
Mobile: +84-98-9607357 (Vietnam)
+254-776-588224, +254-701-279511 (Kenya)
+256-778-121305 (Uganda)
+49-176-96456254 (Germany)
Fax: +49-231-292734790
E-mail: christoph.larsen@synalinq.com
Skype: christoph.larsen
@jasonmunro commented on GitHub (Oct 4, 2016):
any idea what happened here? always happy to assist if I can, but I'm not coming up with any worthwhile suggestions on what might have been reverted. I know LDAP contacts are a big priority for you, so I want to make this work. Let me know what I can do!
@chlarsen commented on GitHub (Oct 6, 2016):
No news yet - still does not work.
Contacts page is empty :-(.
Chris
On 04/10/16 09:00, Jason Munro wrote:
Dr Christoph H. Larsen
synaLinQ
296/33 Lương Định Của, Ngọc Hội 2, Vĩnh Ngọc
Nha Trang, Khánh Hòa, Việt Nam
Mobile: +84-98-9607357 (Vietnam)
+254-776-588224, +254-701-279511 (Kenya)
+256-778-121305 (Uganda)
+49-176-96456254 (Germany)
Fax: +49-231-292734790
E-mail: christoph.larsen@synalinq.com
Skype: christoph.larsen
@jasonmunro commented on GitHub (Oct 6, 2016):
No worries :) I wil summarize everything we did here when I have a minute and I'm sure we will quickly figure it out. In the meantime, can you send me the debug output from just loading the contacts page? There might be a clue there already.
@chlarsen commented on GitHub (Oct 6, 2016):
Dear Jason,
Here is an update: List of contact is working. Likewise,
autocompletion/dropdown of addressees works. BUT: As soon as the
respective name is added ti the "To", "Cc" or "Bcc" field(s), I am
logged out.
Here is the log:
Oct 6 18:37:28 www_php php-fpm[89750]: Array ( [0] => Using
Hm_PHP_Session with Hm_Auth_IMAP [1] => Using DB user
configuration [2] => Using sapi: fpm-fcgi [3] => Request type:
HTTP [4] => Request path: /cypht/ [5] => TLS request: 0 [6]
=> Mobile request: 0 [7] => Page ID: home [8] => Setting cookie:
name: hm_id, lifetime: 0, path: /cypht/, domain:
www.mweamedicalcentre.com, secure: , html_only 1 [9] => HMAC
verification failed [10] => Connecting to dsn:
pgsql:host=pgsql.jail.vlan;dbname=cypht [11] => Default SMTP server
added [12] => Redirecting to ?page=message_list&list_path=unread
[13] => PHP version 5.6.26 [14] => Zend version 2.6.0 [15] =>
Peak Memory: 3840 [16] => PID: 89750 [17] => Included files: 53 )
Oct 6 18:37:28 www_php php-fpm[89809]: Array ( [0] => Using
Hm_PHP_Session with Hm_Auth_IMAP [1] => Using DB user
configuration [2] => Using sapi: fpm-fcgi [3] => Request type:
HTTP [4] => Request path: /cypht/ [5] => TLS request: 0 [6]
=> Mobile request: 0 [7] => Page ID: message_list [8] => PHP
version 5.6.26 [9] => Zend version 2.6.0 [10] => Peak Memory:
4352 [11] => PID: 89809 [12] => Included files: 55 )
Oct 6 18:37:29 www_php php-fpm[89809]: Array ( [0] => Using
Hm_PHP_Session with Hm_Auth_IMAP [1] => Using DB user
configuration [2] => Using sapi: fpm-fcgi [3] => Request type:
AJAX [4] => Request path: /cypht/ [5] => TLS request: 0 [6]
=> Mobile request: 0 [7] => Page ID: ajax_hm_folders [8] =>
TRANSLATION NOT FOUND :Running in debug mode. See
https://cypht.org/install.html Section 5 for more detail.: [9] =>
TRANSLATION NOT FOUND :Debug: [10] => PHP version 5.6.26 [11] =>
Zend version 2.6.0 [12] => Peak Memory: 4608 [13] => PID:
89809 [14] => Included files: 57 )
Oct 6 18:37:29 www_php php-fpm[89809]: Array ( [0] => Using
Hm_PHP_Session with Hm_Auth_IMAP [1] => Using DB user
configuration [2] => Using sapi: fpm-fcgi [3] => Request type:
AJAX [4] => Request path: /cypht/ [5] => TLS request: 0 [6]
=> Mobile request: 0 [7] => Page ID: ajax_imap_unread [8] =>
Memcached enabled but not supported by PHP [9] => IMAP cache miss
from Memcached [10] => Memcached enabled but not supported by PHP
[11] => PHP version 5.6.26 [12] => Zend version 2.6.0 [13] =>
Peak Memory: 4096 [14] => PID: 89809 [15] => Included files: 49 )
Oct 6 18:37:49 www_php php-fpm[89809]: PHP Warning: ldap_search():
Partial search results returned: Sizelimit exceeded in
/home/www_php/mmc.lan/cypht/modules/ldap_contacts/hm-ldap-contacts.php
on line 95
Oct 6 18:37:49 www_php php-fpm[89809]: Array ( [0] => Using
Hm_PHP_Session with Hm_Auth_IMAP [1] => Using DB user
configuration [2] => Using sapi: fpm-fcgi [3] => Request type:
HTTP [4] => Request path: /cypht/ [5] => TLS request: 0 [6]
=> Mobile request: 0 [7] => Page ID: contacts [8] => TRANSLATION
NOT FOUND :gidnumber: [9] => TRANSLATION NOT FOUND
:homedirectory: [10] => TRANSLATION NOT FOUND :loginshell: [11]
=> TRANSLATION NOT FOUND :mailmessagestore: [12] => TRANSLATION NOT
FOUND :uidnumber: [13] => TRANSLATION NOT FOUND :uid: [14] =>
TRANSLATION NOT FOUND :mailalternateaddress: [15] => TRANSLATION NOT
FOUND :mailquotasize: [16] => TRANSLATION NOT FOUND :gidnumber:
[17] => TRANSLATION NOT FOUND :homedirectory: [18] => TRANSLATION
NOT FOUND :loginshell: [19] => TRANSLATION NOT FOUND
:mailalternateaddress: [20] => TRANSLATION NOT FOUND
:mailmessagestore: [21] => TRANSLATION NOT FOUND :uidnumber:
[22] => TRANSLATION NO
Oct 6 18:38:11 www_php php-fpm[89809]: PHP Warning: ldap_search():
Partial search results returned: Sizelimit exceeded in
/home/www_php/mmc.lan/cypht/modules/ldap_contacts/hm-ldap-contacts.php
on line 95
Oct 6 18:38:11 www_php php-fpm[89809]: Array ( [0] => Using
Hm_PHP_Session with Hm_Auth_IMAP [1] => Using DB user
configuration [2] => Using sapi: fpm-fcgi [3] => Request type:
HTTP [4] => Request path: /cypht/ [5] => TLS request: 0 [6]
=> Mobile request: 0 [7] => Page ID: compose [8] => PHP version
5.6.26 [9] => Zend version 2.6.0 [10] => Peak Memory: 4864
[11] => PID: 89809 [12] => Included files: 58 )
Oct 6 18:38:29 www_php php-fpm[89809]: PHP Warning: ldap_search():
Partial search results returned: Sizelimit exceeded in
/home/www_php/mmc.lan/cypht/modules/ldap_contacts/hm-ldap-contacts.php
on line 95
Oct 6 18:38:29 www_php php-fpm[89809]: Array ( [0] => Using
Hm_PHP_Session with Hm_Auth_IMAP [1] => Using DB user
configuration [2] => Using sapi: fpm-fcgi [3] => Request type:
AJAX [4] => Request path: /cypht/ [5] => TLS request: 0 [6]
=> Mobile request: 0 [7] => Page ID: ajax_autocomplete_contact
[8] => PHP version 5.6.26 [9] => Zend version 2.6.0 [10] => Peak
Memory: 3840 [11] => PID: 89809 [12] => Included files: 47 )
Oct 6 18:38:30 www_php php-fpm[89809]: PHP Warning: ldap_search():
Partial search results returned: Sizelimit exceeded in
/home/www_php/mmc.lan/cypht/modules/ldap_contacts/hm-ldap-contacts.php
on line 95
Oct 6 18:38:30 www_php php-fpm[89809]: Array ( [0] => Using
Hm_PHP_Session with Hm_Auth_IMAP [1] => Using DB user
configuration [2] => Using sapi: fpm-fcgi [3] => Request type:
AJAX [4] => Request path: /cypht/ [5] => TLS request: 0 [6]
=> Mobile request: 0 [7] => Page ID: ajax_autocomplete_contact
[8] => PHP version 5.6.26 [9] => Zend version 2.6.0 [10] => Peak
Memory: 3840 [11] => PID: 89809 [12] => Included files: 47 )
There is someting wrong with "Partial search results"...?
Hope this helps,
Chris
@jasonmunro commented on GitHub (Oct 6, 2016):
There are a couple things going on here. I think the warning being generated is causing the logout, I will dig into that specific bit and see what I can do. 2 other things I noticed:
[9] => HMAC verification failed
Thats bad. This is basically saying that we are trying to decrypt something and were unable to verify the payload. It may be a problem, it may not, but I need to dig into it more to see
[8] => Memcached enabled but not supported by PHP
This means you have configured memcache in your hm3.ini file, but you don't have the proper PHP packages installed. You should either disable memcache in your ini, or install the related php-memcache package for your distro.
I will update you when I figure out the partial search results bit!
@jasonmunro commented on GitHub (Oct 6, 2016):
Just pushed a change to the ldap_search function to set no size limitations, however if your ldap server has a size limit configured, we cannot override that. Could you see about bumping up your open ldap config setting?
http://www.openldap.org/doc/admin24/limits.html
I think the relevant setting is in section 9.4.3.
Thanks!
@chlarsen commented on GitHub (Oct 7, 2016):
Dear Jason,
There is not size limit in my slapd.conf. Or rather, the default one of
500 must apply. For the fun of it, I have set it to 1000, but the same
error continues. Strangely enough, nothing shows in the OpenLDAP debug
log, when Cyphyt issues the size limit error. Therefore, I am inclined
to believe that it may actually not be the OpenLDAP configuration...
Strange.
Chris
On 07/10/16 01:07, Jason Munro wrote:
Dr Christoph H. Larsen
synaLinQ
296/33 Lương Định Của, Ngọc Hội 2, Vĩnh Ngọc
Nha Trang, Khánh Hòa, Việt Nam
Mobile: +84-98-9607357 (Vietnam)
+254-776-588224, +254-701-279511 (Kenya)
+256-778-121305 (Uganda)
+49-176-96456254 (Germany)
Fax: +49-231-292734790
E-mail: christoph.larsen@synalinq.com
Skype: christoph.larsen
@chlarsen commented on GitHub (Oct 7, 2016):
Dear Jason,
pecl-memcache is installed.
php.ini says:
;session.save_handler = files
session.save_handler = memcache
;session.save_path = "/tmp"
session.save_path = "tcp://broker.jail.vlan:11211"
Plus some further optimisation settings.
memcached-tool run from inside the jail that houses memcached says this
before logging into Cypht:
memcached-tool broker.jail.vlan:11211 stats | grep bytes
bytes 6557
bytes_read 2025231
bytes_written 1937166
hash_bytes 524288
limit_maxbytes 1048576
And this after logging in:
memcached-tool broker.jail.vlan:11211 stats | grep bytes
bytes 6557
bytes_read 2040494
bytes_written 1952977
hash_bytes 524288
limit_maxbytes 1048576
There were no other processes running.
Hmmm...
Chris
On 07/10/16 00:28, Jason Munro wrote:
Dr Christoph H. Larsen
synaLinQ
296/33 Lương Định Của, Ngọc Hội 2, Vĩnh Ngọc
Nha Trang, Khánh Hòa, Việt Nam
Mobile: +84-98-9607357 (Vietnam)
+254-776-588224, +254-701-279511 (Kenya)
+256-778-121305 (Uganda)
+49-176-96456254 (Germany)
Fax: +49-231-292734790
E-mail: christoph.larsen@synalinq.com
Skype: christoph.larsen
@jasonmunro commented on GitHub (Oct 12, 2016):
Weird. I can stifle the warning (and I will), but I'm worried we are not querying all the contacts in LDAP. How many entries are in your LDAP server?
@jasonmunro commented on GitHub (Oct 12, 2016):
This is Perl bindings to memcache I think
Maybe you can use the memcache session handler without the PHP extension, I'm not sure. We need the extension so we can interact with memcache from the PHP code. On my Debian setup the required package is:
php-memcached
This provides the Memcached class in PHP so we can save/retrieve arbitrary values.
@jasonmunro commented on GitHub (Oct 14, 2016):
Sorry forgot about PECL being a PHP package source. This is not what we use in Cypht, we use an extension that does not require a PECL package. Hope things are good with you!
@jasonmunro commented on GitHub (Oct 14, 2016):
Here is the output from phpinfo() for my memcached setup
@chlarsen commented on GitHub (Oct 15, 2016):
Dear Jason,
Sorry for my silence, I have been travelling...
There is a whole tail of issues related to memcached, as it seems.
I have, for debugging purposes, removed it from the hm3.ini file.
However, I do have both pecl-memcache and pecl-memcached installed (both
facilities seem to be pecl modules, at least according to FreeBSD
packaging). The two modules have been around ever since, because they
have been required by other PHP software within the same jail.
So, after deactivating memcached from hm3.ini here:
enable_memcached=false
;memcached_server=127.0.0.1
memcached_server=broker.jail.vlan
memcached_port=11211
I can at least log in again. Mind you, this error has not been around
before, so may be a regression.
Also, please keep in mid that session management is still handled by
pecl-memcache (without the "d") from witin php.ini, as is standard for
the latter. This has been around fir ages and working with all other PHP
apps.
As for the LDAP addressbook, I still get thrown out of the e-mail
composition screen, if I add a n auto-detected address from the LDAP
addressbook to one of the address fields. The very same happens, if I
use addresses from the local addressbook (if activated), so this may not
be an LDAP issue after all.
I admit to the fact that this is a bit confusing, but at least we can
postpone the memcache(d) issue for now and look into the addressbook
thing first.
Does this help to resolve things further?
Let me know how I can help, thanks a lot!
Chris
@jasonmunro commented on GitHub (Oct 15, 2016):
Thanks for the great feedback. It does help. I know why you are getting logged out and can fix it. I have family visiting this weekend so won't have a chance to properly follow up until Sunday or Monday. I appreciate your patience!
@chlarsen commented on GitHub (Oct 16, 2016):
Dear Jason,
Thanks a lot, and no rush! Do have a great weekend, without Cypht :-).
Chris
On 10/16/2016 03:56, Jason Munro wrote:
@jasonmunro commented on GitHub (Oct 21, 2016):
Changes are in that should fix the auto-complete problem on the compose page. If you could update and test it out that would be great!
@chlarsen commented on GitHub (Oct 25, 2016):
Dear Jason,
Sorry for the delayed response. I have just had a chance to check things
out.
Here is what I do, with memcached disabled for now:
Login
-> Compose
Enter the first three letters of a known contact into the "To:" field.
The full name of the known contact appears.
If I use "Page Down" and "Enter", the name and e-mail address stay in
the "To:" field and I can continue.
------------------------------------%<----------------------------------
Oct 25 04:31:25 www_php php-fpm[20405]: Array ( [0] => Using
Hm_PHP_Session with Hm_Auth_IMAP [1] => Using DB user configuration
[2] => Using sapi: fpm-fcgi [3] => Request type: AJAX [4] =>
Request path: /cypht/ [5] => TLS request: 0 [6] => Mobile
request: 0 [7] => Page ID: ajax_autocomplete_contact [8] => PHP
version 5.6.26 [9] => Zend version 2.6.0 [10] => Peak Memory:
4096 [11] => PID: 20405 [12] => Included files: 50 )
------------------------------------%<----------------------------------
If, however, I use the mouse, I am thrown back to the landing page (but
stay logged in): The log says:
------------------------------------%<----------------------------------
Oct 25 04:29:53 www_php php-fpm[20405]: Array ( [0] => Using
Hm_PHP_Session with Hm_Auth_IMAP [1] => Using DB user configuration
[2] => Using sapi: fpm-fcgi [3] => Request type: AJAX [4] =>
Request path: /cypht/ [5] => TLS request: 0 [6] => Mobile
request: 0 [7] => Page ID: ajax_autocomplete_contact [8] => PHP
version 5.6.26 [9] => Zend version 2.6.0 [10] => Peak Memory:
4096 [11] => PID: 20405 [12] => Included files: 50 )
Oct 25 04:29:54 www_php php-fpm[20405]: Array ( [0] => Using
Hm_PHP_Session with Hm_Auth_IMAP [1] => Using DB user configuration
[2] => Using sapi: fpm-fcgi [3] => Request type: HTTP [4] =>
Request path: /cypht/ [5] => TLS request: 0 [6] => Mobile
request: 0 [7] => Page ID: home [8] => Handler module
Hm_Handler_load_feeds_from_config activated but not found [9] =>
PAGE CACHE: nux_dev_news [10] => PAGE CACHE: nux_dev_news [11]
=> PHP version 5.6.26 [12] => Zend version 2.6.0 [13] => Peak
Memory: 4608 [14] => PID: 20405 [15] => Included files: 60 )
------------------------------------%<----------------------------------
The same applies to the "cc:" and "bcc:" fields.
Does this make any sense so far?
Thanks a lot!
Chris
@jasonmunro commented on GitHub (Oct 26, 2016):
Found the problem :) There is a javascript bug (strangely not repeatable in chrome, but I was able to in firefox). The fix is here:
github.com/jasonmunro/cypht@d96ddd363f@chlarsen commented on GitHub (Nov 4, 2016):
Dear Jason,
Sorry - it took me ages to test it, because I have been tied up
somewhere else.
Everything works fine now - great stuff.
Do you think we should look into the memcached issues next - maybe using
a different thread?
Thanks a million!
Chris
@jasonmunro commented on GitHub (Nov 4, 2016):
Absolutely. Memcache is not a requirement, but it does provide some nice performance improvements. Lets start a new issue, I'm sure we can get it working in no time! I'm on the road visiting family until Monday, but i will check in when i can. Thanks!
@chlarsen commented on GitHub (Nov 5, 2016):
Thanks a lot, Jason. No rush - this is a baclkground improvement and
would not upset any users :-).
Enjoy your weekend and warm regards from Vietnam,
Chris
@jasonmunro commented on GitHub (Nov 30, 2016):
@chlarsen It's been a while since I heard from you, just pinging to make sure you are still around!
@jasonmunro commented on GitHub (Feb 3, 2017):
@chlarsen now it's been a long while, getting worried about you. Hope everything is good with you and yours!