Bug 90956

Summary: www/eaccelerator bug fixes and support for PHP 5
Product: Ports & Packages Reporter: Joe Horn <joehorn>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff
none
file.shar none

Description Joe Horn 2005-12-27 04:10:07 UTC
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)

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

 USE_BZIP2=     yes
 SUB_FILES=     pkg-message
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2005-12-27 04:27:56 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer
Comment 2 takeda 2006-01-04 09:42:08 UTC
I upgraded today to PHP5 and noticed that eaccelerator doesn't support
it yet. I was very happy to see patch that will solve this problem.

Unfortunatelly after compiling eaccelerator with your modifications
apache started dying, only thing that I saw in logs was:
[Wed Jan 04 01:29:32 2006] [notice] Graceful restart requested, doing restart
[Wed Jan 04 01:29:33 2006] [notice] seg fault or similar nasty error detected in the parent process

I use:
apache-2.0.55_2
php5-5.1.1

and FBSD 6.0-RELEASE
Comment 3 Joe Horn 2006-01-04 15:23:01 UTC
I am so sorry for this.

It looks like that they are still testing code and fixing bugs .
Maybe we should wait for new version to run with PHP 5.1 .

If anyone want to help for testing , please go 
  http://sourceforge.net/projects/eaccelerator/

There are some patches , and a bug report system.

Therefore, the fix I reported is deprecated.

The following fix is only useful for "Broken pipe: write pipe_of_death" bug.
( OR fetch http://www.joehorn.idv.tw/download/patch-debug.c THEN put it in
/usr/ports/www/eaccelerator/files )

# 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-debug.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
Comment 4 Alex Dupre freebsd_committer freebsd_triage 2006-02-02 09:06:55 UTC
State Changed
From-To: open->closed

A different patchset has been applied, thanks.