Date: 05/31/98
- Next message: shane: "[PHP-DEV] CVS update: php31/main"
- Previous message: Michael Kunze: "[PHP-DEV] Can't compile new Zlib interface"
- Next in thread: shane: "[PHP-DEV] CVS update: php31/ext/standard"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sunday May 31, 1998 @ 15:43
Author: shane
Update of /repository/php31/ext/standard
In directory asf:/tmp/cvs-serv27884/ext/standard
Modified Files:
info.c
Log Message:
Moving much server specific code out to sapi interface files.
Index: php31/ext/standard/info.c
diff -c php31/ext/standard/info.c:1.3 php31/ext/standard/info.c:1.4
*** php31/ext/standard/info.c:1.3 Sun May 31 12:44:22 1998
--- php31/ext/standard/info.c Sun May 31 15:43:57 1998
***************
*** 33,39 ****
#include "php.h"
#include "head.h"
#include "info.h"
! #ifndef MSVC5
#include "build-defs.h"
#endif
--- 33,46 ----
#include "php.h"
#include "head.h"
#include "info.h"
! #ifdef MSVC5
! #ifndef PHP_CFLAGS
! #define PHP_CFLAGS ""
! #endif
! #ifndef PHP_HSREGEX
! #define PHP_HSREGEX
! #endif
! #else
#include "build-defs.h"
#endif
***************
*** 59,68 ****
#define SECTION(name) PUTS("<hr><h2>" name "</h2>\n")
- #if APACHE
- extern module *top_module;
- #endif
-
#define ENTRY_NAME_COLOR "#999999"
#define CONTENTS_COLOR "#DDDDDD"
#define HEADER_COLOR "#00DDDD"
--- 66,71 ----
***************
*** 130,192 ****
PUTS("<table border=5 width=\"600\">\n");
PUTS("<tr><th bgcolor=\"" HEADER_COLOR "\">Extensions</th><th bgcolor=\"" HEADER_COLOR "\">Additional Information</th></tr>\n");
- #ifndef MSVC5
PUTS("<tr><th bgcolor=\"" ENTRY_NAME_COLOR "\">PHP core</th>\n");
PUTS("<td bgcolor=\"" CONTENTS_COLOR "\"><tt>CFLAGS=" PHP_CFLAGS "<br>\n");
PUTS("HSREGEX=" PHP_HSREGEX "</td></tr>\n");
- #endif
- #if APACHE
- {
- module *modp = NULL;
- #if !defined(WIN32) && !defined(WINNT)
- char name[64];
- char *p;
- #endif
- server_rec *serv = GLOBAL(php3_rqst)->server;
- extern char server_root[MAX_STRING_LEN];
- extern uid_t user_id;
- extern char *user_name;
- extern gid_t group_id;
- extern int max_requests_per_child;
- PUTS("<tr><th bgcolor=\"" ENTRY_NAME_COLOR "\">Apache</th><td>\n");
- #if WIN32|WINNT
- PUTS("Apache for Windows 95/NT<br>");
- #else
- php3_printf("<tt>APACHE_INCLUDE=%s<br>\n", PHP_APACHE_INCLUDE);
- php3_printf("APACHE_TARGET=%s<br></tt>\n", PHP_APACHE_TARGET);
- #endif
- php3_printf("Apache Version: <b>%s</b><br>",SERVER_VERSION);
- #ifdef APACHE_RELEASE
- php3_printf("Apache Release: <b>%d</b><br>",APACHE_RELEASE);
- #endif
- php3_printf("Apache API Version: <b>%d</b><br>",MODULE_MAGIC_NUMBER);
- php3_printf("Hostname/port: <b>%s:%u</b><br>\n",serv->server_hostname,serv->port);
- #if !defined(WIN32) && !defined(WINNT)
- php3_printf("User/Group: <b>%s(%d)/%d</b><br>\n",user_name,(int)user_id,(int)group_id);
- php3_printf("Max Requests: <b>per child: %d keep alive: %s max per connection: %d</b><br>\n",max_requests_per_child,serv->keep_alive ? "on":"off", serv->keep_alive_max);
- #endif
- php3_printf("Timeouts: <b>connection: %d keep-alive: %d</b><br>",serv->timeout,serv->keep_alive_timeout);
- #if !defined(WIN32) && !defined(WINNT)
- php3_printf("Server Root: <b>%s</b><br>\n",server_root);
-
- PUTS("Loaded modules: ");
- 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("<br>\n");
- }
- PUTS("</td></tr>\n");
- #endif
hash_apply(&GLOBAL(module_registry),(int (*)(void *))_display_module_info);
PUTS("</table>\n");
--- 133,143 ----
***************
*** 232,240 ****
php3_printf("<tr><td bgcolor=\"" ENTRY_NAME_COLOR "\">highlight_keyword</td><td bgcolor=\"" CONTENTS_COLOR "\"><font color=%s> %s</font></td><td bgcolor=\"" CONTENTS_COLOR "\"><font color=%s> %s</font></td></tr>\n",php3_ini_master.highlight_keyword,php3_ini_master.highlight_keyword,GLOBAL(php3_ini).highlight_keyword,GLOBAL(php3_ini).highlight_keyword);
PUTS("</table>");
- #if USE_SAPI /* call a server module specific info function */
GLOBAL(sapi_rqst)->info(php3_globals);
- #endif
SECTION("Environment");
PUTS("<table border=5 width=\"600\">\n");
--- 183,189 ----
***************
*** 259,322 ****
}
PUTS("</table>\n");
- #if APACHE
- {
- register int i;
- array_header *arr = table_elts(GLOBAL(php3_rqst)->subprocess_env);
- table_entry *elts = (table_entry *)arr->elts;
-
- SECTION("Apache Environment");
- PUTS("<table border=5 width=\"600\">\n");
- PUTS("<tr><th bgcolor=\"" HEADER_COLOR "\">Variable</th><th bgcolor=\"" HEADER_COLOR "\">Value</th></tr>\n");
- for (i=0; i < arr->nelts; i++) {
- PUTS("<tr><td bgcolor=\"" ENTRY_NAME_COLOR "\">");
- PUTS(elts[i].key);
- PUTS("</td><td bgcolor=\"" CONTENTS_COLOR "\">");
- PUTS(elts[i].val);
- PUTS(" </td></tr>\n");
- }
- PUTS("</table>\n");
- }
- #endif
-
- #if APACHE
- {
- array_header *env_arr;
- table_entry *env;
- int i;
-
- SECTION("HTTP Headers Information");
- PUTS("<table border=5 width=\"600\">\n");
- PUTS(" <tr><th colspan=2 bgcolor=\"" HEADER_COLOR "\">HTTP Request Headers</th></tr>\n");
- PUTS("<tr><td bgcolor=\"" ENTRY_NAME_COLOR "\">HTTP Request</td><td bgcolor=\"" CONTENTS_COLOR "\">");
- PUTS(GLOBAL(php3_rqst)->the_request);
- PUTS(" </td></tr>\n");
- env_arr = table_elts(GLOBAL(php3_rqst)->headers_in);
- env = (table_entry *)env_arr->elts;
- for (i = 0; i < env_arr->nelts; ++i) {
- if (env[i].key) {
- PUTS("<tr><td bgcolor=\"" ENTRY_NAME_COLOR "\">");
- PUTS(env[i].key);
- PUTS("</td><td bgcolor=\"" CONTENTS_COLOR "\">");
- PUTS(env[i].val);
- PUTS(" </td></tr>\n");
- }
- }
- PUTS(" <tr><th colspan=2 bgcolor=\"" HEADER_COLOR "\">HTTP Response Headers</th></tr>\n");
- env_arr = table_elts(GLOBAL(php3_rqst)->headers_out);
- env = (table_entry *)env_arr->elts;
- for(i = 0; i < env_arr->nelts; ++i) {
- if (env[i].key) {
- PUTS("<tr><td bgcolor=\"" ENTRY_NAME_COLOR "\">");
- PUTS(env[i].key);
- PUTS("</td><td bgcolor=\"" CONTENTS_COLOR "\">");
- PUTS(env[i].val);
- PUTS(" </td></tr>\n");
- }
- }
- PUTS("</table>\n\n");
- }
- #endif
PUTS("</center>");
SECTION("PHP License");
--- 208,213 ----
***************
*** 338,344 ****
PUTS("You should have received a copy of both licenses referred to here.\n");
PUTS("If you did not, or have any questions about PHP licensing, please\n");
PUTS("contact core <email protected></TT>\n");
-
}
void php3_info(INTERNAL_FUNCTION_PARAMETERS)
--- 229,234 ----
- Next message: shane: "[PHP-DEV] CVS update: php31/main"
- Previous message: Michael Kunze: "[PHP-DEV] Can't compile new Zlib interface"
- Next in thread: shane: "[PHP-DEV] CVS update: php31/ext/standard"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

