Reply to Anonymous connecting via PHP to a LDAP server

Your name:

Reply:


Posted by Nik Futter on 07/09/05 14:07

I have problems with anonymous connecting via PHP to a LDAP server (ILS
server, Netmeeting). I don't know if I need a password to connect to the
ILS server. But when Netmeeting connects to an ILS server it also
doesn't need a password. Or does there exist a "guest" account ? I have
tried it with the following script - but can not connect:

<HTML><HEAD></HEAD><BODY>
Actual IP-Address: <?php echo getenv('REMOTE_ADDR'); ?><BR>
<?php
$ds=ldap_connect("ils.netmeeting-center.de","389");
$r=ldap_bind($ds);

// Data arrange
$info["cn"]="MyName";
$info["sn"]="Name";
$info["mail"]="-@-.com";
$info["objectclass"]="rtperson";
$info["comment"]="Test with PHP";
$info["location"]="Bavaria";
$info["sappid"]="ms-netmeeting";
$info["sipaddress"]=sprintf('%u',ip2long(join(".",array_reverse(explode("."
,getenv('REMOTE_ADDR'))))));
$info["ilsa32833566"]="1"; // Audio=Yes
$info["ilsa32964638"]="1"; // Video=Yes

// send Data
$r=ldap_add($ds, "cn=MyName, o=CompanyXY, c=com", $info);

ldap_close($ds);
?>
</BODY></HTML>

But I only get this warning:

> Warning: ldap_add(): Add: Naming violation in ... test.php on line 20

(This is line with ldap_add).
Where is the problem with connecting ?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация