]> git.pld-linux.org Git - packages/php.git/commitdiff
- added session-unregister patch to avoid httpd SEGVs with msession module
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 7 Jan 2003 12:56:18 +0000 (12:56 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  (it's something strange - in Ra, on startup apache initializes modules,
   then shutdowns them and initializes again; session module wasn't prepared
   for that (didn't shutdown other session modules cleanly). I couldn't
   reproduce such problems on newer software, but still with apache 1.3.27)

Changed files:
    php-session-unregister.patch -> 1.1
    php.spec -> 1.234

php-session-unregister.patch [new file with mode: 0644]
php.spec

diff --git a/php-session-unregister.patch b/php-session-unregister.patch
new file mode 100644 (file)
index 0000000..07cbb2d
--- /dev/null
@@ -0,0 +1,69 @@
+--- php-4.3.0/ext/session/php_session.h.orig   Thu Oct  3 08:45:15 2002
++++ php-4.3.0/ext/session/php_session.h        Tue Jan  7 12:45:39 2003
+@@ -181,6 +181,7 @@
+ int php_get_session_var(char *name, size_t namelen, zval ***state_var TSRMLS_DC);
+ PHPAPI int php_session_register_module(ps_module *);
++PHPAPI int php_session_unregister_module(const char *name);
+ PHPAPI int php_session_register_serializer(const char *name,
+               int (*encode)(PS_SERIALIZER_ENCODE_ARGS),
+--- php-4.3.0/ext/session/session.c.orig       Thu Dec  5 21:42:05 2002
++++ php-4.3.0/ext/session/session.c    Tue Jan  7 12:45:38 2003
+@@ -208,12 +208,33 @@
+                       ps_modules[i] = ptr;
+                       ret = 0;
+                       break;
+-              }       
++              } else if((ps_modules[i]->name != NULL) && (ptr->name != NULL) && 
++                              !strcasecmp(ps_modules[i]->name, ptr->name)) {
++                      /* avoid double registration */
++                      ret = 0;
++                      break;
++              }
+       }
+       
+       return ret;
+ }
++PHPAPI int php_session_unregister_module(const char *name)
++{
++      int ret = -1;
++      int i;
++
++      for (i = 0; i < MAX_MODULES; i++) {
++              if (ps_modules[i] && ps_modules[i]->name && !strcasecmp(ps_modules[i]->name, name)) {
++                      ps_modules[i] = 0;
++                      ret = 0;
++                      break;
++              }
++      }
++
++      return ret;
++}
++
+ PHP_MINIT_FUNCTION(session);
+ PHP_RINIT_FUNCTION(session);
+ PHP_MSHUTDOWN_FUNCTION(session);
+--- php-4.3.0/ext/session/mod_mm.c.orig        Thu Dec  5 21:42:05 2002
++++ php-4.3.0/ext/session/mod_mm.c     Tue Jan  7 12:46:21 2003
+@@ -291,6 +291,7 @@
+ PHP_MSHUTDOWN_FUNCTION(ps_mm)
+ {
++      php_session_unregister_module("mm");
+       if (ps_mm_instance) {
+               ps_mm_destroy(ps_mm_instance);
+               return SUCCESS;
+--- php-4.3.0/ext/msession/msession.c.orig     Thu Aug 22 15:29:50 2002
++++ php-4.3.0/ext/msession/msession.c  Tue Jan  7 12:46:50 2003
+@@ -188,6 +188,9 @@
+ PHP_MSHUTDOWN_FUNCTION(msession)
+ {
++#ifdef HAVE_PHP_SESSION
++      php_session_unregister_module("msession");
++#endif
+       return SUCCESS;
+ }
index d2bc7a46a035d55d8ba7dea1ff4aeb1aa0891067..af1f470c8817e927bb5d08365c95d817cfc2cbaa 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -1,7 +1,5 @@
 #
 # TODO:
-# - msession module causes SEGV during phpinfo()
-#   (only in Ra?  doesn't happen in my environment)
 # - pear - isn't built now, what is still needed???
 # - fastcgi option in cgi SAPI? or separate fcgi SAPI?
 #
@@ -95,6 +93,7 @@ Patch15:      %{name}-build_modules.patch
 Patch16:       %{name}-sapi-ini-file.patch
 Patch17:       %{name}-dl-zlib.patch
 Patch18:       %{name}-dl-pcre.patch
+Patch19:       %{name}-session-unregister.patch
 #Patch17:      %{name}-%{name}_iconv_string_declaration.patch
 #Patch18:      %{name}-pear-cosmetic.patch
 #Patch19:      %{name}-mnogosearch.patch
@@ -1372,6 +1371,7 @@ Repozytorium Aplikacji. Ten pakiet zawiera aplikacje potrzebne do
 %patch16 -p1
 %patch17 -p1
 %patch18 -p1
+%patch19 -p1
 #%patch17 -p1  -- obsolete
 #%patch18 -p1  -- obsolete? - no such file
 #%patch19 -p1  -- obsolete
This page took 0.801636 seconds and 4 git commands to generate.