#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Posts
    2
    Rep Power
    0

    Problem with ldap_get_option


    Hello,
    the function ldap_get_option always returns the error code res=0x59 (LDAP_PARAM_ERROR=A bad parameter was passed to a routine) The code looks the following:

    int value, res;
    LDAP *pLDAP;
    pLDAP = ldap_init(NULL,LDAP_PORT);
    ldap_simple_bind_s(pLDAP, "...", "...");
    res = ldap_get_option(pLDAP, LDAP_OPT_SIZELIMIT, &value);


    The simple_bind_s - function was successful ("..." is replaced by a user and a password). Does somebody has an idea how to avoid the error code and get (or set) an option?
  2. #2
  3. Psycho Canadian
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Jan 2001
    Location
    Canada
    Posts
    4,846
    Rep Power
    635
    If I remember right I believe ldap_set_option is suppose to be sent before a bind is made, but since this is a get I'd assume it should work. Perhaps try it above the bind?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Posts
    2
    Rep Power
    0
    I tried to call the ldap_get_option function above the bind. But the reaction was the same :(
  6. #4
  7. Psycho Canadian
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Jan 2001
    Location
    Canada
    Posts
    4,846
    Rep Power
    635
    to be honest I haven't used it within C yet so I can't test it :(

    I'll move this over to the C fourm and perhaps someone there can knows the problem

IMN logo majestic logo threadwatch logo seochat tools logo