From: Pierre Joye Date: Mon, 2 Jun 2008 00:24:19 +0000 (+0000) Subject: - add OpenLDAP version info in phpinfo (windows only, have to check if openldap/porta... X-Git-Tag: BEFORE_NEW_PARAMETER_PARSE~103 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8290e3324a584a9a1c9aa35153f4f9f5b530f067;p=php - add OpenLDAP version info in phpinfo (windows only, have to check if openldap/portable.h is present on linux headers) --- diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 66d2a33584..fc7787f083 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -38,18 +38,21 @@ #include "php.h" #include "php_ini.h" - #include #include "ext/standard/dl.h" #include "php_ldap.h" #ifdef PHP_WIN32 +/* TODO: check if this file is installed on *nix as well */ +#include #include #if HAVE_NSLDAP #include #endif +#ifndef _strdup #define strdup _strdup +#endif #undef WINDOWS #undef strcasecmp #undef strncasecmp @@ -246,6 +249,12 @@ PHP_MINFO_FUNCTION(ldap) } php_info_print_table_row(2, "Total Links", tmp); + +#ifdef OPENLDAP_VERSION + snprintf(tmp, 31, "%s", OPENLDAP_VERSION); + php_info_print_table_row(2, "Version", tmp); +#endif + #ifdef LDAP_API_VERSION snprintf(tmp, 31, "%d", LDAP_API_VERSION); php_info_print_table_row(2, "API Version", tmp);