E_WARNING when creating booking in 1.8.0
Brought to you by:
jberanek
Hi,
I just upgraded my test environment from 1.7.4 to 1.8.0 (btw, looks awesome!!) and I get some strange behaviour when I try to make a booking. I get severalE_WARNING (7x). The complete error is:
E_WARNING in /var/www/calendar_test/auth/auth_ldap.inc at line 753
ldap_search(): Partial search results returned: Sizelimit exceeded
MRBS GET: Array
(
[view] => week
[year] => 2020
[month] => 05
[day] => 07
[area] => 1
[room] => 3
[hour] => 3
[minute] => 30
)
MRBS POST: Array
(
)
MRBS SESSION: Array
(
[csrf_token] => xxxxxxx
[UserName] => xxxxxxx
)
If I edit an entry I get more or less the same:
E_WARNING in /var/www/calendar_test/auth/auth_ldap.inc at line 753
ldap_search(): Partial search results returned: Sizelimit exceeded
MRBS GET: Array
(
)
MRBS POST: Array
(
[csrf_token] => xxxxxx
[id] => 10369
[returl] => index.php?view=day&view_all=1&page_date=2020-05-06&area=1&room=3
)
MRBS SESSION: Array
(
[csrf_token] => xxxxxx
[UserName] => xxxxxx
)
I use ldap for the authentication. I never had this in the previous versions of MRBS. Do I have something wrong configured?
Best regards,
Rico
I think this is caused by a new feature in 1.8.0: when you create or edit an entry as an admin you are presented with a list of all the possible users in the system in the "Created by" field. My guess is that you have a very large LDAP directory?
You can avoid the problem by disabling this feature by setting in your config file:
Hi Campbell,
Thanks for the quick reply. I disabled the feature. We never used this. We are with about 6500 - 7000 emplyees. :-)
Best regards,
Rico
Did that solve the problem? I might look at better ways of searching large LDAP directories sometime.
Hi Campbell,
This solved the problem!
Best regard,
Rico
Hi,
As ldap_search() shows.
The E_WARNING may comes from LDAP server setting ( sizelimit , ... ) .
I guess think following action will be better :
Orig:
$res = ldap_search($ldap, $base_dn, $filter, $attributes);
New:
$res = @ldap_search($ldap, $base_dn, $filter, $attributes);
P.S. There are error detection codes in line#755~759 , we can surpress the E_WARNING message therefore.
I did think about doing something like that but then wondered if it could be misleading just having a partial result set returned?