ID:               44942
 Comment by:       bill at sammer dot com
 Reported By:      inqualab1985 at gmail dot com
 Status:           No Feedback
 Bug Type:         Program Execution
 Operating System: Windows 2000 SP4
 PHP Version:      5.2.5
 New Comment:

session_write_close fixes it for me too.  Thanks vlabella!


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

[2008-12-04 04:35:44] dominic dot manley at det dot wa dot edu dot au

Big thanks to vlabella who led us to a work-around. This is one VERY
frustrating bug to track down!

We have an Apache/PHP 5.2.3/Win2003 setup and concurrent calls to a
script that exec()-ed the same command-line .exe caused the process to
get caught up on the server. Apache wouldn't let go of it and the only
way to kill the process and get the site/sometimes whole server back was
to restart Apache.

I never would have suspected sessions causing this issue... none of our
investigations led us close to that direction. However, vlabella got it
spot on...

Calling session_write_close() before an exec() (or simply never
initiating session support to start with using session_start()) works
around the issue.

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

[2008-10-21 09:26:44] neododge at free dot fr

The same problem happens for me on PHP 5.2.6 / Apache 2.2.9, Apache
won't run any PHP after I try an exec/passthru/`` -no matter what
command I try. Only way to get PHP back seems to be closing all browser
windows that point to my server and waiting for a while before trying to
use a PHP page again.

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

[2008-09-15 17:01:02] vlabella at uamail dot albany dot edu

We have been having the same issue for a long time on win2003 with php
version 5.2.X and apache 5.2.x calling both perl scripts and .exe with
the exec fuinction.  We found that it mostly happens when php runs exec
concurrently on the same process.  For example we would have ajax call
do an exec on the server to read some data and feed it back to the user
every 5 seconds.  In addition the user could do an ajax call to do
something as well on this page.  if the user call came at the same time
as the schdeduled call then php would hang and we would have to restart
apache.  We found it also happens on pages where there are multiple
exec() calls.  We find that all the scripts and programs we call run
fine its just that php hangs when they finish for some reason.  We have
our max_execution_time set to 30 minutes so its not a timeout issue.

We found that calling
session_write_close();
before each exec call seemed to resolve this issue.  But we are not
really sure why and what other effects session_write_close(); may have
on other processes.

Hope this helps resolve this issue.  it is a major headache for us for
the past 2 years!!

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

[2008-08-08 18:55:29] jumpbackhack at gmail dot com

this is still a bug. this is not an apache issue as I have tested
various versions ranging from 2.0.x to 2.2.x

I have tested php v5.2.6 and even a late development version.  This
happens on linux OS as well even with shell_exec()

would there be a backtrace on a hang?

it appears that the hang happens after a successful script executes,
the following time the script runs there is the hang.  usually lasts 2-5
minutes before it allows apache to run any php again.

note that apache will serve static/html files without issue while any
php files are not called.

even a restart of apache does not resolve.

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

[2008-07-22 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

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/44942

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

Reply via email to