DirectoryTree / LdapRecord-Discussions

A place to ask questions, get help, or share what you've built with LdapRecord.
4 stars 1 forks source link

PHP V7.3.0 LDAP_OPT_PROTOCOL_VERSION #13

Closed cyjobes closed 4 years ago

cyjobes commented 4 years ago

I'm getting an error mentioning LDAP_OPT_PROTOCOL_VERSION

ErrorException
Use of undefined constant LDAP_OPT_PROTOCOL_VERSION - assumed 'LDAP_OPT_PROTOCOL_VERSION' (this will throw an Error in a future version of PHP)

Knowing this might throw an error, has there been a fix?

I know that LDAP is installed with my version of php, which is 7.3.0

Please help.

stevebauman commented 4 years ago

Hi @cyjobes,

This error is in-fact because your PHP installation does not have the LDAP extension enabled.

I am 100% percent certain — as this exception is only thrown in this case.

The installation of PHP that your composer is using is likely a different installation that what your web server is using.

Hope this helps!

cyjobes commented 4 years ago

Would you know how I can get the extension and install it for MAMP?

On Wed, Oct 14, 2020, 6:22 PM Steve Bauman notifications@github.com wrote:

Hi @cyjobes https://github.com/cyjobes,

This error is in-fact because your PHP installation does not have the LDAP extension enabled.

I am 100% percent certain — as this exception is only thrown in this case.

The PHP version that your composer installation is pointing to is likely pointing to a different PHP install that your web server is using.

Hope this helps!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DirectoryTree/LdapRecord-Discussions/issues/13#issuecomment-708691542, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFLVQMZJRSHE5O67WXDPXKDSKYQBXANCNFSM4SRF6XEA .

stevebauman commented 4 years ago

LDAP comes bundled with most PHP installations by default. You simply need to enable it in MAMP.

Here's a guide showing you how to enable extensions on MAMP: https://jellystyle.com/2012/12/installing-php-extensions-with-mamp

Hope this helps!