Jump to content
Sign in to follow this  
Anarh1st

LDAP problem

Recommended Posts

Imam jedan problem, PHP skript koji koristim za konekciju na LDAP u case 1 prodje, a u case 2 nece. Da li neko mozda zna neko resenje ili ne? Greska koja se javlja je "Can't contact LDAP server ..."

 

$stableKeySS se dobija pretragom iz case 1 .... pa se ova skripta ponovo poziva i odlazi u case 2

 

case 1:

include_once ('inc/mod_ldap_conn.php'); // konekcija na LDAP

$bind=ldap_bind($ldapcon, $ldapu, $ldapp);

$baseDN = "providerName=NEKI, applicationName=NEKA, nodeName=NEKI";

$filter = "(&(objectclass=*)(name=*$deoNazivaSS*))";

$atributi = array("referenceId", "name", "stableKey");

$sr = ldap_list($ldapcon, $baseDN, $filter, $atributi);

....

break;

case 2:

include_once ('inc/mod_ldap_conn.php'); // konekcija na LDAP

$bind=ldap_bind($ldapcon, $ldapu, $ldapp);

$baseDN = "stableKey=$stableKeySS, providerName=NEKI, applicationName=NEKA, nodeName=NEKI";

$filter = "(objectclass=*)";

$atributi = array("referenceId", "name", "stableKey");

$sr = ldap_list($ldapcon, $baseDN, $filter, $atributi); // <-- ovde puca

$info = ldap_get_entries($ldapcon, $sr);

....

 

 

mod_ldap_conn.php:

 

$ldaphost = "PRAVIIP";

$ldapport = 7323;

$ldapu = "administratorName=NEKI, nodeName=NEKI";

$ldapp = "NEKA";

$ldapcon = ldap_connect($ldaphost, $ldapport);

if (! $ldapcon) {

ob_clean();

$_SESSION['poruka'] = error($id);

header("Location: index.php?id=200");

exit ();

}

Share this post


Link to post
Share on other sites

Nema problema u kodu .... problem je bio u serveru koji je prso na nekom procesoru, pa smo morali taj procesor i jos neke da restartujemo.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...