Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommanded Loop implementation for php7 #55

Closed
tkleinhakisa opened this issue Aug 19, 2016 · 4 comments
Closed

Recommanded Loop implementation for php7 #55

tkleinhakisa opened this issue Aug 19, 2016 · 4 comments
Labels

Comments

@tkleinhakisa
Copy link

Hi,

i'm trying to upgrade my app to php7. I used libevent and the matching pecl extension which is not available anymore for php7

What would you recommend ?

Did some of you make the switch already ?
What solution did you choose ?

Thank you for the effort in ReactPHP

@geki-yaba
Copy link

I used expressif's version with a patch to make pecl-libevent work with php7. Without the patch my server instance would just crash on startup. Though, causing one memory leak.

Today I switched to pecl-event-2.2.1 (master snapshot) for its issue 31 [0]. pecl-event supports php7 since version 2.1.0. For now, it looks promising; the server instance started and could be terminated with ctrl-c. So, running as a daemon works, which only works with a libevent backend.

[0] https://bitbucket.org/osmanov/pecl-event/issues/31

@clue clue added the question label Nov 17, 2016
@leric
Copy link

leric commented Jan 9, 2017

There's another libev binding for php in pecl which is actively maintained, and php7 compatible, could be a good choice for another event-loop implementation.
http://pecl.php.net/package/ev

@clue
Copy link
Member

clue commented Jan 9, 2017

The libevent extension does not currently support PHP7. There's ongoing effort to update libevent to support PHP7 in php/pecl-event-libevent#2. However, the current version occasionally segfaults. This could not be observed in earlier version, so it is believed that this is a bug in libevent, rather than React.
As such, there's little we can do here. Discussion about this is probably best directed at #40.

In the meantime, you may want to check out the "event" extension. We've seen reports of people successfully using this on PHP7.

@clue
Copy link
Member

clue commented Feb 8, 2017

In the meantime, you may want to check out the "event" extension. We've seen reports of people successfully using this on PHP7.

I'll assume this is resolved and will close this for now, please feel free to report back otherwise 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants