Date: 05/31/98
- Next message: shane: "[PHP-DEV] CVS update: php31/main"
- Previous message: shane: "[PHP-DEV] CVS update: php31/ext/standard"
- Next in thread: shane: "[PHP-DEV] CVS update: php31/sapi"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sunday May 31, 1998 @ 16:45
Author: shane
Update of /repository/php31/sapi
In directory asf:/tmp/cvs-serv28821/sapi
Modified Files:
apache_sapi.c fhttpd_sapi.c phpsapi_cgi.dsp phpsapi_isapi.dsp
Log Message:
did I miss something?
Index: php31/sapi/apache_sapi.c
diff -c php31/sapi/apache_sapi.c:1.2 php31/sapi/apache_sapi.c:1.3
*** php31/sapi/apache_sapi.c:1.2 Sun May 31 15:44:05 1998
--- php31/sapi/apache_sapi.c Sun May 31 16:45:45 1998
***************
*** 405,410 ****
--- 405,444 ----
}
/*
+ Here is the old apache request info init
+
+ DEPRECATED.
+
+ Must now init the sapi structure
+
+ */
+
+ #if APACHE
+ int php3_init_request_info(void *conf)
+ {
+ char *buf;
+ TLS_VARS;
+
+ GLOBAL(request_info).current_user = NULL;
+ GLOBAL(request_info).current_user_length = 0;
+
+ /* see above for why this has to be estrdup()'d */
+ GLOBAL(request_info).filename = estrdup(GLOBAL(php3_rqst)->filename);
+ GLOBAL(request_info).request_method = GLOBAL(php3_rqst)->method;
+ GLOBAL(request_info).query_string = GLOBAL(php3_rqst)->args;
+ GLOBAL(request_info).content_type = table_get(GLOBAL(php3_rqst)->subprocess_env, "CONTENT_TYPE");
+
+ buf = table_get(GLOBAL(php3_rqst)->subprocess_env, "CONTENT_LENGTH");
+ GLOBAL(request_info).content_length = (buf ? atoi(buf) : 0);
+
+ GLOBAL(request_info).cookies = table_get(GLOBAL(php3_rqst)->subprocess_env, "HTTP_COOKIE");
+
+ return SUCCESS;
+ }
+
+ #endif
+
+ /*
Here is the old apache main from main.c
DEPRECATED.
Index: php31/sapi/fhttpd_sapi.c
diff -c php31/sapi/fhttpd_sapi.c:1.2 php31/sapi/fhttpd_sapi.c:1.3
*** php31/sapi/fhttpd_sapi.c:1.2 Sun May 31 15:44:06 1998
--- php31/sapi/fhttpd_sapi.c Sun May 31 16:45:45 1998
***************
*** 161,166 ****
--- 161,269 ----
}
/*
+ Here is the old fhttpd request info init
+
+ DEPRECATED.
+
+ Must now init the sapi structure.
+
+ */
+
+ #if FHTTPD
+ char script_name_resolved_buffer[2048];
+ const char *method_names[] =
+ {"Unknown", "GET", "HEAD", "POST", "PUT"};
+
+ int php3_init_request_info(void *conf)
+ {
+ static int exit_requested = 0;
+ int i, len;
+ TLS_VARS;
+ req = NULL;
+
+ setalarm(idle_timeout);
+ while (checkinput(server->infd) && (req = readrequest(server))) {
+ alarm(0);
+ if (req->reqtype == FHTTPD_REQUEST) {
+ if (headermade)
+ php3_fhttpd_free_header();
+ response = createresponse(1024, req->id, req->fd, req->ver_major > 0);
+ if (response) {
+ if (req->script_name && req->script_name_resolved) {
+ len = strlen(req->script_name);
+ strncpy(script_name_resolved_buffer, req->script_name_resolved, 2047);
+ script_name_resolved_buffer[2047] = 0;
+
+ GLOBAL(request_info).path_info = NULL; /* Not supported */
+ GLOBAL(request_info).path_translated = script_name_resolved_buffer;
+ GLOBAL(request_info).query_string = req->query_string;
+ GLOBAL(request_info).current_user = NULL;
+ GLOBAL(request_info).current_user_length = 0;
+ GLOBAL(request_info).request_method = method_names[req->method];
+ GLOBAL(request_info).script_name = req->script_name;
+ GLOBAL(request_info).content_length = req->databuffsize;
+ GLOBAL(request_info).content_type = req->content_type;
+ GLOBAL(request_info).cookies = NULL;
+ for (i = 0; i < req->nlines; i++) {
+ if (req->lines[i].paramc > 1) {
+ if (req->lines[i].params[0]) {
+ if (!strcasecmp(req->lines[i].params[0], "HTTP_COOKIE")) {
+ if (req->lines[i].params[1]) {
+ GLOBAL(request_info).cookies = req->lines[i].params[1];
+ }
+ }
+ }
+ }
+ }
+ /* doc_root configuration variable is currently ignored,
+ as it is with every other access method currently also. */
+
+ /* We always need to emalloc() filename, since it gets placed into
+ the include file hash table, and gets freed with that table.
+ Notice that this means that we don't need to efree() it in
+ php3_destroy_request_info()! */
+ if (GLOBAL(request_info).path_translated)
+ GLOBAL(request_info).filename = estrdup(GLOBAL(request_info).path_translated);
+ else
+ GLOBAL(request_info).filename = NULL;
+
+ return SUCCESS;
+ } else {
+ deleterequest(req);
+ req = NULL;
+ setalarm(idle_timeout);
+ }
+ } else {
+ deleterequest(req);
+ req = NULL;
+ setalarm(idle_timeout);
+ }
+ } else {
+ if (req->reqtype == FHTTPD_EXITOK) {
+ exit_status = 1;
+ deleterequest(req);
+ req = NULL;
+ setalarm(idle_timeout);
+ return FAILURE;
+ }
+ deleterequest(req);
+ req = NULL;
+ setalarm(idle_timeout);
+ }
+ }
+ if (global_alarmflag) {
+ if (!exit_requested) {
+ requestexit(server, 1);
+ exit_requested = 1;
+ }
+ } else {
+ exit_status = 1;
+ }
+ return FAILURE;
+ }
+ #endif /* FHTTPD */
+
+ /*
Here is the old fhttpd main from main.c
DEPRECATED.
Index: php31/sapi/phpsapi_cgi.dsp
diff -c php31/sapi/phpsapi_cgi.dsp:1.3 php31/sapi/phpsapi_cgi.dsp:1.4
*** php31/sapi/phpsapi_cgi.dsp:1.3 Wed May 27 23:26:06 1998
--- php31/sapi/phpsapi_cgi.dsp Sun May 31 16:45:46 1998
***************
*** 67,73 ****
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
! # ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "./" /I "../" /I "../main" /D "DEBUG" /D "_DEBUG" /D "THREAD_SAFE" /D "MSVC5" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
--- 67,73 ----
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
! # ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "./" /I "../" /I "../main" /D "CRASH_DETECTION" /D "DEBUG" /D "_DEBUG" /D "THREAD_SAFE" /D "MSVC5" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
Index: php31/sapi/phpsapi_isapi.dsp
diff -c php31/sapi/phpsapi_isapi.dsp:1.4 php31/sapi/phpsapi_isapi.dsp:1.5
*** php31/sapi/phpsapi_isapi.dsp:1.4 Sun May 31 12:44:31 1998
--- php31/sapi/phpsapi_isapi.dsp Sun May 31 16:45:46 1998
***************
*** 70,76 ****
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
! # ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "./" /I "../" /I "../main" /D "DEBUG" /D "_DEBUG" /D "THREAD_SAFE" /D "USE_SAPI" /D "MSVC5" /D "WIN32" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
--- 70,76 ----
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
! # ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "./" /I "../" /I "../main" /D "CRASH_DETECTION" /D "DEBUG" /D "_DEBUG" /D "THREAD_SAFE" /D "USE_SAPI" /D "MSVC5" /D "WIN32" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
- Next message: shane: "[PHP-DEV] CVS update: php31/main"
- Previous message: shane: "[PHP-DEV] CVS update: php31/ext/standard"
- Next in thread: shane: "[PHP-DEV] CVS update: php31/sapi"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

