ID: 49265
User updated by: stefan dot launicke at gate8 dot de
Reported By: stefan dot launicke at gate8 dot de
Status: Open
Bug Type: Program Execution
Operating System: Linux 2.6.19
PHP Version: 5.2.10
New Comment:
Description:
------------
When doing a external function call using either passthru(),
proc_open() or system(), the external process hangs most of the time.
Sometimes it works. Only appears when run through mod_php / apache2.
Calling the script in the shell with CLI always works.
ps shows:
11606 ? Sl 0:00 /usr/bin/pdftk
No errors in any logs, no segfaults. top
Please Note:
- doing the exact same call in a Perl script running in Apache always
works.
- calling the perl script which does the funtion call from within php
will crash again with ps (passthru example):
11674 ? S 0:00 sh -c cd '/data/usr/xxx/tmp' ;
/data/usr/xxx/tmp/test3.pl
11675 ? S 0:00 /usr/bin/perl -w
/data/usr/xxx/tmp/test3.pl
11676 ? Sl 0:00 /usr/bin/pdftk
/data/usr/xxx/management/home/app/pdf...
Apache Version: 2.2.11, Worker MPM
Reproduce code:
---------------
passthru ("/usr/bin/pdftk /data/testin.pdf fill_form /data/workdata
output /data/testout.pdf flatten");
Expected result:
----------------
exec & return
Actual result:
--------------
hang
Previous Comments:
------------------------------------------------------------------------
[2009-08-15 10:17:26] stefan dot launicke at gate8 dot de
Description:
------------
When doing a external function call using either passthru(),
proc_open() or system(), the external process hangs most of the time.
Sometimes it works. Only appears when run through mod_php / apache2.
Calling the script in the shell with CLI always works.
ps shows:
11606 ? Sl 0:00 /usr/bin/pdftk
No errors in any logs, no segfaults. top
Please Note:
- doing the exact same call in a Perl script running in Apache always
works.
- calling the perl script which does the funtion call from within php
will crash again with ps (passthru example):
11674 ? S 0:00 sh -c cd '/data/usr/inauris.com/tmp' ;
/data/usr/inauris.com/tmp/test3.pl
11675 ? S 0:00 /usr/bin/perl -w
/data/usr/inauris.com/tmp/test3.pl
11676 ? Sl 0:00 /usr/bin/pdftk
/data/usr/inauris.com/management/home/app/pdf...
Apache Version: 2.2.11, Worker MPM
Reproduce code:
---------------
passthru ("/usr/bin/pdftk /data/testin.pdf fill_form /data/workdata
output /data/testout.pdf flatten");
Expected result:
----------------
exec & return
Actual result:
--------------
hang
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49265&edit=1