php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26084 exec() hangs
Submitted: 2003-11-02 15:51 UTC Modified: 2003-11-17 18:17 UTC
Votes:13
Avg. Score:4.8 ± 0.4
Reproduced:13 of 13 (100.0%)
Same Version:6 (46.2%)
Same OS:10 (76.9%)
From: karolls at tlen dot pl Assigned:
Status: No Feedback Package: Program Execution
PHP Version: 4.3.3 OS: Windows XP
Private report: No CVE-ID: None
 [2003-11-02 15:51 UTC] karolls at tlen dot pl
Description:
------------
I'm running CGI script using the exec() function. The problem is that sometime the cmd.exe hangs. I'm shure that my CGI script is ok.

I'm using PHP 4.3.3 and Apache 1.3.29
All result in the exec() command hanging until the console is manually stopped. I also have to restart Apache.

I tried also other functions (system, passthru etc.) but the result is the same.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-03 19:03 UTC] sniper@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 [2003-11-17 18:17 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2006-09-21 06:59 UTC] sbattula at inmage dot net
I am also facing the same problem with Apache 2.0.58 and PHP 5.0.4 on Windows 2003 OS. From one of our phps, an exe called test.exe is being invoked. Randomly, Apache hangs and we need to restart it for normal operation. As sussgested in one of the php.net links (http://bugs.php.net/bug.php?id=22526), I have tried using session_write_close() before each exec call and seesion_start() after completion of the call. But this workaround does not work as suggested.
 [2008-05-07 19:25 UTC] inqualab1985 at gmail dot com
Hi! PHP Team

I am also facing the same problem with exec().

I am using php 5.2.5 and apache 2.2 on window server 2003.

The problem is that I have to execute a exe, for which I have use exec(). Normally it works Fine, but sometime ( more correctly, we say randomly) it hang up. It will lock the apache and if we call the same page or any other page of php having exec(), it hang up at the line where exec() function is used. If we commented the line having exec(), then the page run & loaded correctly.

The problem also become critical because none of the error is shown. Also none of the error handling & logging mechanism works.

The only solution to this problem is to restart the Apache.

I hope you will soon solved this bug. Although, this bug is not reported by many people because most of the people works on websites thats runs on hired server where administrator already stop the execution of these functions. But the professionals working at high level on PHP experience the same problem which means there is a bug related to this class of functions.

For any further information you can contact me.
Thanks.
 [2008-12-04 22:49 UTC] iandrus at omniture dot com
PHP 5.2.4 CLI on CentOS release 4.4 (Final) we also see it randomly (though rarely) when run from cron.  I haven't seen it when run manually (but probably haven't run it nearly often enough).

When I strace the process, it is stuck in poll() on a socket that no longer exists.  I tried sending it several non-lethal signals, but to no avail.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC