LDAP Security option

When I try to set up LDAP security on an applicion, I get to the part in the setup process and try to test the connection. When I hit the test button, I get an alert message. But the text is empty. It doesn’t tell me what is wrong with the configuration.

And I cannot process to click the ‘next’ button either. I get the same empty alert message.

Thanks. Nick

Hello,

Issue reported to our bugs team.

regards,
Bernhard Bernsmann

Not sure if it is helpful, but this code works in our ldap environment, put in onvalidate:


$ldaprdn  = "cn=".{UID}.",ou=somethign,o=something,c=nl";     
$ldappass = {PWD};  // associated password
 
// connect to ldap server
$ldapconn = ldap_connect("ldaps://yourserver:636")
    or die("Could not connect to LDAP server.");
 
if (ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3)) {
//    echo "Using LDAPv3
";
}

//ldap_set_option($ldapconn, LDAP_OPT_REFERRALS, 0);
if ($ldapconn) {
   // binding to ldap server	
    $ldapbind = @ldap_bind($ldapconn, $ldaprdn, $ldappass);
 	}
    // verify binding
    if ($ldapbind) {
	//        echo "LDAP bind successful...
";
	} else {
	//        sc_error_message('LDAP bind failed...: '.ldap_error($ldapconn) . "
");
			sc_error_message('<br><br><b>Login mislukt / login failed</b>');
    }
}

Thank you Albert,

I have done some digging into the apache logs and eventually figured out that LDAP is not installed on the copy of PHP that the scriptcase development environment uses.

The generator does not check this, so when the code gets around to running, the @ in front of the connect suppresses the module not found message and eventually apache seg faults.

Now… on to figuring out how to get LDAP installed into the scriptcase PHP.

Nick

Hello Nick,

Could you provide us more infos regarding the issue?

How did you setup your LDAP configurations?

What SC release are you working with?

Are you working with which OS? Mac? Linux? Windows?

regards,
Bernhard Bernsmann

Here is some of the info from the diagnostics Help screen:

PHP: 5.3.10
Hostname: scriptcase4.wynalda.com
Zend: 3.3
OS: LINUX SCRIPTCASE4.WYNALDA.COM 2.6.18-164.EL5 #1 SMP THU SEP 3 03:33:56 EDT 2009 I686
WEB Server: Apache/2.2.17 (Unix) PHP/5.3.10
ScriptCase Devel: 7.0.005
ScriptCase Build: 17
ScriptCase Prod: 7.0.005

These are the only extensions listed.
Extensions
OK ZLIB
OK GD

Nick

Hello Nick,

I was informed that LDAP wasn’t homologated on Linux yet. Our team is still working on a few fixes.

regards,
Bernhard Bernsmann

Bernhard

When IS LDAP going to be homologated on Linux? I am up to 7.01.0002, and it still does not work.

Nick

Hello Nick,

I will contact our team to find out when will LDAP be available on Linux.

Thanks,
Bartho Bernsmann

i try this answer, but did’nt work…
the output is “Fatal error: Call to undefined function ldap_connect() in”.
but i sure in my server LDAP is enable…
please help me… :smiley:

[QUOTE=aducom;14180]Not sure if it is helpful, but this code works in our ldap environment, put in onvalidate:


$ldaprdn  = "cn=".{UID}.",ou=somethign,o=something,c=nl";     
$ldappass = {PWD};  // associated password
 
// connect to ldap server
$ldapconn = ldap_connect("ldaps://yourserver:636")
    or die("Could not connect to LDAP server.");
 
if (ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3)) {
//    echo "Using LDAPv3
";
}

//ldap_set_option($ldapconn, LDAP_OPT_REFERRALS, 0);
if ($ldapconn) {
   // binding to ldap server	
    $ldapbind = @ldap_bind($ldapconn, $ldaprdn, $ldappass);
 	}
    // verify binding
    if ($ldapbind) {
	//        echo "LDAP bind successful...
";
	} else {
	//        sc_error_message('LDAP bind failed...: '.ldap_error($ldapconn) . "
");
			sc_error_message('<br><br><b>Login mislukt / login failed</b>');
    }
}

[/QUOTE]

Well then there must be something wrong with your environment. The ldap_connect is a valid php statement: http://php.net/manual/en/function.ldap-connect.php. If it’s refused by your php then this module is not enabled in your php setting. But that would be odd as this module is enabled in php by default. But there might be something else going on, phpinfo might be a good start. Perhaps this post is helpful too:

http://stackoverflow.com/questions/8826379/unable-to-enable-php-ldap-even-though-i-have-edited-php-ini-and-php-ldap-dll-is