|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70393 event_set doesn't accept persistent socket resource
Submitted: 2015-08-30 19:55 UTC Modified: 2015-09-16 20:38 UTC
From: edefimov dot it at gmail dot com Assigned:
Status: Closed Package: libevent (PECL)
PHP Version: 5.6.12 OS: Ubuntu 14.04
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: edefimov dot it at gmail dot com
New email:
PHP Version: OS:


 [2015-08-30 19:55 UTC] edefimov dot it at gmail dot com
In libevent extension version 0.1.0 it is impossible to use event_set with persistent socket resource. 

Test script:

$socket = pfsockopen('', 80);
stream_set_blocking($socket, 0);

$base = event_base_new();

$event = event_new();
$result = event_set($event, $socket, EV_READ | EV_WRITE, function ($socket) {



Expected result:

Actual result:
PHP Warning:  event_set(): fd argument must be either valid PHP stream or valid PHP socket resource


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-09-16 20:38 UTC] edefimov dot it at gmail dot com
This issue also applies to event_buffer_new, event_buffer_fd_set functions and can be fixed with this pull request
 [2015-09-17 12:24 UTC]
Automatic comment on behalf of
Log: fix #70393 lib event can process persistent streams
 [2015-09-17 12:24 UTC]
-Status: Open +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 22 03:01:29 2024 UTC