From: Colin Viebrock Date: Thu, 6 Apr 2000 21:17:50 +0000 (+0000) Subject: phpinfo() pretying X-Git-Tag: php-4.0RC2~456 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e4409a8556b47a212e5c0b850d3191b3541e7219;p=php phpinfo() pretying That should be everything. --- diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 5a59f1688d..0de522f58e 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -155,7 +155,7 @@ PHP_MSHUTDOWN_FUNCTION(ldap) PHP_MINFO_FUNCTION(ldap) { - char maxl[16]; + char maxl[32], tmp[32]; #if HAVE_NSLDAP LDAPVersion ver; double SDKVersion; @@ -169,33 +169,42 @@ PHP_MINFO_FUNCTION(ldap) #endif if (LDAPG(max_links) == -1) { - strcpy(maxl, "Unlimited"); + snprintf(maxl, 31, "%d/unlimited", LDAPG(num_links) ); } else { - snprintf(maxl, 15, "%ld", LDAPG(max_links)); - maxl[15] = 0; + snprintf(maxl, 31, "%d/%ld", LDAPG(num_links), LDAPG(max_links)); } + maxl[31] = 0; + + php_info_print_table_start(); + php_info_print_table_row(2, "LDAP Support", "enabled" ); + php_info_print_table_row(2, "RCS Version", "$Id$" ); + php_info_print_table_row(2, "Total Links", maxl ); - php_printf("" - "\n" - "\n" -#if HAVE_NSLDAP - "" - "" - "" -#endif - ,LDAPG(num_links), maxl -#if HAVE_NSLDAP - ,SDKVersion/100.0,ver.protocol_version/100.0,ver.SSL_version/100.0 -#endif - ); #if HAVE_NSLDAP + + snprintf(tmp, 31, "%f", SDKVersion/100.0 ); + tmp[31]=0; + php_info_print_table_row(2, "SDK Version", tmp ); + + snprintf(tmp, 31, "%f", ver.protocol_version/100.0 ); + tmp[31]=0; + php_info_print_table_row(2, "Highest LDAP Protocol Supported", tmp ); + + snprintf(tmp, 31, "%f", ver.SSL_version/100.0 ); + tmp[31]=0; + php_info_print_table_row(2, "SSL Level Supported", tmp ); + if ( ver.security_level != LDAP_SECURITY_NONE ) { - php_printf( "\n", ver.security_level ); + snprintf(tmp, 31, "%d", ver.security_level ); + tmp[31]=0; } else { - php_printf( "\n" ); + strcpy(tmp, "SSL not enabled" ); } + php_info_print_table_row(2, "Level of Encryption", tmp ); + #endif - php_printf("
Total links:%d/%s
RCS Version:$Id$
SDK Version:%f
Highest LDAP Protocol Supported:%f
SSL Level Supported:%f
Level of encryption:%d bits
SSL not enabled.
\n"); + + php_info_print_table_end(); }