internals:windows:libs:ldap

For PHP suitable sources and up-to-date information see https://github.com/winlibs/openldap

OpenLDAP support in PHP relies on two of the OpenLDAP libraries:

  • olber32
  • oldap32

Our (patched) sources contain project files for VC8/9. OpenSSL is yet enabled.

One important change is to keep the default sysconf directory. Open ldap_config.h from the include directory and change the LDAP_SYSCONFDIR definition line to:

  #define LDAP_SYSCONFDIR		"c:\\openldap\\sysconf"

But that should not be too hard now that the project files are in places (see the source directory in our pecl2 download pages).

You can place the include files in openldap\include in php_builds or in the default include in phpbuilds\include (5.2) or in deps\include (5.3+).

For PHP usages, the following preprocessor option must be set:

 /D LDAP_DEPRECATED=1

TODO: remove deprecated API usage in ext/ldap

For VC9, it is necessary to patch the portable.h on line 1102:

#if _MSC_VER >= 15000
/* define to snprintf routine */
#define vsnprintf _vsnprintf
#endif

For VC6, the following option has to be added to the linker:

/NODEFAULTLIB:msvcrt

The latest patched sources available in our repository contain the project files for VC6/8/9. Only the configurations “Debug” and “Releases” can be used now. They built a static version of the choosen library (oldap32 or olber32) respectively in debug or release mode.

internals/windows/libs/ldap.txt · Last modified: 2013/02/21 19:11 by ab