[PHP-BUG] Bug #71209 [NEW]: php-cgi script hangs when started from php-fpm via system(), passthru() etc.

[email protected] ("lameventanas at gmail dot com")
Newsgroups php.bugs
Message-ID <[email protected]>
From:             lameventanas at gmail dot com
Operating system: Linux
PHP version:      5.6.16
Package:          Scripting Engine problem
Bug Type:         Bug
Bug description:php-cgi script hangs when started from php-fpm via system(), passthru() etc.

Description:
------------
My lighttpd server uses fastcgi to run php code.

The php code starts an external program that happens to be a standalone
php script (shebang: #!/usr/bin/php-cgi).

The script hangs when started from a php-fpm process manager, but works
fine when started from a php-cgi "process manager".

Just to clarify, the process that hangs is the php-cgi which is
interpreting the standalone script.  If I replace this with a
shellscript, everything works fine.

Test script:
---------------
test.php:
<?
header("Content-type: text/plain");
echo "Starting\n";
system("/var/www/htdocs/script.php");
echo "Finished\n";
?>

script.php:
#!/usr/bin/php-cgi -q
<?
echo "Hello world!\n";
?>


Expected result:
----------------
No hangs.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=71209&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=71209&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=71209&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=71209&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=71209&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=71209&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=71209&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=71209&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=71209&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=71209&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=71209&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=71209&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=71209&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=71209&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71209&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=71209&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=71209&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=71209&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71209&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=71209&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=71209&r=mysqlcfg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.