#26786 [NEW]: with CGI, shell_exec()/backtick operator never returns
| From: | php dot chad at cropcirclesystems dot net | Date: | Sun, 04 Jan 2004 20:18:13 +0000 |
| Subject: | #26786 [NEW]: with CGI, shell_exec()/backtick operator never returns | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-52777@lists.php.net to get a copy of this message | ||
From: php dot chad at cropcirclesystems dot net
Operating system: FreeBSD 5.1-p11
PHP version: 4.3.4
PHP Bug Type: CGI related
Bug description: with CGI, shell_exec()/backtick operator never returns
Description:
------------
Using the Apache module or the CLI, everything works
just fine.
However, when using PHP via CGI, the backticks operator
and the shell_exec() function both never return,
however, they DO successfully execute the command! php
blocks idle, not racing.
Seems similar to #11224 in effect, but #11224 claims it
was fixed in 4.0.6! Also, #11224 is on Windows using
IIS! (yuck!)
I've built PHP 4.3.4 via FreeBSD's port system, so it
could be their problem. I have yet to test this with
another operating system. My php.ini is your php.ini-
recommended. My configure line is rather large, but can
be
seen at 'http://www.cropcirclesystems.net/phpinfo.php',
although I have many optional modules, I've also tried
this with FreeBSD's port's default module selections. I
built using: cd /usr/ports/lang/php4; make
WITHOUT_CLI=yes WITHOUT_APACHE=yes install; cp /usr/
local/etc/php.ini-recommended /usr/local/etc/php.ini
Reproduce code:
---------------
<?php
print shell_exec('/full/path/to/some/executable');
?>
Expected result:
----------------
the stdout of the executable
Actual result:
--------------
indefinate waiting. The executable gets executed,
though.
I'd be happy to follow up with more testing/information.
I'll let you know after I try the same thing on FreeBSD
4.9 and Gentoo Linux.
--
Edit bug report at http://bugs.php.net/?id=26786&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26786&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26786&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26786&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26786&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26786&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26786&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26786&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26786&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26786&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26786&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26786&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26786&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26786&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26786&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26786&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26786&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26786&r=float