Back to index

php5  5.3.10
Defines | Functions | Variables
php_ldap.h File Reference
#include <lber.h>
#include <ldap.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ldap_module_ptr   &ldap_module_entry
#define LDAPG(v)   (ldap_globals.v)
#define phpext_ldap_ptr   ldap_module_ptr

Functions

 PHP_MINIT_FUNCTION (ldap)
 PHP_MSHUTDOWN_FUNCTION (ldap)
 PHP_MINFO_FUNCTION (ldap)

Variables

zend_module_entry ldap_module_entry
long num_links
long max_links

Define Documentation

Definition at line 33 of file php_ldap.h.

#define LDAPG (   v)    (ldap_globals.v)

Definition at line 48 of file php_ldap.h.

Definition at line 51 of file php_ldap.h.


Function Documentation

PHP_MINFO_FUNCTION ( ldap  )

Definition at line 219 of file ldap.c.

{
       char tmp[32];
#if HAVE_NSLDAP
       LDAPVersion ver;
       double SDKVersion;
#endif

       php_info_print_table_start();
       php_info_print_table_row(2, "LDAP Support", "enabled");
       php_info_print_table_row(2, "RCS Version", "$Id: ldap.c 321634 2012-01-01 13:15:04Z felipe $");

       if (LDAPG(max_links) == -1) {
              snprintf(tmp, 31, "%ld/unlimited", LDAPG(num_links));
       } else {
              snprintf(tmp, 31, "%ld/%ld", LDAPG(num_links), LDAPG(max_links));
       }
       php_info_print_table_row(2, "Total Links", tmp);

#ifdef LDAP_API_VERSION
       snprintf(tmp, 31, "%d", LDAP_API_VERSION);
       php_info_print_table_row(2, "API Version", tmp);
#endif

#ifdef LDAP_VENDOR_NAME
       php_info_print_table_row(2, "Vendor Name", LDAP_VENDOR_NAME);
#endif

#ifdef LDAP_VENDOR_VERSION
       snprintf(tmp, 31, "%d", LDAP_VENDOR_VERSION);
       php_info_print_table_row(2, "Vendor Version", tmp);
#endif

#if HAVE_NSLDAP
       SDKVersion = ldap_version(&ver);
       snprintf(tmp, 31, "%F", SDKVersion/100.0);
       php_info_print_table_row(2, "SDK Version", tmp);

       snprintf(tmp, 31, "%F", ver.protocol_version/100.0);
       php_info_print_table_row(2, "Highest LDAP Protocol Supported", tmp);

       snprintf(tmp, 31, "%F", ver.SSL_version/100.0);
       php_info_print_table_row(2, "SSL Level Supported", tmp);

       if (ver.security_level != LDAP_SECURITY_NONE) {
              snprintf(tmp, 31, "%d", ver.security_level);
       } else {
              strcpy(tmp, "SSL not enabled");
       }
       php_info_print_table_row(2, "Level of Encryption", tmp);
#endif

#ifdef HAVE_LDAP_SASL
       php_info_print_table_row(2, "SASL Support", "Enabled");
#endif

       php_info_print_table_end();
       DISPLAY_INI_ENTRIES();
}

Here is the call graph for this function:

PHP_MINIT_FUNCTION ( ldap  )

Definition at line 145 of file ldap.c.

{
       REGISTER_INI_ENTRIES();

       /* Constants to be used with deref-parameter in php_ldap_do_search() */
       REGISTER_LONG_CONSTANT("LDAP_DEREF_NEVER", LDAP_DEREF_NEVER, CONST_PERSISTENT | CONST_CS);
       REGISTER_LONG_CONSTANT("LDAP_DEREF_SEARCHING", LDAP_DEREF_SEARCHING, CONST_PERSISTENT | CONST_CS);
       REGISTER_LONG_CONSTANT("LDAP_DEREF_FINDING", LDAP_DEREF_FINDING, CONST_PERSISTENT | CONST_CS);
       REGISTER_LONG_CONSTANT("LDAP_DEREF_ALWAYS", LDAP_DEREF_ALWAYS, CONST_PERSISTENT | CONST_CS);

#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP_10
       /* LDAP options */
       REGISTER_LONG_CONSTANT("LDAP_OPT_DEREF", LDAP_OPT_DEREF, CONST_PERSISTENT | CONST_CS);
       REGISTER_LONG_CONSTANT("LDAP_OPT_SIZELIMIT", LDAP_OPT_SIZELIMIT, CONST_PERSISTENT | CONST_CS);
       REGISTER_LONG_CONSTANT("LDAP_OPT_TIMELIMIT", LDAP_OPT_TIMELIMIT, CONST_PERSISTENT | CONST_CS);
#ifdef LDAP_OPT_NETWORK_TIMEOUT
       REGISTER_LONG_CONSTANT("LDAP_OPT_NETWORK_TIMEOUT", LDAP_OPT_NETWORK_TIMEOUT, CONST_PERSISTENT | CONST_CS);
#elif defined (LDAP_X_OPT_CONNECT_TIMEOUT)
       REGISTER_LONG_CONSTANT("LDAP_OPT_NETWORK_TIMEOUT", LDAP_X_OPT_CONNECT_TIMEOUT, CONST_PERSISTENT | CONST_CS);
#endif
       REGISTER_LONG_CONSTANT("LDAP_OPT_PROTOCOL_VERSION", LDAP_OPT_PROTOCOL_VERSION, CONST_PERSISTENT | CONST_CS);
       REGISTER_LONG_CONSTANT("LDAP_OPT_ERROR_NUMBER", LDAP_OPT_ERROR_NUMBER, CONST_PERSISTENT | CONST_CS);
       REGISTER_LONG_CONSTANT("LDAP_OPT_REFERRALS", LDAP_OPT_REFERRALS, CONST_PERSISTENT | CONST_CS);
#ifdef LDAP_OPT_RESTART
       REGISTER_LONG_CONSTANT("LDAP_OPT_RESTART", LDAP_OPT_RESTART, CONST_PERSISTENT | CONST_CS);
#endif
#ifdef LDAP_OPT_HOST_NAME
       REGISTER_LONG_CONSTANT("LDAP_OPT_HOST_NAME", LDAP_OPT_HOST_NAME, CONST_PERSISTENT | CONST_CS);
#endif
       REGISTER_LONG_CONSTANT("LDAP_OPT_ERROR_STRING", LDAP_OPT_ERROR_STRING, CONST_PERSISTENT | CONST_CS);
#ifdef LDAP_OPT_MATCHED_DN
       REGISTER_LONG_CONSTANT("LDAP_OPT_MATCHED_DN", LDAP_OPT_MATCHED_DN, CONST_PERSISTENT | CONST_CS);
#endif
       REGISTER_LONG_CONSTANT("LDAP_OPT_SERVER_CONTROLS", LDAP_OPT_SERVER_CONTROLS, CONST_PERSISTENT | CONST_CS);
       REGISTER_LONG_CONSTANT("LDAP_OPT_CLIENT_CONTROLS", LDAP_OPT_CLIENT_CONTROLS, CONST_PERSISTENT | CONST_CS);
#endif
#ifdef LDAP_OPT_DEBUG_LEVEL
       REGISTER_LONG_CONSTANT("LDAP_OPT_DEBUG_LEVEL", LDAP_OPT_DEBUG_LEVEL, CONST_PERSISTENT | CONST_CS);
#endif

#ifdef HAVE_LDAP_SASL
       REGISTER_LONG_CONSTANT("LDAP_OPT_X_SASL_MECH", LDAP_OPT_X_SASL_MECH, CONST_PERSISTENT | CONST_CS);
       REGISTER_LONG_CONSTANT("LDAP_OPT_X_SASL_REALM", LDAP_OPT_X_SASL_REALM, CONST_PERSISTENT | CONST_CS);
       REGISTER_LONG_CONSTANT("LDAP_OPT_X_SASL_AUTHCID", LDAP_OPT_X_SASL_AUTHCID, CONST_PERSISTENT | CONST_CS);
       REGISTER_LONG_CONSTANT("LDAP_OPT_X_SASL_AUTHZID", LDAP_OPT_X_SASL_AUTHZID, CONST_PERSISTENT | CONST_CS);
#endif

#ifdef ORALDAP
       REGISTER_LONG_CONSTANT("GSLC_SSL_NO_AUTH", GSLC_SSL_NO_AUTH, CONST_PERSISTENT | CONST_CS);
       REGISTER_LONG_CONSTANT("GSLC_SSL_ONEWAY_AUTH", GSLC_SSL_ONEWAY_AUTH, CONST_PERSISTENT | CONST_CS);
       REGISTER_LONG_CONSTANT("GSLC_SSL_TWOWAY_AUTH", GSLC_SSL_TWOWAY_AUTH, CONST_PERSISTENT | CONST_CS);
#endif

       le_link = zend_register_list_destructors_ex(_close_ldap_link, NULL, "ldap link", module_number);
       le_result = zend_register_list_destructors_ex(_free_ldap_result, NULL, "ldap result", module_number);
       le_result_entry = zend_register_list_destructors_ex(_free_ldap_result_entry, NULL, "ldap result entry", module_number);

       Z_TYPE(ldap_module_entry) = type;

       return SUCCESS;
}

Here is the call graph for this function:

Definition at line 210 of file ldap.c.


Variable Documentation

zend_module_entry ldap_module_entry

Definition at line 2513 of file ldap.c.

long max_links

Definition at line 42 of file php_ldap.h.

long num_links

Definition at line 41 of file php_ldap.h.