Mailing List Archive

Sync LDAP Groups with DAVICal fails
Hi,

I try to sync LDAP Groups (samba 4.17 domain controller) with davical
but I get:

Exception [0] ldap_first_entry(): Argument #2 ($result) must be of type
LDAP\Result, bool given
At line 162 of /usr/share/davical_1.1.12/inc/drivers_ldap.php
================= Stack Trace ===================
/usr/share/davical_1.1.12/htdocs/tools.php[31] sync_LDAP_groups()
/usr/share/davical_1.1.12/inc/drivers_ldap.php[452]
ldapDriver->getAllGroups()
/usr/share/davical_1.1.12/inc/drivers_ldap.php[162] ldap_first_entry()


What can I do to fix this problem?


Thorsten



_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general
Re: Sync LDAP Groups with DAVICal fails [ In reply to ]
Hey Thorsten,

There has been a bunch of work on the master branch in git on LDAP,
including group sync'ing. Would you mind trying that?

Kind regards,
Andrew

On Fri, 2024-04-26 at 10:15 +0200, Thorsten Marquardt via Davical-general
wrote:
> Hi,
>
> I try to sync LDAP Groups (samba 4.17 domain controller) with davical
> but I get:
>
> Exception [0] ldap_first_entry(): Argument #2 ($result) must be of type
> LDAP\Result, bool given
> At line 162 of /usr/share/davical_1.1.12/inc/drivers_ldap.php
> ================= Stack Trace ===================
> /usr/share/davical_1.1.12/htdocs/tools.php[31] sync_LDAP_groups()
> /usr/share/davical_1.1.12/inc/drivers_ldap.php[452]
> ldapDriver->getAllGroups()
> /usr/share/davical_1.1.12/inc/drivers_ldap.php[162] ldap_first_entry()
>
>
> What can I do to fix this problem?
>
>
> Thorsten
>
>
>
> _______________________________________________
> Davical-general mailing list
> Davical-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/davical-general

--
Andrew Ruthven, Wellington, New Zealand
andrew@etc.gen.nz |
Catalyst Cloud: | This space intentionally left blank
https://catalystcloud.nz |
Re: Sync LDAP Groups with DAVICal fails [ In reply to ]
Moin Andrew,

I' installed both davical-master and awl-master from the gitlab repo but
the setup pages complains about awl's version. It is 0.64 and should be
0.65.

Where do I get the suitable awl from?

Kind regards

Thorsten


Am 26.04.24 um 16:01 schrieb Andrew Ruthven:
> Hey Thorsten,
>
> There has been a bunch of work on the master branch in git on LDAP,
> including group sync'ing. Would you mind trying that?
>
> Kind regards,
> Andrew
>
> On Fri, 2024-04-26 at 10:15 +0200, Thorsten Marquardt via
> Davical-general wrote:
>> Hi,
>>
>> I try to sync LDAP Groups (samba 4.17 domain controller) with davical
>> but I get:
>>
>> Exception [0] ldap_first_entry(): Argument #2 ($result) must be of type
>> LDAP\Result, bool given
>> At line 162 of /usr/share/davical_1.1.12/inc/drivers_ldap.php
>> ================= Stack Trace ===================
>> /usr/share/davical_1.1.12/htdocs/tools.php[31] sync_LDAP_groups()
>> /usr/share/davical_1.1.12/inc/drivers_ldap.php[452]
>> ldapDriver->getAllGroups()
>> /usr/share/davical_1.1.12/inc/drivers_ldap.php[162] ldap_first_entry()
>>
>>
>> What can I do to fix this problem?
>>
>>
>> Thorsten
>>
>>
>>
>> _______________________________________________
>> Davical-general mailing list
>> Davical-general@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/davical-general
>
> -- Andrew Ruthven, Wellington, New Zealand
> andrew@etc.gen.nz |
> Catalyst Cloud: | This space intentionally left blank
> https://catalystcloud.nz |
>
>
>
> _______________________________________________
> Davical-general mailing list
> Davical-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/davical-general




_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general
Re: Sync LDAP Groups with DAVICal fails [ In reply to ]
Hi Andrew,

I'm sorry but I missread the setup output. The correct message is:

AWL Library version     Want: 0.64, Currently: 0.65

The current output of the setup is:


Dependency     Status
Current DAViCal version     Passed: 1.1.12     Explanation on DAViCal Wiki
PHP version     Passed: 8.3.6 >=     Explanation on DAViCal Wiki
AWL Library version     Want: 0.64, Currently: 0.65 Explanation on
DAViCal Wiki
PHP not using Apache Filter mode     Passed     Explanation on DAViCal Wiki
PHP PDO module available     Passed     Explanation on DAViCal Wiki
PDO PostgreSQL drivers     Passed     Explanation on DAViCal Wiki
Database is Connected     Passed     Explanation on DAViCal Wiki
DAViCal DB Schema version     Want: 1.3.5, Currently: 1.3.6 Explanation
on DAViCal Wiki
GNU gettext support     Passed     Explanation on DAViCal Wiki
PHP iconv support     Passed     Explanation on DAViCal Wiki
PHP XML support     Passed     Explanation on DAViCal Wiki
Suhosin "server.strip" disabled     Passed     Explanation on DAViCal Wiki
PHP Magic Quotes GPC off     Passed     Explanation on DAViCal Wiki
PHP Magic Quotes runtime off     Passed     Explanation on DAViCal Wiki
PHP calendar extension available     Passed     Explanation on DAViCal Wiki
PHP curl support     Passed     Explanation on DAViCal Wiki
PHP LDAP module available     Passed     Explanation on DAViCal Wiki

and the LDAP error still persists.


Verion 1.1.12 correct for the current master?

Kind regards

Thorsten


Am 29.04.24 um 09:56 schrieb Andrew Ruthven:
> Hey Thorsten,
>
> Huh. Interesting. Do you by chance still have a packaged AWL installed?
>
> If you run in the awl git checkout:
>
> grep awl_library_version AWLUtilities.php
>
> You should be able to confirm if you have 0.65.
>
> Cheers,
> Andrew
>
> On Mon, 2024-04-29 at 08:47 +0200, Thorsten Marquardt wrote:
>> Moin Andrew,
>>
>> I' installed both davical-master and awl-master from the gitlab repo but
>> the setup pages complains about awl's version. It is 0.64 and should be
>> 0.65.
>>
>> Where do I get the suitable awl from?
>>
>> Kind regards
>>
>> Thorsten
>>
>>
>> Am 26.04.24 um 16:01 schrieb Andrew Ruthven:
>>> Hey Thorsten,
>>>
>>> There has been a bunch of work on the master branch in git on LDAP,
>>> including group sync'ing. Would you mind trying that?
>>>
>>> Kind regards,
>>> Andrew
>>>
>>> On Fri, 2024-04-26 at 10:15 +0200, Thorsten Marquardt via
>>> Davical-general wrote:
>>>> Hi,
>>>>
>>>> I try to sync LDAP Groups (samba 4.17 domain controller) with davical
>>>> but I get:
>>>>
>>>> Exception [0] ldap_first_entry(): Argument #2 ($result) must be of type
>>>> LDAP\Result, bool given
>>>> At line 162 of /usr/share/davical_1.1.12/inc/drivers_ldap.php
>>>> ================= Stack Trace ===================
>>>> /usr/share/davical_1.1.12/htdocs/tools.php[31] sync_LDAP_groups()
>>>> /usr/share/davical_1.1.12/inc/drivers_ldap.php[452]
>>>> ldapDriver->getAllGroups()
>>>> /usr/share/davical_1.1.12/inc/drivers_ldap.php[162] ldap_first_entry()
>>>>
>>>>
>>>> What can I do to fix this problem?
>>>>
>>>>
>>>> Thorsten
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Davical-general mailing list
>>>> Davical-general@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/davical-general
>>>
>>> --
>>> Andrew Ruthven, Wellington, New Zealand
>>> andrew@etc.gen.nz |
>>> Catalyst Cloud:           | This space intentionally left blank
>>> https://catalystcloud.nz |
>>>
>>>
>>>
>>> _______________________________________________
>>> Davical-general mailing list
>>> Davical-general@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/davical-general
>>
>
> --
> Andrew Ruthven, Wellington, New Zealand
> andrew@etc.gen.nz |
> Catalyst Cloud: | This space intentionally left blank
> https://catalystcloud.nz |
>
>


_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general
Re: Sync LDAP Groups with DAVICal fails [ In reply to ]
On Mon, 2024-04-29 at 12:40 +0200, Thorsten Marquardt via Davical-general
wrote:
> Hi Andrew,
>
> I'm sorry but I missread the setup output. The correct message is:
>
> AWL Library version     Want: 0.64, Currently: 0.65
>

Yes, that was expected if using DAViCal from master, I've just updated
master to require 0.65, and the latest DB version.

Cheers,
Andrew

--
Andrew Ruthven, Wellington, New Zealand
andrew@etc.gen.nz |
Catalyst Cloud: | This space intentionally left blank
https://catalystcloud.nz |
Re: Sync LDAP Groups with DAVICal fails [ In reply to ]
Hi Andrew,

thank you very much. This looks better now:

Current DAViCal version     Passed: 1.1.12     Explanation on DAViCal Wiki
PHP version     Passed: 8.3.6 >= 5.4.0     Explanation on DAViCal Wiki
AWL Library version     Passed: 0.65     Explanation on DAViCal Wiki
PHP not using Apache Filter mode     Passed     Explanation on DAViCal Wiki
PHP PDO module available     Passed     Explanation on DAViCal Wiki
PDO PostgreSQL drivers     Passed     Explanation on DAViCal Wiki
Database is Connected     Passed     Explanation on DAViCal Wiki
DAViCal DB Schema version     Passed     Explanation on DAViCal Wiki
GNU gettext support     Passed     Explanation on DAViCal Wiki
PHP iconv support     Passed     Explanation on DAViCal Wiki
PHP XML support     Passed     Explanation on DAViCal Wiki
Suhosin "server.strip" disabled     Passed     Explanation on DAViCal Wiki
PHP Magic Quotes GPC off     Passed     Explanation on DAViCal Wiki
PHP Magic Quotes runtime off     Passed     Explanation on DAViCal Wiki
PHP calendar extension available     Passed     Explanation on DAViCal Wiki
PHP curl support     Passed     Explanation on DAViCal Wiki
PHP LDAP module available     Passed     Explanation on DAViCal Wiki

But I stll get the LDAP exception

Exception [0] ldap_get_attributes(): Argument #2 ($entry) must be of
type LDAP\ResultEntry, false given
At line 718 of /usr/share/davical-master/inc/drivers_ldap.php


Yours

Thorsten


Am 30.04.24 um 10:50 schrieb Andrew Ruthven:
> On Mon, 2024-04-29 at 12:40 +0200, Thorsten Marquardt via
> Davical-general wrote:
>> Hi Andrew,
>>
>> I'm sorry but I missread the setup output. The correct message is:
>>
>> AWL Library version     Want: 0.64, Currently: 0.65
>>
> Yes, that was expected if using DAViCal from master, I've just updated master to require 0.65, and the latest DB version.
> Cheers,
> Andrew
> --
> Andrew Ruthven, Wellington, New Zealand
> andrew@etc.gen.nz |
> Catalyst Cloud: | This space intentionally left blank
> https://catalystcloud.nz |
>
>
>
> _______________________________________________
> Davical-general mailing list
> Davical-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/davical-general



_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general
Re: Sync LDAP Groups with DAVICal fails [ In reply to ]
Hi Thorsten,

On Tue, 2024-04-30 at 11:02 +0200, Thorsten Marquardt via Davical-general
wrote:
> But I stll get the LDAP exception
>
> Exception [0] ldap_get_attributes(): Argument #2 ($entry) must be of
> type LDAP\ResultEntry, false given
> At line 718 of /usr/share/davical-master/inc/drivers_ldap.php

I've written a test which tickles this issue. It looks to me like you may
have a user in an LDAP group which doesn't exist; or, your users are stored
in your LDAP groups in another way that I haven't encountered yet!

I've modified the drivers_ldap.php to log this and move onto the next
record.

In the process I've also fixed a couple of other bugs I've found.

I've created a MR for this change, you can see it here:
https://gitlab.com/davical-project/davical/-/merge_requests/138
It is rather late where I live, so I'm off to bed, and will hopefully be
able to merge this in the morning.

Thank you for reporting this bug,
Andrew

--
Andrew Ruthven, Wellington, New Zealand
andrew@etc.gen.nz |
Catalyst Cloud: | This space intentionally left blank
https://catalystcloud.nz |



_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general
Re: Sync LDAP Groups with DAVICal fails [ In reply to ]
Moin Andrew,

first of all: Thank you for your efforts. This topic is not time
critical and I/we can live without Group sync. But it would be great to
have it working ;-)

I can do the next tests earliest in two day.


Kind regards

Thorsten


Am 30.04.24 um 15:33 schrieb Andrew Ruthven:
> Hi Thorsten,
>
> On Tue, 2024-04-30 at 11:02 +0200, Thorsten Marquardt via Davical-general
> wrote:
>> But I stll get the LDAP exception
>>
>> Exception [0] ldap_get_attributes(): Argument #2 ($entry) must be of
>> type LDAP\ResultEntry, false given
>> At line 718 of /usr/share/davical-master/inc/drivers_ldap.php
> I've written a test which tickles this issue. It looks to me like you may
> have a user in an LDAP group which doesn't exist; or, your users are stored
> in your LDAP groups in another way that I haven't encountered yet!
>
> I've modified the drivers_ldap.php to log this and move onto the next
> record.
>
> In the process I've also fixed a couple of other bugs I've found.
>
> I've created a MR for this change, you can see it here:
> https://gitlab.com/davical-project/davical/-/merge_requests/138
> It is rather late where I live, so I'm off to bed, and will hopefully be
> able to merge this in the morning.
>
> Thank you for reporting this bug,
> Andrew
>



_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general
Re: Sync LDAP Groups with DAVICal fails [ In reply to ]
Hi Andrew,

this looks great now. But it would be great to have a kind of "dry run
sync" to avoid to have many "false" items in database due to erroneous
ldap filter settings.

We use davical for several years now and it's a very wellcome resource
for us.

Till my next question

Thorsten


Am 30.04.24 um 15:47 schrieb Thorsten Marquardt via Davical-general:

> Moin Andrew,
>
> first of all: Thank you for your efforts. This topic is not time
> critical and I/we can live without Group sync. But it would be great to
> have it working ;-)
>
> I can do the next tests earliest in two day.
>
>
> Kind regards
>
> Thorsten
>
>
> Am 30.04.24 um 15:33 schrieb Andrew Ruthven:
>> Hi Thorsten,
>>
>> On Tue, 2024-04-30 at 11:02 +0200, Thorsten Marquardt via Davical-general
>> wrote:
>>> But I stll get the LDAP exception
>>>
>>> Exception [0] ldap_get_attributes(): Argument #2 ($entry) must be of
>>> type LDAP\ResultEntry, false given
>>> At line 718 of /usr/share/davical-master/inc/drivers_ldap.php
>> I've written a test which tickles this issue. It looks to me like you may
>> have a user in an LDAP group which doesn't exist; or, your users are stored
>> in your LDAP groups in another way that I haven't encountered yet!
>>
>> I've modified the drivers_ldap.php to log this and move onto the next
>> record.
>>
>> In the process I've also fixed a couple of other bugs I've found.
>>
>> I've created a MR for this change, you can see it here:
>> https://gitlab.com/davical-project/davical/-/merge_requests/138
>> It is rather late where I live, so I'm off to bed, and will hopefully be
>> able to merge this in the morning.
>>
>> Thank you for reporting this bug,
>> Andrew
>>
>
>
> _______________________________________________
> Davical-general mailing list
> Davical-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/davical-general



_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general