Forum: Ruby ruby-ldap on Windows (built)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
828dc634f7493008dbc96c437e54ea2f?d=identicon&s=25 Chris Scharf (scharfie)
on 2006-04-18 18:28
I have finally managed to build the ruby-ldap library for the Windows
platform (i.e. not a cygwin or ming build, but an mswin32 build).

This has been an issue for awhile as the maintainer of the project does
not have access to a Windows machine for testing.

So far, it seems to be working (I use it only for ActiveDirectory
authentication).

Anyway, if you are like me and have been struggling to get ldap working
on the mswin32 build, please try the pre-built package:

Download:
http://webtest.wvu.edu/users/cbscharf/ldap/

Put ldap.so in:
C:\ruby\lib\ruby\site_ruby\1.8\i386-msvcrt

Put *.rb in:
C:\ruby\lib\ruby\site_ruby\1.8\ldap

I believe these are the proper locations.  Hopefully this helps someone
out there :-)

Note: This was build using 0.9.4 of ruby-ldap on WinXP SP2.
31ab75f7ddda241830659630746cdd3a?d=identicon&s=25 Austin Ziegler (Guest)
on 2006-04-18 19:26
(Received via mailing list)
On 4/18/06, Chris Scharf <scharfie@gmail.com> wrote:
> I have finally managed to build the ruby-ldap library for the Windows
> platform (i.e. not a cygwin or ming build, but an mswin32 build).
>
> This has been an issue for awhile as the maintainer of the project does
> not have access to a Windows machine for testing.

Cool. Would you be interested in alpha-testing a different solution
and providing advice toward the development in it?

-austin
25e11a00a89683f7e01e425a1a6e305c?d=identicon&s=25 Wilson Bilkovich (Guest)
on 2006-04-18 21:18
(Received via mailing list)
On 4/18/06, Chris Scharf <scharfie@gmail.com> wrote:
> on the mswin32 build, please try the pre-built package:
> I believe these are the proper locations.  Hopefully this helps someone
> out there :-)
>
> Note: This was build using 0.9.4 of ruby-ldap on WinXP SP2.
>

I would LOVE to know how you managed this. I struck out hard on
several occasions, and I'd like to learn from my mistakes.

--Wilson.
828dc634f7493008dbc96c437e54ea2f?d=identicon&s=25 Chris Scharf (scharfie)
on 2006-04-18 21:34
Wilson Bilkovich wrote:
> On 4/18/06, Chris Scharf <scharfie@gmail.com> wrote:
>> on the mswin32 build, please try the pre-built package:
>> I believe these are the proper locations.  Hopefully this helps someone
>> out there :-)
>>
>> Note: This was build using 0.9.4 of ruby-ldap on WinXP SP2.
>>
>
> I would LOVE to know how you managed this. I struck out hard on
> several occasions, and I'd like to learn from my mistakes.
>
> --Wilson.

Well, the first step was to download the latest Platform SDK
(http://www.microsoft.com/downloads/details.aspx?Fa...).
The reason is that I have MSVC C++ 6.0, and apparently that distribution
has a known issue with the wldap32.lib library.  After downloading the
SDK, I grabbed the latest ruby-ldap source from sourceforge.

Now, the ruby-ldap source has a win directory, which has a wldap32.def
file, and this is used to build the wldap32.lib file.  However, I think
this .def creates the BAD .lib that comes with MSVC 6, so what I did was
drop in the one from the platform SDK.

Now, the tricky part: modifiying the source.  I had to open the
sslconn.c file, and change a few things.  The first is that the
rb_ldap_sslconn_bind_f function (around line 260) is missing an
argument.  The function definition should be:

  VALUE rb_ldap_sslconn_bind_f(int argc, VALUE argv[], VALUE self,
    VALUE (*rb_ldap_sslconn_bind_func) (int, VALUE, VALUE))

The two functions that follow (rb_ldap_sslconn_bind_s and
rb_ldap_sslconn_simple_bind_s) make calls to a function called

  rb_ldap_sslconn_bind_func

However, it should be

  rb_ldap_sslconn_bind_f


Next - the SDK includes special command prompt shortcuts that set up the
paths and all that, so I used the one for my machine (Win XP 32-bit),
and went to the directory where I had extracted the source.

Then:

ruby extconf.rb --with-wldap32
nmake
nmake install

I believe the Platform SDK itself should be sufficient to build
everything - the real trick is getting that .lib from the SDK and
dropping it in the \win directory of the extracted source, and then
changing the source code.
64cd30a9bd1e563ae777cc6a5fc09a51?d=identicon&s=25 Ian Macdonald (Guest)
on 2006-04-18 22:00
Chris Scharf wrote:

> Now, the ruby-ldap source has a win directory, which has a wldap32.def
> file, and this is used to build the wldap32.lib file.  However, I think
> this .def creates the BAD .lib that comes with MSVC 6, so what I did was
> drop in the one from the platform SDK.

Can you possibly provide me with the good wldap32.def file from the SDK?
I assume it's redistributable, in which case I'll substitute it for the
bad one.

> Now, the tricky part: modifiying the source.  I had to open the
> sslconn.c file, and change a few things.  The first is that the
> rb_ldap_sslconn_bind_f function (around line 260) is missing an
> argument.  The function definition should be:
>
>   VALUE rb_ldap_sslconn_bind_f(int argc, VALUE argv[], VALUE self,
>     VALUE (*rb_ldap_sslconn_bind_func) (int, VALUE, VALUE))
>
> The two functions that follow (rb_ldap_sslconn_bind_s and
> rb_ldap_sslconn_simple_bind_s) make calls to a function called
>
>   rb_ldap_sslconn_bind_func
>
> However, it should be
>
>   rb_ldap_sslconn_bind_f

I'll make these changes to the source.

This would make for a nice 0.9.5 release. If you can send me the .def
file, I'll package up a tar file and send it to you for verification
that things work out of the box.

Thanks for your work on this.
64cd30a9bd1e563ae777cc6a5fc09a51?d=identicon&s=25 Ian Macdonald (Guest)
on 2006-04-19 03:04
Ian Macdonald wrote:

> I'll make these changes to the source.
>
> This would make for a nice 0.9.5 release. If you can send me the .def
> file, I'll package up a tar file and send it to you for verification
> that things work out of the box.

Current Ruby/LDAP CVS has the changes, so I'm curious to know if the
Windows build now works out of the box. I'd be grateful if Windows users
could try this out and report back.
64cd30a9bd1e563ae777cc6a5fc09a51?d=identicon&s=25 Ian Macdonald (ianmacd)
on 2006-04-20 21:46
Ian Macdonald wrote:

> Current Ruby/LDAP CVS has the changes, so I'm curious to know if the
> Windows build now works out of the box. I'd be grateful if Windows users
> could try this out and report back.

I worked with Chris Scharf to fix the issues on Windows and am pleased
to say that the result is the release of version 0.9.5, the first
version known to work on Windows since I took over maintenance of the
code.

If anyone experiences any problems with this version, please let me
know. It should just work out of the box.
266d0953e631c83727465b314cc66ee4?d=identicon&s=25 Peter Tseng (lightsedge)
on 2006-05-03 22:31
Ian Macdonald wrote:
> Ian Macdonald wrote:
>
>> Current Ruby/LDAP CVS has the changes, so I'm curious to know if the
>> Windows build now works out of the box. I'd be grateful if Windows users
>> could try this out and report back.
>
> I worked with Chris Scharf to fix the issues on Windows and am pleased
> to say that the result is the release of version 0.9.5, the first
> version known to work on Windows since I took over maintenance of the
> code.
>
> If anyone experiences any problems with this version, please let me
> know. It should just work out of the box.

The new version worked on Windows for me.  I updated my Platform SDK to
the newest version just in case and then ran 'ruby extconf.rb
--with-wldap32', 'nmake', and
'nmake install', as mentioned above.  I had a small problem at first
though, I think because it didn't like spaces in my path (I put the
files on my desktop).  I also used require 'LDAP' instead of require
'ldap' when I was testing it, which it didn't like.  I guess the
convention is to use lower-case for require?
4d2c56d1611794f0abaef05fa71a0c80?d=identicon&s=25 Jason Woodruff (risicare)
on 2006-07-11 15:06
Peter Tseng wrote:
> Ian Macdonald wrote:
>> Ian Macdonald wrote:
>>
>>> Current Ruby/LDAP CVS has the changes, so I'm curious to know if the
>>> Windows build now works out of the box. I'd be grateful if Windows users
>>> could try this out and report back.
>>
>> I worked with Chris Scharf to fix the issues on Windows and am pleased
>> to say that the result is the release of version 0.9.5, the first
>> version known to work on Windows since I took over maintenance of the
>> code.
>>
>> If anyone experiences any problems with this version, please let me
>> know. It should just work out of the box.
>
> The new version worked on Windows for me.  I updated my Platform SDK to
> the newest version just in case and then ran 'ruby extconf.rb
> --with-wldap32', 'nmake', and
> 'nmake install', as mentioned above.  I had a small problem at first
> though, I think because it didn't like spaces in my path (I put the
> files on my desktop).  I also used require 'LDAP' instead of require
> 'ldap' when I was testing it, which it didn't like.  I guess the
> convention is to use lower-case for require?

Hi
Just wondering how to build this.  Have never built a windows app from
source before.  Have downloaded SDK and Visual C++ Express Edition.  Not
really sure what I'm doing with these apps., but decided to set v0.9.5
as a new project and run build against it.  This throws up the error
that the include ruby.h can't be found.
Not sure when or where I would use "ruby extconf.rb ..." apart from in
command prompt.  If so, where does 'nmake' and 'nmake install' go?
Finally, why not either provide some clearer instruction on the project,
or provide a binary?
thanks
Jason
4d2c56d1611794f0abaef05fa71a0c80?d=identicon&s=25 Jason Woodruff (risicare)
on 2006-07-11 15:57
Jason Woodruff wrote:
> Peter Tseng wrote:
>> Ian Macdonald wrote:
>>> Ian Macdonald wrote:
>>>
>>>> Current Ruby/LDAP CVS has the changes, so I'm curious to know if the
>>>> Windows build now works out of the box. I'd be grateful if Windows users
>>>> could try this out and report back.
>>>
>>> I worked with Chris Scharf to fix the issues on Windows and am pleased
>>> to say that the result is the release of version 0.9.5, the first
>>> version known to work on Windows since I took over maintenance of the
>>> code.
>>>
>>> If anyone experiences any problems with this version, please let me
>>> know. It should just work out of the box.
>>
>> The new version worked on Windows for me.  I updated my Platform SDK to
>> the newest version just in case and then ran 'ruby extconf.rb
>> --with-wldap32', 'nmake', and
>> 'nmake install', as mentioned above.  I had a small problem at first
>> though, I think because it didn't like spaces in my path (I put the
>> files on my desktop).  I also used require 'LDAP' instead of require
>> 'ldap' when I was testing it, which it didn't like.  I guess the
>> convention is to use lower-case for require?
>
> Hi
> Just wondering how to build this.  Have never built a windows app from
> source before.  Have downloaded SDK and Visual C++ Express Edition.  Not
> really sure what I'm doing with these apps., but decided to set v0.9.5
> as a new project and run build against it.  This throws up the error
> that the include ruby.h can't be found.
> Not sure when or where I would use "ruby extconf.rb ..." apart from in
> command prompt.  If so, where does 'nmake' and 'nmake install' go?
> Finally, why not either provide some clearer instruction on the project,
> or provide a binary?
> thanks
> Jason


I should probably add that I am running OpenLDAP and not Active
Directory.  Therefore is the --with-wldap32 command correct?  Using
--with-openldap2 I get the error that ldap.h and other folders cannot be
found.  This is because OpenLDAP for Windows port is compiled ... Tried
using the ldap.h files from the Linux source, but not sure of the
command prompt for this ... ?
4d2c56d1611794f0abaef05fa71a0c80?d=identicon&s=25 Jason Woodruff (risicare)
on 2006-07-11 17:32
Jason Woodruff wrote:

Just to post a solution to my problems:  a gem has been made available

http://66.249.93.104/search?q=cache:XGh2OrFoEVMJ:t...

Perhaps this should be made available through the project?
Fecb400607442b54b6df80b4018240f9?d=identicon&s=25 Rcmn 73 (rcmn)
on 2006-08-29 02:05
my goal is installing ruby with support for Mssql and LDAP on windows
XP:
//Already installed and tested:
ruby184-20.exe (on click installer)
dbi-0.1.1  (for driver ADO)

//related to my problem:
log4r-1.0.5 (installed)
Ruby-activeldap-0.7.4.gem (installed)

ruby-ldap-0.9.7 (Failed) =>
mkmf.log :
==============================================================================
==============================================================================
have_header: checking for ldap.h... -------------------- no

"cl -I. -Ic:/ruby/lib/ruby/1.8/i386-mswin32  -MD -Zi -O2b2xg- -G6
conftest.c -P"
checked program was:
/* begin */
#include <ldap.h>
/* end */

--------------------

have_header: checking for lber.h... -------------------- no

"cl -I. -Ic:/ruby/lib/ruby/1.8/i386-mswin32  -MD -Zi -O2b2xg- -G6
conftest.c -P"
checked program was:
/* begin */
#include <lber.h>
/* end */

--------------------

have_header: checking for ldap_ssl.h... -------------------- no

"cl -I. -Ic:/ruby/lib/ruby/1.8/i386-mswin32  -MD -Zi -O2b2xg- -G6
conftest.c -P"
checked program was:
/* begin */
#include <ldap_ssl.h>
/* end */

--------------------
==============================================================================
==============================================================================

i looked into c:\ruby and i can't find any of this files.
Am i missing a step ?
481b8eedcc884289756246e12d1869c1?d=identicon&s=25 Francis Cianfrocca (blackhedd)
on 2006-08-29 02:29
(Received via mailing list)
On 8/28/06, Rcmn Rcmn <rcmn73@gmail.com> wrote:
> ruby-ldap-0.9.7 (Failed) =>
> mkmf.log :
>

Sorry for the offtopic, but you may find that the Net::LDAP library
meets your needs. It's pure Ruby and doesn't require a compiler.
33ec7e55a251c1be8d6febfd929aebbe?d=identicon&s=25 Greg Kujawa (gregarican)
on 2006-08-29 02:31
(Received via mailing list)
As far as I can recall I was able to install the MSSQL support without
incident using the Ruby DBI project in my 1.8.2 One-Click Installer for
Windows environment. As for LDAP I struggled for awhile trying to build
the Ruby/LDAP library and recently was able to stumble across the
Net::LDAP library which installs right from the command prompt without
requiring compliation.
Fecb400607442b54b6df80b4018240f9?d=identicon&s=25 Rcmn 73 (rcmn)
on 2006-08-29 03:06
i've seen net::ruby like i've seen so many duplicate project.Since the
activity for net::ruby is only 76% i thought maybe it was a better
choice going with activeldap.Thank you for the pointer i will go with
Net:ruby instead.

As far as ADO i'm 100% sure i had to reinstall it.I uninstall/reinstall
ruby 3 time.For each step i have a script ready to test my install.Each
time it complain on the driver.So i had to intall --dbd_ado and it
worked after that.Also a lot of post relate on that problem.
481b8eedcc884289756246e12d1869c1?d=identicon&s=25 Francis Cianfrocca (blackhedd)
on 2006-08-29 03:49
(Received via mailing list)
On 8/28/06, Rcmn Rcmn <rcmn73@gmail.com> wrote:
> i've seen net::ruby like i've seen so many duplicate project.Since the
> activity for net::ruby is only 76% i thought maybe it was a better
> choice going with activeldap.Thank you for the pointer i will go with
> Net:ruby instead.
>

Net::LDAP is definitely active. I just checked some new features into
it this evening. As far as ActiveLDAP is concerned, I've talked
several times with Will Drewry about refactoring it to run above
Net::LDAP. One of these days, someone will get around to doing that,
and then ActiveLDAP will also be usable without requiring a compiler.
Fecb400607442b54b6df80b4018240f9?d=identicon&s=25 Rcmn 73 (rcmn)
on 2006-08-29 05:38
Francis Cianfrocca wrote:
> On 8/28/06, Rcmn Rcmn <rcmn73@gmail.com> wrote:
>> i've seen net::ruby like i've seen so many duplicate project.Since the
>> activity for net::ruby is only 76% i thought maybe it was a better
>> choice going with activeldap.Thank you for the pointer i will go with
>> Net:ruby instead.
>>
>
> Net::LDAP is definitely active. I just checked some new features into
> it this evening. As far as ActiveLDAP is concerned, I've talked
> several times with Will Drewry about refactoring it to run above
> Net::LDAP. One of these days, someone will get around to doing that,
> and then ActiveLDAP will also be usable without requiring a compiler.

actually u're right about Net::LDAP i just check it and noticed it too.

That would be great if ActiveLdap get accessible without compiling.
Because i almost choose to do this project with python.I was done with
my test in less than 3 hours installation included. I was ready to go
with it but i found active_directory ,a python module, easy to use but
also very limitated.

 So i decided to stick with ruby a little longer.But if net::ldap is to
much to get around in short periode i'll have to change direction.
Meanwhile rdoc and this forum  are valuable resources and i'm confident
i'll be able to get it done with R.
481b8eedcc884289756246e12d1869c1?d=identicon&s=25 Francis Cianfrocca (blackhedd)
on 2006-08-29 10:58
(Received via mailing list)
On 8/28/06, Rcmn 73 <rcmn73@gmail.com> wrote:
 > That would be great if ActiveLdap get accessible without compiling.
> Because i almost choose to do this project with python.I was done with
> my test in less than 3 hours installation included. I was ready to go
> with it but i found active_directory ,a python module, easy to use but
> also very limitated.
>

Out of curiosity, what were the specific limitations you found with
the python module active_directory? I want to make sure I didn't leave
similar limitations in Net::LDAP :-).
Fecb400607442b54b6df80b4018240f9?d=identicon&s=25 Rcmn 73 (rcmn)
on 2006-08-29 14:07
Francis Cianfrocca wrote:
> On 8/28/06, Rcmn 73 <rcmn73@gmail.com> wrote:
>  > That would be great if ActiveLdap get accessible without compiling.
>> Because i almost choose to do this project with python.I was done with
>> my test in less than 3 hours installation included. I was ready to go
>> with it but i found active_directory ,a python module, easy to use but
>> also very limitated.
>>
>
> Out of curiosity, what were the specific limitations you found with
> the python module active_directory? I want to make sure I didn't leave
> similar limitations in Net::LDAP :-).

this module allow to just search.No add/remove function .And i run into
a limitation, 1500 max returns(That's just what i've been experiencing).
Fecb400607442b54b6df80b4018240f9?d=identicon&s=25 Rcmn 73 (rcmn)
on 2006-08-29 14:15
Rcmn 73 wrote:
> Francis Cianfrocca wrote:
>> On 8/28/06, Rcmn 73 <rcmn73@gmail.com> wrote:
>>  > That would be great if ActiveLdap get accessible without compiling.
>>> Because i almost choose to do this project with python.I was done with
>>> my test in less than 3 hours installation included. I was ready to go
>>> with it but i found active_directory ,a python module, easy to use but
>>> also very limitated.
>>>
>>
>> Out of curiosity, what were the specific limitations you found with
>> the python module active_directory? I want to make sure I didn't leave
>> similar limitations in Net::LDAP :-).
>
> this module allow to just search.No add/remove function .And i run into
> a limitation, 1500 max returns(That's just what i've been experiencing).

I think ActiveLDAP would be more to compare with active_directory than
Net::LDAP.

http://tgolden.sc.sabren.com/python/active_directory.html
481b8eedcc884289756246e12d1869c1?d=identicon&s=25 Francis Cianfrocca (blackhedd)
on 2006-08-29 15:57
Rcmn 73 wrote:
> Francis Cianfrocca wrote:
>> On 8/28/06, Rcmn 73 <rcmn73@gmail.com> wrote:
>>  > That would be great if ActiveLdap get accessible without compiling.
>>> Because i almost choose to do this project with python.I was done with
>>> my test in less than 3 hours installation included. I was ready to go
>>> with it but i found active_directory ,a python module, easy to use but
>>> also very limitated.
>>>
>>
>> Out of curiosity, what were the specific limitations you found with
>> the python module active_directory? I want to make sure I didn't leave
>> similar limitations in Net::LDAP :-).
>
> this module allow to just search.No add/remove function .And i run into
> a limitation, 1500 max returns(That's just what i've been experiencing).

Thanks for the information. Net::LDAP has the full set of LDAP
operations. I'm a little surprised that you are able to get 1500 entries
per search, though. The usual limitation with ActiveDirectory is 1000.
Many tools have this limitation, which is caused by a lack of support
for RFC-2696. Net::LDAP doesn't have this limitation, and neither do the
more recent versions of ldapsearch.

I've never heard of 1500, though, unless your A/D configuration has been
tweaked.
Fecb400607442b54b6df80b4018240f9?d=identicon&s=25 Rcmn 73 (rcmn)
on 2006-08-29 17:16
Francis Cianfrocca wrote:
> Rcmn 73 wrote:
>> Francis Cianfrocca wrote:
>>> On 8/28/06, Rcmn 73 <rcmn73@gmail.com> wrote:
>>>  > That would be great if ActiveLdap get accessible without compiling.
>>>> Because i almost choose to do this project with python.I was done with
>>>> my test in less than 3 hours installation included. I was ready to go
>>>> with it but i found active_directory ,a python module, easy to use but
>>>> also very limitated.
>>>>
>>>
>>> Out of curiosity, what were the specific limitations you found with
>>> the python module active_directory? I want to make sure I didn't leave
>>> similar limitations in Net::LDAP :-).
>>
>> this module allow to just search.No add/remove function .And i run into
>> a limitation, 1500 max returns(That's just what i've been experiencing).
>
> Thanks for the information. Net::LDAP has the full set of LDAP
> operations. I'm a little surprised that you are able to get 1500 entries
> per search, though. The usual limitation with ActiveDirectory is 1000.
> Many tools have this limitation, which is caused by a lack of support
> for RFC-2696. Net::LDAP doesn't have this limitation, and neither do the
> more recent versions of ldapsearch.
>
> I've never heard of 1500, though, unless your A/D configuration has been
> tweaked.


This is a very good new that Net::LDAP does not have this limitation.
As our Active directory limitation it has probably limitated to
1500.Using PHP or the DS command's i can get various result but i was
never able to get more than 1500+.And depending of the periode of the
day PHP or DS cmd would just died without any return.Anyway with the
python module i get a consitent 1500.So maybe  as u mention the
limitation is an AD setting.
So i assume i will run into that limitation also with Net::LDAP...Or
Net::LDAP process search by a different way and avoid this sort of
limitation ? By getting a set of 100 then an other 100 etc ? Or is that
impossible?
481b8eedcc884289756246e12d1869c1?d=identicon&s=25 Francis Cianfrocca (blackhedd)
on 2006-08-29 17:45
(Received via mailing list)
On 8/29/06, Rcmn 73 <rcmn73@gmail.com> wrote:
 > This is a very good new that Net::LDAP does not have this limitation.
>
Net::LDAP correctly implements the "paged-search" control, so there is
no limit on the number of entries you can query from A/D. If your set
is particularly large (more than 10,000 for example), then I recommend
you use the :return_result => false flag. See the rdocs for
Net::LDAP#search for more information.
481b8eedcc884289756246e12d1869c1?d=identicon&s=25 Francis Cianfrocca (blackhedd)
on 2006-08-29 17:47
(Received via mailing list)
On 8/29/06, Rcmn 73 <rcmn73@gmail.com> wrote:
 > This is a very good new that Net::LDAP does not have this limitation.
> As our Active directory limitation it has probably limitated to
> 1500.Using PHP or the DS command's i can get various result but i was
> never able to get more than 1500+.And depending of the periode of the
> day PHP or DS cmd would just died without any return.Anyway with the
> python module i get a consitent 1500.So maybe  as u mention the
> limitation is an AD setting.
> So i assume i will run into that limitation also with Net::LDAP...Or
> Net::LDAP process search by a different way and avoid this sort of
> limitation ? By getting a set of 100 then an other 100 etc ? Or is that
> impossible?


I forgot to mention: paged searches are automatic in Net::LDAP. You
don't have to write your code differently to get them.
46015caa36e1a1dd00c51fd663d15248?d=identicon&s=25 Jason Rohwedder (Guest)
on 2006-08-29 18:11
(Received via mailing list)
Does Net::LDAP have a way of dealing with this on v2 servers? or
servers that don't yet implement paged results?  Thanks.

-jason
481b8eedcc884289756246e12d1869c1?d=identicon&s=25 Francis Cianfrocca (blackhedd)
on 2006-08-29 18:23
(Received via mailing list)
On 8/29/06, Jason Rohwedder <jro@codegrinder.com> wrote:
> Does Net::LDAP have a way of dealing with this on v2 servers? or
> servers that don't yet implement paged results?  Thanks.
>
> -jason

That's two different questions. Net::LDAP only implements V3. Do you
actually have a V2 server??? If so, I'd be really appreciative if you
could try Net::LDAP against it and see what happens. (Is it one of
those early Netscape Enterprise Directories?)

Paged results: Net::LDAP specifies the control as "noncritical," which
means it will be ignored by servers that don't recognize it (such as
OpenLDAP versions other than very recent ones). So it will
interoperate seamlessly with these servers.
Fecb400607442b54b6df80b4018240f9?d=identicon&s=25 Rcmn 73 (rcmn)
on 2006-08-29 18:26
Francis Cianfrocca wrote:
> On 8/29/06, Rcmn 73 <rcmn73@gmail.com> wrote:
>  > This is a very good new that Net::LDAP does not have this limitation.
>> As our Active directory limitation it has probably limitated to
>> 1500.Using PHP or the DS command's i can get various result but i was
>> never able to get more than 1500+.And depending of the periode of the
>> day PHP or DS cmd would just died without any return.Anyway with the
>> python module i get a consitent 1500.So maybe  as u mention the
>> limitation is an AD setting.
>> So i assume i will run into that limitation also with Net::LDAP...Or
>> Net::LDAP process search by a different way and avoid this sort of
>> limitation ? By getting a set of 100 then an other 100 etc ? Or is that
>> impossible?
>
>
> I forgot to mention: paged searches are automatic in Net::LDAP. You
> don't have to write your code differently to get them.

This is great informations and specially great news.Thank you very much
for the information and the great work.
46015caa36e1a1dd00c51fd663d15248?d=identicon&s=25 Jason Rohwedder (Guest)
on 2006-08-29 18:31
(Received via mailing list)
I don't have a V2 server; I was more concerned with the versions of
OpenLDAP that don't recognize it... Is there a way to deal with
getting all the results from a not recent OpenLDAP server?  Thanks.

-jason
481b8eedcc884289756246e12d1869c1?d=identicon&s=25 Francis Cianfrocca (blackhedd)
on 2006-08-29 18:35
(Received via mailing list)
On 8/29/06, Rcmn 73 <rcmn73@gmail.com> wrote:
 > This is great informations and specially great news.Thank you very
much
> for the information and the great work.
>

If you try the library and have problems, please tell me, either here
or by private email. A lot of people have done so already, and it
makes the library better for everyone.
481b8eedcc884289756246e12d1869c1?d=identicon&s=25 Francis Cianfrocca (blackhedd)
on 2006-08-29 19:15
(Received via mailing list)
On 8/29/06, Jason Rohwedder <jro@codegrinder.com> wrote:
> I don't have a V2 server; I was more concerned with the versions of
> OpenLDAP that don't recognize it... Is there a way to deal with
> getting all the results from a not recent OpenLDAP server?  Thanks.
>

Net::LDAP works seamlessly with older OpenLDAP servers that don't
support paged queries. I know because I use one in production all day
long.

For what it's worth (and at the risk of igniting some flames): I'm
quite convinced that paged-searches were invented by Microsoft
primarily to lighten the load on their somewhat, ummm... "challenging"
LDAP implementation. (Bear in mind that LDAP support was tacked onto
A/D after the core was designed.) If you read the paged-search RFC,
they blow some smoke about lessening the load on *client*
implementations.

OpenLDAP added paged searches recently, but their older
implementations don't suffer particularly for the lack. I routinely
query 100,000 entries out of an old OpenLDAP on a low-end workstation
to test Net::LDAP, and it doesn't break a sweat. It's not fast, but
it's stable.
46015caa36e1a1dd00c51fd663d15248?d=identicon&s=25 Jason Rohwedder (Guest)
on 2006-08-29 19:56
(Received via mailing list)
Excellent.. I'll have to start retrofitting some of my ruby/ldap
based scripts over, and playin' around.

-jason
Ac1ad46b1b4d1a66f1e10e9486a9b90e?d=identicon&s=25 Eduardo Dias (edias)
on 2008-03-13 13:57
Chris Scharf wrote:
> Wilson Bilkovich wrote:
>> On 4/18/06, Chris Scharf <scharfie@gmail.com> wrote:
>>> on the mswin32 build, please try the pre-built package:
>>> I believe these are the proper locations.  Hopefully this helps someone
>>> out there :-)
>>>
>>> Note: This was build using 0.9.4 of ruby-ldap on WinXP SP2.
>>>
>>
>> I would LOVE to know how you managed this. I struck out hard on
>> several occasions, and I'd like to learn from my mistakes.
>>
>> --Wilson.
>
> Well, the first step was to download the latest Platform SDK
> 
(http://www.microsoft.com/downloads/details.aspx?Fa...).
> The reason is that I have MSVC C++ 6.0, and apparently that distribution
> has a known issue with the wldap32.lib library.  After downloading the
> SDK, I grabbed the latest ruby-ldap source from sourceforge.
>
> Now, the ruby-ldap source has a win directory, which has a wldap32.def
> file, and this is used to build the wldap32.lib file.  However, I think
> this .def creates the BAD .lib that comes with MSVC 6, so what I did was
> drop in the one from the platform SDK.
>
> Now, the tricky part: modifiying the source.  I had to open the
> sslconn.c file, and change a few things.  The first is that the
> rb_ldap_sslconn_bind_f function (around line 260) is missing an
> argument.  The function definition should be:
>
>   VALUE rb_ldap_sslconn_bind_f(int argc, VALUE argv[], VALUE self,
>     VALUE (*rb_ldap_sslconn_bind_func) (int, VALUE, VALUE))
>
> The two functions that follow (rb_ldap_sslconn_bind_s and
> rb_ldap_sslconn_simple_bind_s) make calls to a function called
>
>   rb_ldap_sslconn_bind_func
>
> However, it should be
>
>   rb_ldap_sslconn_bind_f
>
>
> Next - the SDK includes special command prompt shortcuts that set up the
> paths and all that, so I used the one for my machine (Win XP 32-bit),
> and went to the directory where I had extracted the source.
>
> Then:
>
> ruby extconf.rb --with-wldap32
> nmake
> nmake install
>
> I believe the Platform SDK itself should be sufficient to build
> everything - the real trick is getting that .lib from the SDK and
> dropping it in the \win directory of the extracted source, and then
> changing the source code.



I'm getting the following error when i try to install ruby-ldap-0.9.7 in
Windows Vista.

extconf.rb:162:in ``': No such file or directory - lib
/def:./win/wldap32.def /o
ut:./win/wldap32.lib (Errno::ENOENT)
        from extconf.rb:162

Someone can help me?
Fecb400607442b54b6df80b4018240f9?d=identicon&s=25 Rcmn 73 (rcmn)
on 2008-03-13 15:13
> I'm getting the following error when i try to install ruby-ldap-0.9.7 in
> Windows Vista.
>
> extconf.rb:162:in ``': No such file or directory - lib
> /def:./win/wldap32.def /o
> ut:./win/wldap32.lib (Errno::ENOENT)
>         from extconf.rb:162
>
> Someone can help me?

But who use Windows Vista ????
sorry --> []
75028017b8cda7d95d09cb4ce26aeba2?d=identicon&s=25 Mateusz Tybura (Guest)
on 2008-03-13 15:26
(Received via mailing list)
It say's that file you want open or do something else don't exist. Maybe
you
just do some mistake in path to this file or you don't have permissions
to
access.

2008/3/13, Rcmn 73 <rcmn73@gmail.com>:
Fa8003bef185f18d8b6653ffaa4a1ccc?d=identicon&s=25 Javier Sanchez (resonante)
on 2008-08-08 19:28
Hi..

Someone has build ruby-ldap with openldap2 (--with-openldap2) for
windows xp?

I'm using openldap and the pre-built package, i have problem when
updating attributes from my rails app.

No such attribute...

I build openldap, ruby-ldap with openldap2, and installed activeldap and
works full gut!..

Someone can help?

thankx
Fa8003bef185f18d8b6653ffaa4a1ccc?d=identicon&s=25 Javier Sanchez (resonante)
on 2008-08-08 19:31
sorry!

when i say..: I build openldap, ruby-ldap with openldap2, and installed
activeldap and works full gut!..

works full gut in Leopard... but on Windows?
778cdf64c894a9b5f576e5206498c337?d=identicon&s=25 Jinxian Wei (weijinxian)
on 2009-08-20 10:54
Chris Scharf wrote:
> I have finally managed to build the ruby-ldap library for the Windows
> platform (i.e. not a cygwin or ming build, but an mswin32 build).
>
> This has been an issue for awhile as the maintainer of the project does
> not have access to a Windows machine for testing.
>
> So far, it seems to be working (I use it only for ActiveDirectory
> authentication).
>
> Anyway, if you are like me and have been struggling to get ldap working
> on the mswin32 build, please try the pre-built package:
>
> Download:
> http://webtest.wvu.edu/users/cbscharf/ldap/
>
> Put ldap.so in:
> C:\ruby\lib\ruby\site_ruby\1.8\i386-msvcrt
>
> Put *.rb in:
> C:\ruby\lib\ruby\site_ruby\1.8\ldap
>
> I believe these are the proper locations.  Hopefully this helps someone
> out there :-)
>
> Note: This was build using 0.9.4 of ruby-ldap on WinXP SP2.
hi,I feel excited to the mswin32 build,but the download url provided
can't be accessed. can you help me?
my email address is weijinxianforyou@gmail.com.
thank you in advance.
This topic is locked and can not be replied to.