cvs: /php4 ChangeLog /php4/ext/apache apache.c
| From: | Zeev Suraski | Date: | Sat, 07 Aug 1999 16:02:49 +0000 |
| Subject: | cvs: /php4 ChangeLog /php4/ext/apache apache.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-3201@lists.php.net to get a copy of this message | ||
zeev Sat Aug 7 12:02:49 1999 EDT
Modified files:
/php4 ChangeLog
/php4/ext/apache apache.c
Log:
Fix for bug #1754
Index: php4/ChangeLog
diff -u php4/ChangeLog:1.39 php4/ChangeLog:1.40
--- php4/ChangeLog:1.39 Fri Aug 6 11:25:11 1999
+++ php4/ChangeLog Sat Aug 7 12:02:48 1999
@@ -2,6 +2,7 @@
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
??? ?? 1999, Version 4.0 Beta 2
+- Fixed Apache information in phpinfo() (sam@breakfree.com)
- Improved register_shutdown_function() - you may now supply arguments that
will be passed to the shutdown function (Zeev)
- Improved call_user_func() and call_user_method() - they now support passing
Index: php4/ext/apache/apache.c
diff -u php4/ext/apache/apache.c:1.17 php4/ext/apache/apache.c:1.18
--- php4/ext/apache/apache.c:1.17 Mon Aug 2 15:16:38 1999
+++ php4/ext/apache/apache.c Sat Aug 7 12:02:48 1999
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: apache.c,v 1.17 1999/08/02 19:16:38 zeev Exp $ */
+/* $Id: apache.c,v 1.18 1999/08/07 16:02:48 zeev Exp $ */
#include "php.h"
#include "ext/standard/head.h"
#include "php_globals.h"
@@ -165,6 +165,51 @@
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;
@@ -215,49 +260,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...-->