[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
How to modify my database using ldap_modfiy
I have created web pages using PHP to search my ldap database.
I now want the facility to be able to amend entries within this
database using these web pages.
I have used PHP to create a file that holds the amended record.
This file has the format
changetype: modify
dn: cn=NOC,dc=pokuscca,dc=cz
Vedouci: zzz
etc.
My coding in the PHP script is
$ds=ldap_connect("localhost:portnumber")
If ($ds)
{
$r=ldap_bind($ds,"cn=root,dc=pokuscca,dc=cz","password");
$sr=ldap_modify($ds,"cn=$zkratka,dc=pokuscca,dc=cz","filename:
);
$info=ldap_get_entries ($ds,$sr);
ldap_close ($ds);
The error messages I get are
Warning: LDAP: Expected Array as the last element in
/www/htdocs/php/zkousit/pokusseznam2.php3 on line 419
Line 419 is the ldap_modify line
Warning: 0 is not a LDAP result index in
/www/htdocs/php/zkousit/pokusseznam2.php3 on line 422
Line 422 is the ldap_get_entries line.
Can anyone help or give me pointers where I should I should look
to solve this problem.
Thanks
Tony
----------------------------------------------------------------
Antonin Ch. Novak mailto:Antonin.Novak@cca.cz
Systemovy administrator
Systemova a technicka podpora
CCA spol. s r.o. Web: http://www.cca.cz
Kratka 8,
301 17 Plzen
Czech Republic
Tel: +42 019 7221253
Fax: +42 019 7222931