ID: 44908
Comment by: ondraster at gmail dot com
Reported By: mike at silverorange dot com
Status: No Feedback
Bug Type: Streams related
Operating System: *
PHP Version: 5.2CVS-2008-09-08
New Comment:
function loadModule ( $moduleName ) {
$descriptorspec = array(
0 => array("pipe", "r"),
1 => array("pipe", "w"),
2 => array("file", "errors.txt", "a")
);
$module = proc_open ( 'I:\httpd\php\php.exe
I:\httpd\php-irc-bot\module.' . $moduleName . '.php', $descriptorspec,
$pipes, NULL, array ( 'RUNFIRST' => true ) );
$this -> runningModules[$moduleName] = $module;
echo "Registered new module: $moduleName\r\n";
$this -> pipes[$moduleName] = $pipes;
}
... few code ...
foreach ( $this -> pipes as $module => $pipes ) {
fwrite ( $pipes[0], $msg );
$forChange[] = $pipes[1];
}
$r = NULL;
$e = NULL;
$sock_change = stream_select ( $forChange, $r, $e, 0, 20 );
if ( $sock_change > 0 && $sock_change !== false ) {
foreach ( $forChange as $key => $stream ) {
echo fread ( $stream, 4096 );
}
}
PHP 5.2.2, 5.2.8, 5.3 (Windows Vista 64bit, x86 build, running from
CLI) still not working. After 3/4 of year still not fixed. PHP6 says
some warnings, never seen before ("Cannot cast a filtered stream on this
system", complete errors:
http://clip2net.com/clip/m12051/1233956312-clip-16kb.png
Previous Comments:
------------------------------------------------------------------------
[2008-12-03 01:00:00] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2008-11-25 03:57:58] [email protected]
Please try using this CVS snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2008-09-08 14:51:00] [email protected]
Jani,
I tried the posted development snapshot and the test still fails. The
stream_select() call still returns stdout and stderr streams in the
read array and reading from either will block indefinitely (because
they're not ready).
Please reopen this bug.
------------------------------------------------------------------------
[2008-05-27 15:51:00] ciocan at gmail dot com
Sorry i forgot to mention that for me it happens in Linux: CentOS 5,
php 5.2.6 (and also tried on CentoOS 5, php 5.2.1)
Thank you,
Pavel
------------------------------------------------------------------------
[2008-05-27 15:46:52] pciocan at gmail dot com
I encountered the same problem with stream_select but when using named
pipes (created with posix_mkfifo and opened using fopen). Is there a
workaround for this problem?
Thank you,
Pavel
------------------------------------------------------------------------
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/44908
--
Edit this bug report at http://bugs.php.net/?id=44908&edit=1