Can you paste your code somewhere? I'm using the LDAP package at work (for authenticating a Yesod app) and a quick test of the basic LDAP package in GHCi works for me:
λ> import LDAP λ> ldap <- ldapInit "10.0.0.12" ldapPort λ> ldapSimpleBind ldap "geva" "**********" λ> let desiredAttr = LDAPAttrList ["name"] λ> let searchDN = Just "OU=Redacted,DC=redacted,DC=com" λ> let searchFilter = Just "sAMAccountName=geva" λ> ldapSearch ldap searchDN LdapScopeSubtree searchFilter desiredAttr False [LDAPEntry {ledn = "CN=Vincent Ambo,OU=Redacted,DC=redacted,DC=com", leattrs = [("name",["Vincent Ambo"])]}] It also works in compiled applications and in source files run with runhaskell. Our directory server runs Active Directory. On May 24, 2012, at 11:36 AM, Magicloud Magiclouds wrote: > Hi, > I am writing a small program using LDAP hackage. A weird problem occured. > When the code was run by runhaskell, things were fine, worked as expected. > But when ghc compiled (no any args), and ran, I got this: LDAP > error: ldapSimpleBind: LDAPException LdapServerDown(-1): Can't contact > LDAP server. > There is sure no problem with the server. > So I am confused. I thought the two supposed to be the same. > -- > 竹密岂妨流水过 > 山高哪阻野云飞 > > And for G+, please use magiclouds#gmail.com. > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe