• Jonathan Smith

    Jonathan Smith - 2003-01-08

    Can anyone suggest a resource to help me properly configure rolodap.conf and slapd.conf for a private network without a domain name? Everything seems oriented to system administration for an existing domain.

    I am running current versions of Apache, PHP, Rolodap on a Linux RH8 machine. When I go to the server (http://Amalaki/rolodap) for initial authentication I get


    in the third line of the form. And, after the OK button appears the following code:

    "; } ?>
    "; $userinfo["rolodappersonalbook"][0] = $modify_info["rolodappersonalbook"][0]; // now we need to create the group in rolodap $add_info["cn"][0] = $username." Personal Book"; $add_info["description"][0] = "$username's personal rolodap book"; //$add_info["objectclass"][0] = "groupofuniquenames"; $add_info["objectclass"][1] = "rolodapBook"; $add_info["objectclass"][2] = "top"; //$add_info["ou"] = $GROUP_OU; $add_info["rolodapbookpersonal"] = "yes"; $addresult = ldapadd ($LDAPSERVER_IP, $modify_info["rolodappersonalbook"][0],$BIND_AS, $BIND_PASSWORD, $add_info); //echo "addresult : $addresult
    "; } else { // we just want to check and make sure that the group in the user's record actually exists in the ROLODAP directory as well $personalbookcn = split (",",$userinfo["rolodappersonalbook"][0]); //echo "personalbookcn ".$personalbookcn[0]."
    "; $filter = sprintf("(&(%s)(objectclass=rolodapbook))",$personalbookcn[0]); //echo "filter : $filter
    "; $personalbook = ldapsearch($LDAPSERVER_IP, $LDAPSERVER_BASE_DN,$filter,$BIND_AS,$BIND_PASSWORD); //echo "personalbook 0 cn: ".$personalbook[0]["cn"][0]."
    "; if ($personalbook["count"] < 1) { // their personalbook doesn't exist so we need to create it. echo "Found personal book entry in user's record but the book doesn't exist, creating one now
    "; $add_info["cn"][0] = $username." Personal Book"; $add_info["description"][0] = "$username's personal rolodap book"; //$add_info["objectclass"][0] = "groupofuniquenames"; $add_info["objectclass"][0] = "rolodapBook"; $add_info["objectclass"][1] = "top"; //$add_info["ou"] = "groups"; $add_info["rolodapbookpersonal"][0] = "yes"; $add_info["createdby"][0] = "$username"; $add_info["createdon"][0] = date("Ymdhi")."Z"; $add_info["modifiedby"][0] = "$username"; $add_info["modifiedon"][0] = date("Ymdhi")."Z";; $dn = $userinfo["rolodappersonalbook"][0]; $addresult = ldapadd ($LDAPSERVER_IP, $dn,$BIND_AS, $BIND_PASSWORD, $add_info); } } // going to pre-read the books in the user's group list so as to save load time later when going to any of the search pages. $usergroups = listgroups($LDAPSERVER_IP, $LDAPSERVER_BASE_DN, $BIND_AS, $BIND_PASSWORD,$userinfo["rolodapbook"]); $firmbookrecord = ldapsearch ($LDAPSERVER_IP, $firmbookdn, "(objectclass=*)", $BIND_AS, $BIND_PASSWORD); $firmbooks = listgroups ($LDAPSERVER_IP, $LDAPSERVER_BASE_DN, $BIND_AS, $BIND_PASSWORD,$firmbookrecord[0]["uniquemember"]); session_register("username"); session_register("password"); session_register("basedn"); session_register("userinfo"); session_register("usergroups"); session_register("firmbooks"); // re-read config file here because of the chance that the config is set to bind to the auth server as self. // if this is true we need the user's username and password in the readconfig. //jsErrorBox ("reading config again with $username"); readconfig ($CONFIGFILENAME,$userinfo["dn"],$password); //echo "admin? ".$userinfo["rolodapadmin"][0]."
    \n"; // this is only hear to avoid breaking some old code. if (strtolower($userinfo["rolodapadmin"][0]) == "yes") { // checking to see if the user is an administrator or not $admin = "yes"; session_register("admin"); //echo "ok making you an admin
    \n"; } setuserprefs($userinfo); echo ""; } else { // we couldn't bind using the supplied name and password $auth_dn=""; $auth_passwd=""; $username=""; $password=""; echo" "; } // for if($ldapBind) } else { // we couldn't find the ldap server require("support/server-error.phtml"); } // for if($ldapServer) } else { // user is logging in anonymously // setup anonymous userinfo array $userinfo["cn"][0] = "Anonymous"; $userinfo["sn"][0] = "Anonymous"; $userinfo["givenname"][0] = "Anonymous"; session_register("anonymous"); session_register("username"); // session_register("password"); session_register("basedn"); session_register("userinfo"); echo ""; } // end if (! $username) ?>

    I may be a newbie at all of this, but I do think that things are not quite right, eh?

    • Anonymous - 2003-07-02

      What version of apache you are using? Looks like your web server is not interpreting the php code because the extension of the rolodap files is .phtml. Check your apache configuration. If your using Apache 2.0 check your php.conf under /etc/httpd/conf.d (this is for Red Hat) and add the following:

      <Files *.phtml>
          SetOutputFilter PHP
          SetInputFilter PHP
          LimitRequestBody 524288

      For apache 1.3.X check in the httpd.conf and search for the php module definition and add the extension (.phtml).

      I hope this help you :)


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks