From 5628b3f0abd51cd1facd5bbd0f5a68691c5c87e1 Mon Sep 17 00:00:00 2001 From: Colin Viebrock Date: Fri, 7 Apr 2000 16:41:19 +0000 Subject: more prettiness --- sapi/apache/php_apache.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) (limited to 'sapi/apache/php_apache.c') diff --git a/sapi/apache/php_apache.c b/sapi/apache/php_apache.c index 4ca8a2de3e..d9b3a1df78 100644 --- a/sapi/apache/php_apache.c +++ b/sapi/apache/php_apache.c @@ -155,6 +155,7 @@ PHP_MINFO_FUNCTION(apache) char output_buf[128]; #if !defined(WIN32) && !defined(WINNT) char name[64]; + char modulenames[1024]; char *p; #endif server_rec *serv; @@ -167,15 +168,17 @@ PHP_MINFO_FUNCTION(apache) serv = ((request_rec *) SG(server_context))->server; - PUTS("\n"); - php_info_print_table_header(2, "Entry", "Value"); #if WIN32|WINNT PUTS("Apache for Windows 95/NT
"); + php_info_print_table_start(); #else + php_info_print_table_start(); php_info_print_table_row(2, "APACHE_INCLUDE", PHP_APACHE_INCLUDE); php_info_print_table_row(2, "APACHE_TARGET", PHP_APACHE_TARGET); #endif + php_info_print_table_row(2, "Apache Version", SERVER_VERSION); + #ifdef APACHE_RELEASE sprintf(output_buf, "%d", APACHE_RELEASE); php_info_print_table_row(2, "Apache Release", output_buf); @@ -183,33 +186,33 @@ PHP_MINFO_FUNCTION(apache) sprintf(output_buf, "%d", MODULE_MAGIC_NUMBER); php_info_print_table_row(2, "Apache API Version", output_buf); sprintf(output_buf, "%s:%u", serv->server_hostname,serv->port); - php_info_print_table_row(2, "Hostname/Port", output_buf); + php_info_print_table_row(2, "Hostname:Port", output_buf); #if !defined(WIN32) && !defined(WINNT) sprintf(output_buf, "%s(%d)/%d", user_name,(int)user_id,(int)group_id); php_info_print_table_row(2, "User/Group", output_buf); - sprintf(output_buf, "per child: %d
keep alive: %s
max per connection: %d",max_requests_per_child,serv->keep_alive ? "on":"off", serv->keep_alive_max); + sprintf(output_buf, "Per Child: %d
Keep Alive: %s
Max Per Connection: %d",max_requests_per_child,serv->keep_alive ? "on":"off", serv->keep_alive_max); php_info_print_table_row(2, "Max Requests", output_buf); #endif - sprintf(output_buf, "connection: %d
keep-alive: %d",serv->timeout,serv->keep_alive_timeout); + sprintf(output_buf, "Connection: %d
Keep-Alive: %d",serv->timeout,serv->keep_alive_timeout); php_info_print_table_row(2, "Timeouts", output_buf); #if !defined(WIN32) && !defined(WINNT) php_info_print_table_row(2, "Server Root", server_root); - - PUTS("\n"); - PUTS("
Loaded modules"); for(modp = top_module; modp; modp = modp->next) { strlcpy(name, modp->name, sizeof(name)); if ((p = strrchr(name, '.'))) { *p='\0'; /* Cut off ugly .c extensions on module names */ } + strcpy(modulenames, name); PUTS(name); if (modp->next) { - PUTS(", "); + strcpy(modulenames, ", "); } } + php_info_print_table_row(2, "Loaded Modules", modulenames); #endif - PUTS("
\n"); + + php_info_print_table_end(); { @@ -223,13 +226,13 @@ PHP_MINFO_FUNCTION(apache) arr = table_elts(r->subprocess_env); elts = (table_entry *)arr->elts; - SECTION("Apache Environment"); - PUTS("\n"); + SECTION("Apache Environment"); + php_info_print_table_start(); php_info_print_table_header(2, "Variable", "Value"); for (i=0; i < arr->nelts; i++) { php_info_print_table_row(2, elts[i].key, elts[i].val); } - PUTS("
\n"); + php_info_print_table_end(); } { @@ -241,8 +244,8 @@ PHP_MINFO_FUNCTION(apache) r = ((request_rec *) SG(server_context)); SECTION("HTTP Headers Information"); - PUTS("\n"); - PUTS(" \n"); + php_info_print_table_start(); + PUTS("\n"); php_info_print_table_row(2, "HTTP Request", r->the_request); env_arr = table_elts(r->headers_in); env = (table_entry *)env_arr->elts; @@ -251,7 +254,7 @@ PHP_MINFO_FUNCTION(apache) php_info_print_table_row(2, env[i].key, env[i].val); } } - PUTS(" \n"); + PUTS("\n"); env_arr = table_elts(r->headers_out); env = (table_entry *)env_arr->elts; for(i = 0; i < env_arr->nelts; ++i) { @@ -259,7 +262,7 @@ PHP_MINFO_FUNCTION(apache) php_info_print_table_row(2, env[i].key, env[i].val); } } - PUTS("
HTTP Request Headers
HTTP Request Headers
HTTP Response Headers
HTTP Response Headers
\n\n"); + php_info_print_table_end(); } } -- cgit v1.2.1