ID:               38915
 Comment by:       virus at tgu dot ru
 Reported By:      dimmoborgir at gmail dot com
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: UNIX
 PHP Version:      5.2.2, 4.4.7
 New Comment:

OMG...
It's still didn't fixed... :(


Previous Comments:
------------------------------------------------------------------------

[2008-08-26 13:08:53] anomie at users dot sf dot net

It seems that it could easily be fixed by having mod_php use the
Apache-provided functions which are intended to solve exactly this
problem, but the PHP developers seem to have decided to ignore this bug
instead.

Rather than a cron script, use a trampoline program like the one posted
by jeroen at unfix dot org; we have something similar here, although
ours doesn't impose an arbitrary run time limit.

------------------------------------------------------------------------

[2008-08-20 13:28:45] peterspoon at abv dot bg

SO, can this problem be fixed within PHP/Apache or it cannot?
Do you think using funny scripts started by cron is a solution?

------------------------------------------------------------------------

[2008-05-27 15:12:09] jeroen at unfix dot org

My solution to this very annoying issue (especially when Apache is
reloaded and the from PHP spawned app is still running and your
webserver thus simply dies off as the apache processes are gone, but the
spawned app keeps port 80 etc open for you, thus making Apache never
start again...

http://unfix.org/~jeroen/archive/closedexec.c

Compile: cc -o /usr/bin/closedexec closedexec.c

Just call it like: system("/usr/bin/closedexec /path/to/exe arg arg
arg") or whatever call you where using in PHP.

It first closes all sockets !1|!2 (stdout/stderr), setsid()'s, forks,
and then execv's the args given, doing a waitpid() in the other thread
and killing the process when it runs longer than 5 minutes.

------------------------------------------------------------------------

[2008-04-30 00:06:18] support at ppnhosting dot com

5.2.3
also experiencing this 'bug' to the point of having to manually kill
Exim to just Apache restarted.. the mail() function is suffering from
the same problem. It is very annoying to see Apache failing to 
restart, because the MTA (exim via sendmail in our case) is already 
listening on port *:80

------------------------------------------------------------------------

[2008-03-07 10:45:53] martin at activevb dot de

Will this ever be fixed... or shall we better rewrite our 30000 lines
of PHP code in Perl? :-|

Is it possible to use apr_proc_create() and apr_pool_cleanup_for_exec()
directly from PHP source code without patching PHP?

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/38915

-- 
Edit this bug report at http://bugs.php.net/?id=38915&edit=1

Reply via email to