[PHP-DEV] CVS update: php31/sapi From: shane (php-dev <email protected>)
Date: 06/26/98

Date: Friday June 26, 1998 @ 15:11
Author: shane

Update of /repository/php31/sapi
In directory asf:/tmp/cvs-serv9920/sapi

Modified Files:
        apache_sapi.c mod_php3.c phpsapi_apache.dsp
Log Message:
more apache work. crashing at request shutdown because it gets called twice. how?

Index: php31/sapi/apache_sapi.c
diff -c php31/sapi/apache_sapi.c:1.8 php31/sapi/apache_sapi.c:1.9
*** php31/sapi/apache_sapi.c:1.8 Fri Jun 26 12:53:41 1998
--- php31/sapi/apache_sapi.c Fri Jun 26 15:11:08 1998
***************
*** 124,130 ****
                                  php3_rqst->content_type = pstrdup(php3_rqst->pool,r + 2);
                          else
                                  php3_rqst->content_type = pstrdup(php3_rqst->pool,r + 1);
! GLOBAL(cont_type) = php3_rqst->content_type;
                  } else if (!strcasecmp(header, "Set-Cookie")){
                          *r = ':';
                          php3_PushCookieList(header);
--- 124,133 ----
                                  php3_rqst->content_type = pstrdup(php3_rqst->pool,r + 2);
                          else
                                  php3_rqst->content_type = pstrdup(php3_rqst->pool,r + 1);
! /* FIXME cont_type is already estrduped. This changed it, thus causing
! the efree to fail after this function exits. What is it here for,
! and what do we need to do to fix it.
! GLOBAL(cont_type) = php3_rqst->content_type; */
                  } else if (!strcasecmp(header, "Set-Cookie")){
                          *r = ':';
                          php3_PushCookieList(header);
***************
*** 187,193 ****
                  /*FIXME cookie now = 'Set-Cookie: cookie information'
                    need to split for table-add
                    */
! {
                          table_add(php3_rqst->headers_out, "Set-Cookie", tempstr);
                          if (cookie->cookie) efree(cookie->cookie);
                          efree(cookie);
--- 190,196 ----
                  /*FIXME cookie now = 'Set-Cookie: cookie information'
                    need to split for table-add
                    */
! if(cookie){
                          table_add(php3_rqst->headers_out, "Set-Cookie", tempstr);
                          if (cookie->cookie) efree(cookie->cookie);
                          efree(cookie);
***************
*** 531,537 ****
          sapi_info->current_user_length = 0;
  
          /* see above for why this has to be estrdup()'d */
! sapi_info->filename = strdup(php3_rqst->filename);
          sapi_info->request_method = php3_rqst->method;
          sapi_info->query_string = php3_rqst->args;
          sapi_info->content_type = table_get(php3_rqst->subprocess_env, "CONTENT_TYPE");
--- 534,541 ----
          sapi_info->current_user_length = 0;
  
          /* see above for why this has to be estrdup()'d */
! sapi_info->rqst_filename = strdup(php3_rqst->filename);
! sapi_info->filename = NULL; /* we will estrdup rqst_filename later*/
          sapi_info->request_method = php3_rqst->method;
          sapi_info->query_string = php3_rqst->args;
          sapi_info->content_type = table_get(php3_rqst->subprocess_env, "CONTENT_TYPE");
Index: php31/sapi/mod_php3.c
diff -c php31/sapi/mod_php3.c:1.3 php31/sapi/mod_php3.c:1.4
*** php31/sapi/mod_php3.c:1.3 Thu Jun 25 20:59:09 1998
--- php31/sapi/mod_php3.c Fri Jun 26 15:11:09 1998
***************
*** 27,33 ****
     | (with helpful hints from Dean Gaudet <dgaudet <email protected>> |
     +----------------------------------------------------------------------+
   */
! /* $Id: mod_php3.c,v 1.3 1998/06/26 00:59:09 shane Exp $ */
  
  #include "php3_apache.h"
  
--- 27,33 ----
     | (with helpful hints from Dean Gaudet <dgaudet <email protected>> |
     +----------------------------------------------------------------------+
   */
! /* $Id: mod_php3.c,v 1.4 1998/06/26 19:11:09 shane Exp $ */
  
  #include "php3_apache.h"
  
***************
*** 314,320 ****
  {
          /* FIXME, well have to figure out how this fits in for threaded architecture */
  #ifndef THREAD_SAFE
! register_cleanup(p, NULL, php3_module_shutdown, php3_module_shutdown_for_exec);
  #endif
  #if 0
   Skip this until the Apache guys figure out what the heck they are doing
--- 314,321 ----
  {
          /* FIXME, well have to figure out how this fits in for threaded architecture */
  #ifndef THREAD_SAFE
! //register_cleanup(p, NULL, php3_module_shutdown, php3_module_shutdown_for_exec);
! register_cleanup(p, NULL, NULL, NULL);
  #endif
  #if 0
   Skip this until the Apache guys figure out what the heck they are doing
***************
*** 375,391 ****
  {
          STANDARD_MODULE_STUFF,
          php3_init_handler, /* initializer */
- /* FIXME
- for now, we'll ignore per-directory stuff until it gets
- straightened out.
- */
- #if 0
          php3_create_dir, /* per-directory config creator */
          php3_merge_dir, /* dir merger */
- #else
- NULL,
- NULL,
- #endif
          NULL, /* per-server config creator */
          NULL, /* merge server config */
          php3_commands, /* command table */
--- 376,383 ----
Index: php31/sapi/phpsapi_apache.dsp
diff -c php31/sapi/phpsapi_apache.dsp:1.3 php31/sapi/phpsapi_apache.dsp:1.4
*** php31/sapi/phpsapi_apache.dsp:1.3 Thu Jun 25 21:27:14 1998
--- php31/sapi/phpsapi_apache.dsp Fri Jun 26 15:11:09 1998
***************
*** 65,71 ****
  # PROP Use_MFC 0
  # PROP Use_Debug_Libraries 1
  # PROP Output_Dir "c:\php31"
! # PROP Intermediate_Dir "Debug"
  # 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
--- 65,71 ----
  # PROP Use_MFC 0
  # PROP Use_Debug_Libraries 1
  # PROP Output_Dir "c:\php31"
! # PROP Intermediate_Dir "sapi_Debug"
  # 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