Announcement

Collapse
No announcement yet.

LDAP Security option

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    Hello,

    Issue reported to our bugs team.

    regards,
    Bernhard Bernsmann

    Comment


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

      Code:
      $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\n";
      }
      
      //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...\n";
      	} else {
      	//        sc_error_message('LDAP bind failed...: '.ldap_error($ldapconn) . "\n");
      			sc_error_message('<br><br><b>Login mislukt / login failed</b>');
          }
      }
      Albert Drent
      aducom software netherlands
      scriptcase partner, reseller, support and (turn-key) development
      www.scriptcase.eu / www.scriptcase.nl

      Comment


      • #4
        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

        Comment


        • #5
          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

          Comment


          • #6
            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

            Comment


            • #7
              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

              Comment


              • #8
                Bernhard

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

                Nick

                Comment


                • #9
                  Hello Nick,

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

                  Thanks,
                  Bartho Bernsmann

                  Comment


                  • #10
                    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...

                    Originally posted by aducom View Post
                    Not sure if it is helpful, but this code works in our ldap environment, put in onvalidate:

                    Code:
                    $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\n";
                    }
                    
                    //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...\n";
                    	} else {
                    	//        sc_error_message('LDAP bind failed...: '.ldap_error($ldapconn) . "\n");
                    			sc_error_message('<br><br><b>Login mislukt / login failed</b>');
                        }
                    }

                    Comment


                    • #11
                      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/8...hp-ldap-dll-is
                      Last edited by aducom; 10-29-2013, 07:52 AM.
                      Albert Drent
                      aducom software netherlands
                      scriptcase partner, reseller, support and (turn-key) development
                      www.scriptcase.eu / www.scriptcase.nl

                      Comment

                      Working...
                      X