#44942 [Opn-Fbk]: exec() hangs apache

2008-07-14 Thread jani
 ID:   44942
 Updated by:   [EMAIL PROTECTED]
 Reported By:  inqualab1985 at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Program Execution
 Operating System: Microsoft Window 2000 SP4
 PHP Version:  5.2.5
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to Open. Thank you for helping
us make PHP better.




Previous Comments:


[2008-07-09 13:17:48] lk at profline dot ch

I forgot the specifications, we use:

Windows XP  
Apache 2.2.8
PHP 5.2.6

Is that an apache or a php related problem ?



[2008-07-09 13:04:37] lk at profline dot ch

We have got the same problem here, exec hangs sometimes and causes the
page to not respond to anything. Only way is to restart apache. Is there
a solution available for this ?



[2008-07-04 20:28:57] inqualab1985 at gmail dot com

Dear markus

In the first sight, I also understand that this happen only when
multiple request hit the script with exec(). But in reality there is no
guarantee that if the request goes one by one Hanging will not happen. I
had done a test at the time of writing this bug in which call the script
one by one but it randomly hanged up again after a period of time. At
that time period is long.

So dear PHP team , you have to really look up this matter.

Thanks



[2008-07-03 20:33:19] markus at opahle dot com

Windows XP SP3
Apache 2.2.6
PHP 5.2.6

I have the same problem. 

I noticed that apache only hangs up when a php script with an exec
command was called twice at the same time.

The problem also ocours when I tried to use popen or proc_open(with and
without bypass_shell option)



[2008-06-10 14:59:10] aleaddict at yahoo dot com

Windows Server 2003 R2 Service Pack 1
Apache 2.2.6
PHP 5.2.4 (upgraded to 5.2.6 with no success)

Executing resource kit utility shortcut.exe via exec() with EXACTLY the
same results...  Random, no errors logged, hangs up all succeeding calls
to exec(), requires restart.

Keith



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=44942edit=1



#44942 [Opn-Fbk]: exec() hangs apache

2008-05-09 Thread jani
 ID:   44942
 Updated by:   [EMAIL PROTECTED]
 Reported By:  inqualab1985 at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Program Execution
 Operating System: Microsoft Window 2000 SP4
 PHP Version:  5.2.5
 New Comment:

What exactly does this sample.exe do? It's most likely not any PHP
problem at all anyway, you just call some exe that hangs itself..


Previous Comments:


[2008-05-08 05:40:53] inqualab1985 at gmail dot com

Description:

Hi! PHP Team

I am facing a problem of apache hang up due to exec() function.

I am using PHP 5.2.5 and Apache 2.2 on MS Window 2000 SP4  also on MS
Window XP.

The problem is that I have to execute a exe, for which I have use
exec(). Normally it works Fine, but sometime (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 there is no error for this.
Also none of the error handling  logging mechanism works.

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

I am providing you as much as information as possible to catch the
problem correctly.
 

Reproduce code:
---
$exeFilePath = realpath(../sample.exe);   

if (eregi(win, PHP_OS))
$command = \\$exeFilePath\ argument1\;
else
$command = \$exeFilePath\ argument1;

$output = null;
$returnVal = null;
$result = exec($command,$output,$returnVal);
if($returnVal !=0)
   echo Error;
else
   echo $output[0];

echo end of the program;

Expected result:

it will show the output of exe for particular argument. 

Actual result:
--
Normally it works correctly as expected but sometime the the execution
of the page hang at line $result = exec($command,$output,$returnVal); 
. After this has happen I am not able to run any script that will use
the exec(). In all scripts apache hangs at exec() function, do not
matter  which exe will be called. 





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