ports/90956: eAccelerator bug fixes and support for PHP 5

Joe Horn joehorn at mi.chu.edu.tw
Tue Dec 27 04:10:13 UTC 2005


>Number:         90956
>Category:       ports
>Synopsis:       eAccelerator bug fixes and support for PHP 5
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 27 04:10:07 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Joe Horn
>Release:        5.4-RELEASE-p8
>Organization:
MI, CHU, Taiwan
>Environment:
FreeBSD Leo.mi.chu.edu.tw 5.4-RELEASE-p8 FreeBSD 5.4-RELEASE-p8 #7: Wed Dec 21 04:38:43 CST 2005     root at Leo.mi.chu.edu.tw:/usr/obj/usr/src/sys/Leo  i386      
>Description:
After I have installed Apache 2 , PHP 4 and eAccelerator from ports,
I found these messages in httpd-error.log :
  [warn] (32)Broken pipe: write pipe_of_death

I found that the child processes of httpd won't be decreased, 
so I tried to search for solutions, and this page was found :

http://sourceforge.net/tracker/index.php?func=detail&aid=1366008&group_id=122249&atid=692864

Besides, I found these interesting pages :
  http://sourceforge.net/tracker/index.php?func=detail&aid=1379224&group_id=122249&atid=692864
http://sourceforge.net/tracker/index.php?func=detail&aid=1196010&group_id=122249&atid=692866

Now I have another machine running with these ports (packages) :
  apache-2.2.0_4      Version 2.2 of Apache web server with prefork MPM.
  eaccelerator-0.9.4.r1_1 An opcode cache for PHP with encoder and loader
  php5-5.1.1          PHP Scripting Language (Apache Module and CLI)
>How-To-Repeat:
              
>Fix:
--- /usr/ports/www/eaccelerator/Makefile.orig       Tue Dec 27 11:02:05 2005
+++ /usr/ports/www/eaccelerator/Makefile    Tue Dec 27 11:16:21 2005
@@ -18,9 +18,12 @@
 USE_PHP=       session
 USE_PHPIZE=    yes
 USE_PHP_BUILD= yes
-BROKEN_WITH_PHP=       5

 CONFIGURE_ARGS=        --enable-eaccelerator=shared
+
+.if defined(WITH_PHP5)
+CONFIGURE_ARGS+=       --without-eaccelerator-optimizer
+.endif

 USE_BZIP2=     yes
 SUB_FILES=     pkg-message




# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#       /usr/ports/www/eaccelerator/files/patch-config.m4
#       /usr/ports/www/eaccelerator/files/patch-content.c
#       /usr/ports/www/eaccelerator/files/patch-debug.c
#
echo x - /usr/ports/www/eaccelerator/files/patch-config.m4
sed 's/^X//' >/usr/ports/www/eaccelerator/files/patch-config.m4 << 'END-of-/usr/ports/www/eaccelerator/files/patch-config.m4'
X--- config.m4.orig     Mon Nov 21 01:53:43 2005
X+++ config.m4  Tue Dec 27 10:47:02 2005
X@@ -340,4 +340,19 @@
X   AC_MSG_RESULT([$msg])
X   CPPFLAGS="$old_cppflags"
X
X+  old_cppflags="$CPPFLAGS"
X+  CPPFLAGS="$CPPFLAGS $INCLUDES -I$abs_srcdir"
X+  AC_MSG_CHECKING([for EG(garbage)])
X+  AC_TRY_COMPILE([
X+  #include <php.h>
X+  #include <zend_globals.h>
X+  ],[
X+  zend_executor_globals eg;
X+  int tmp;
X+  tmp = eg.garbage_ptr;
X+  ],
X+  AC_DEFINE(HAVE_EG_GARBAGE, 1, [Defined if zend_executor_globals.garbage_ptr exists])
X+  msg=yes,msg=no)
X+  AC_MSG_RESULT([$msg])
X+  CPPFLAGS="$old_cppflags"
X fi
END-of-/usr/ports/www/eaccelerator/files/patch-config.m4
echo x - /usr/ports/www/eaccelerator/files/patch-content.c
sed 's/^X//' >/usr/ports/www/eaccelerator/files/patch-content.c << 'END-of-/usr/ports/www/eaccelerator/files/patch-content.c'
X--- content.c.orig     Sun Jul 10 16:12:33 2005
X+++ content.c  Tue Dec 27 10:47:02 2005
X@@ -594,9 +594,11 @@
X         eaccelerator_content_cache_place != eaccelerator_none) {
X
X       /* clean garbage */
X+#ifdef HAVE_EG_GARBAGE
X       while (EG(garbage_ptr)) {
X         zval_ptr_dtor(&EG(garbage)[--EG(garbage_ptr)]);
X       }
X+#endif
X
X       eaccelerator_put(key, key_len, return_value, ttl, eaccelerator_content_cache_place TSRMLS_CC);
X     }
END-of-/usr/ports/www/eaccelerator/files/patch-content.c
echo x - /usr/ports/www/eaccelerator/files/patch-debug.c
sed 's/^X//' >/usr/ports/www/eaccelerator/files/patch-debug.c << 'END-of-/usr/ports/www/eaccelerator/files/patch-debug.c'
X--- debug.c.orig        Sun Jul 10 16:12:33 2005
X+++ debug.c     Tue Dec 27 10:22:36 2005
X@@ -66,7 +66,7 @@
X void ea_debug_shutdown ()
X {
X     fflush (F_fp);
X-    fclose (F_fp);
X+    if (F_fp != stderr) fclose (F_fp);
X     F_fp = NULL;
X }
END-of-/usr/ports/www/eaccelerator/files/patch-debug.c
exit
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list