$uploaddir = $_SERVER['DOCUMENT_ROOT'].'/bla/bla/uploads/';
$file = $uploaddir . basename($_FILES['uploadfile']['name']);
$data = file_get_contents($uploaddir . $_FILES["uploadfile"]["name"]);
$data=split("[;\r]",$data);
include_once("processes.php");
$ldapconn=connectToDB();
$info["cn"] = $data[$c];
echo "|onoma-->";
echo $info["cn"] ;
$c++;
$info["sn"] = $data[$c];
echo "|epwnimo-->";
echo $info["sn"] ;
$info["objectclass"][0] = "top";
$info["objectclass"][1] = "organizationalPerson";
$r = ldap_add($ldapconn, "cn=".$info['cn'].",cn=............,ou=.......,ou=......,ou=.....,dc=...,dc=gr", $info);
so i get the attributes i want from the file correctly (i have also counted them and tried anything that proves i get the string from the attribute)...
but i get the warning below
|onoma-->Γιά|epwnimo-->Κωνσ
Warning: ldap_add() [function.ldap-add]: Add: Invalid DN syntax
when i insert the attributes like:
$info["cn"] = "�����";
$info["sn"] = "��������";
they are inserted fine in the ldap server...