|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-08-11 12:43 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2021-08-11 12:43 UTC] cmb@php.net
[2021-08-22 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 11:00:02 2025 UTC |
Description: ------------ I want to add read event to pg_socket with event extension both don't accept resource of pg_socket but stream_select works well For simplicity I write test script with well known library called reactphp/event-loop if you run test script using event extension , this warning shown and there is no read event PHP Warning: Event::add(): Epoll ADD(1) on fd 30584288 failed. Old events were 0; read change was 1 (add); write change was 0 (none); close change was 0 (none): Bad file descriptor in vendor/react/event-loop/src/ExtEventLoop.php on line 259 PHP Warning: Event::add(): Failed adding event in vendor/react/event-loop/src/ExtEventLoop.php on line 259 Test script: --------------- $loop = React\EventLoop\Factory::create(); $connection = pg_connect("host=localhost port=5432 dbname=mary"); $socket = pg_socket($connection); $loop->addReadStream($socket , function (){ echo "READ EVENT\n"; }); pg_send_query($connection , "select * from authors;"); Expected result: ---------------- PHP Warning: Event::add(): Epoll ADD(1) on fd 30584288 failed. Old events were 0; read change was 1 (add); write change was 0 (none); close change was 0 (none): Bad file descriptor in vendor/react/event-loop/src/ExtEventLoop.php on line 259 PHP Warning: Event::add(): Failed adding event in vendor/react/event-loop/src/ExtEventLoop.php on line 259