php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1754 "Apache" info table in the wrong section
Submitted: 1999-07-20 12:33 UTC Modified: 1999-08-07 12:01 UTC
From: sam at breakfree dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Beta 1 OS: Linux RedHat 5.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sam at breakfree dot com
New email:
PHP Version: OS:

 

 [1999-07-20 12:33 UTC] sam at breakfree dot com
in phpinfo() the information table that belongs into the "Apache"-Section is displayed in the "HTTP Headers Information" Section under the one that belongs in there.

To see what i'm talking about look at: http://samgr.breakfree.com/phptest/test.php

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-22 12:59 UTC] sam at breakfree dot com
(in phpinfo() the information table that belongs into the "Apache"-Section is
displayed in the "HTTP Headers Information" Section under the one that belongs in
there.)

In the meanwhile I made a Patch for this bug:

samgr             Thu Jul 22 08:34:35 1999 MET

  Modified files:
    /php4/ext/apache  apache.c 
  Log:
  fixed the position of the apache table in phpinfo(), #1754
  
Index: php4/ext/apache/apache.c
diff -u php4/ext/apache/apache.c:1.15 php4/ext/apache/apache.c:1.16
--- php4/ext/apache/apache.c:1.15	Thu Jul 22 07:05:11 1999
+++ php4/ext/apache/apache.c	Thu Jul 22 08:34:35 1999
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: apache.c,v 1.15 1999/07/17 20:03:10 andrey Exp $ */
+/* $Id: apache.c,v 1.16 1999/07/22 08:30:35 samgr Exp $ */
 #include "php.h"
 #include "ext/standard/head.h"
 #include "php_globals.h"
@@ -164,6 +164,50 @@
 
 	serv = ((request_rec *) SG(server_context))->server;
 
+    PUTS("<table border=5 width=\"600\">\n");
+    php_info_print_table_header(2, "Entry", "Value");
+#if WIN32|WINNT
+	PUTS("Apache for Windows 95/NT<br>");
+#else
+	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);
+#endif
+	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);
+#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<br>keep alive: %s<br>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<br>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("<tr><td valign=\"top\" bgcolor=\"" PHP_ENTRY_NAME_COLOR "\">Loaded modules</td><td bgcolor=\"" PHP_CONTENTS_COLOR "\">");
+	for(modp = top_module; modp; modp = modp->next) {
+		strncpy(name, modp->name, sizeof(name) - 1);
+		if ((p = strrchr(name, '.'))) {
+			*p='\0'; /* Cut off ugly .c extensions on module names */
+		}
+		PUTS(name);
+		if (modp->next) {
+			PUTS(", ");
+		}
+	}
+#endif
+	PUTS("</td></tr>\n");
+	PUTS("</table>\n");
+
 	{
 		register int i;
 		array_header *arr;
@@ -213,50 +257,6 @@
 		}
 		PUTS("</table>\n\n");
 	}
-
-    PUTS("<table border=5 width=\"600\">\n");
-    php_info_print_table_header(2, "Entry", "Value");
-#if WIN32|WINNT
-	PUTS("Apache for Windows 95/NT<br>");
-#else
-	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);
-#endif
-	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);
-#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<br>keep alive: %s<br>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<br>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("<tr><td valign=\"top\" bgcolor=\"" PHP_ENTRY_NAME_COLOR "\">Loaded modules</td><td bgcolor=\"" PHP_CONTENTS_COLOR "\">");
-	for(modp = top_module; modp; modp = modp->next) {
-		strncpy(name, modp->name, sizeof(name) - 1);
-		if ((p = strrchr(name, '.'))) {
-			*p='\0'; /* Cut off ugly .c extensions on module names */
-		}
-		PUTS(name);
-		if (modp->next) {
-			PUTS(", ");
-		}
-	}
-#endif
-	PUTS("</td></tr>\n");
-	PUTS("</table>\n");
 }
 
 /* This function is equivalent to <!--#include virtual...-->

 [1999-08-07 12:01 UTC] zeev at cvs dot php dot net
Applied as suggested - thanks
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 10:01:33 2025 UTC