We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40735
    • 119 Posts
    Hi!
    I have installed the modActiveDirectory package, created the system settings activedirectory.account_suffix and activedirectory.domain_controllers as per the instructions at http://rtfm.modx.com/display/ADDON/modActiveDirectory and set the first to @tntech.edu (our domain name) and to the second I gave a comma-delimited list of the three Active Directory servers we have here. I then switched ActiveDirectory SSO Enabled to Yes and attempted to log in from another browser. I got the following error:

    Fatal error: Call to undefined function ldap_connect() in /var/www/html/core/components/activedirectory/model/activedirectory/modactivedirectorydriver.class.php on line 162


    I have never worked with LDAP before and have no clue where to begin troubleshooting this. Any help would be greatly appreciated.
    Thanks!

    Edit:
    I also installed the php-ldap extension from the CLI on my virtual machine that's hosting this. I don't know if that's needed or not.
      • 28215
      • 4,149 Posts
      You need to make sure the LDAP extension is installed and loaded on your PHP installation. http://php.net/manual/en/book.ldap.php

      That error message says that it is not installed or configured correctly.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 40735
        • 119 Posts
        I'm running CentOS and I ran yum install php5-ldap from the CLI and it said it installed successfully. Is there more to do than just that?
          • 40735
          • 119 Posts
          I restarted the server just for grins and now it gives me the following error instead:

          Fatal error: Cannot assign by reference to overloaded object in /var/www/html/core/components/activedirectory/elements/events/onusernotfound.php on line 57
          
            • 40735
            • 119 Posts
            I've been logging with user/pass so I tried user@domain/pass and I got a red error message in the log in form that said user could not be found. So I took the domain back out and tried again the same way I did the first time and now instead of an error it just reloads the login form.
              • 40735
              • 119 Posts
              I've discovered that when I try to log in with my domain credentials the first time it creates the user account in MODx but then gives me the following error:

              Fatal error: Cannot assign by reference to overloaded object in /var/www/html/core/components/activedirectory/elements/events/onusernotfound.php on line 57

              If I try again after that it gives me no error but does not log me in; it simply returns to the login form.
                • 40735
                • 119 Posts
                The follow error turns up in the MODx error console every time I try to log in with my domain credentials:

                [2012-08-17 10:02:26] (ERROR @ /connectors/security/user.php) Could not get table class for class: modAccess
                [2012-08-17 10:02:26] (ERROR @ /connectors/security/user.php) Could not get table name for class: modAccess
                [2012-08-17 10:02:26] (ERROR @ /connectors/security/user.php) Error 42000 executing statement:
                Array
                (
                [0] => 42000
                [1] => 1064
                [2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS `modAccess` WHERE `modAccess`.`principal` = 12' at line 1
                )
                  • 40041
                  • 36 Posts
                  Quote from: dwillis210 at Aug 17, 2012, 10:59 AM
                  The follow error turns up in the MODx error console every time I try to log in with my domain credentials:

                  [2012-08-17 10:02:26] (ERROR @ /connectors/security/user.php) Could not get table class for class: modAccess
                  [2012-08-17 10:02:26] (ERROR @ /connectors/security/user.php) Could not get table name for class: modAccess
                  [2012-08-17 10:02:26] (ERROR @ /connectors/security/user.php) Error 42000 executing statement:
                  Array
                  (
                  [0] => 42000
                  [1] => 1064
                  [2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS `modAccess` WHERE `modAccess`.`principal` = 12' at line 1
                  )

                  Hey Dave - I'm having similar errors - in particular your error in reply #6 above. Did you find resolution? Would you mind sharing if so?

                  Thanks!
                    • 40735
                    • 119 Posts
                    Nope. Never found a resolution. I gave up.