On Fri, 2010-04-30 at 14:34 +0300, Manolis Vlachakis wrote: > Hallo there everyone > although i have built my code correctly according to the examples i found on > the net.. > i get Invalid DN syntax error when i try to insert some attributes with ldap > add.. > > i get and read a csv file where i get the data correctly as i can see on the > echos that follow: > > *$data=split("[;\r]",$data);* > * > * > * **$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=....", > $info);* > > funny thing is that when i put them absolute like *$info["sn"]= "bla > bla";* it works fine... > any ideas? Are you using the correct split() delimiter? What happens if you just output that array with print_r() or var_dump()? I see the delimiter as: [; ] Because the \r is recognised as a carriage return because your string is in double quotes. Thanks, Ash http://www.ashleysheridan.co.uk