|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
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-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC