appserver-io / webserver

Multithreaded webserver for php written in php
45 stars 14 forks source link

Any plans to support PHP 7.2 with new updated ext-pthreads #201

Closed prolic closed 7 years ago

prolic commented 7 years ago

There is also a new multithreading Socket class available in pthreads.

prolic commented 7 years ago

see also https://gist.github.com/SirSnyder/c6fb3e3c730957a25bfcc08b836a92a7

wagnert commented 7 years ago

Hi, actually we're very busy and we don't know when we found the time to update to PHP 7.2. We've already tested it with PHP 7.0.x + pthreads 3.x and it seems to run, so i think it shouldn't be a long way ... do you have any concrete plans to use it?

prolic commented 7 years ago

According to @krakjoe multithreading is broken in php 7.0 and 7.1. That's why I need at least 7.2. And yes, I have concrete plans to use this for an event store server.

On Aug 29, 2017 20:50, "Tim Wagner" notifications@github.com wrote:

Hi, actually we're very busy and we don't know when we found the time to update to PHP 7.2. We've already tested it with PHP 7.0.x + pthreads 3.x and it seems to run, so i think it shouldn't be a long way ... do you have any concrete plans to use it?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/appserver-io/webserver/issues/201#issuecomment-325653535, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYEvIP0PnhrubRXnAzR3FuIP1BzFDMpks5sdAkVgaJpZM4PF2fd .

wagnert commented 7 years ago

Yes, had a look at the discussion, really bad to read that :( I'll give it a try with PHP 7.2 next week and maybe, in best case, it'll work out of the box. Would be awesome to see it working in your project!

prolic commented 7 years ago

Will you also try the new socket class or use php socket_* methods?

Anyway, thanks for your support.

On Aug 29, 2017 20:59, "Tim Wagner" notifications@github.com wrote:

Yes, had a look at the discussion, really bad to read that :( I'll give it a try with PHP 7.2 next week and maybe, in best case, it'll work out of the box. Would be awesome to see it working in your project!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/appserver-io/webserver/issues/201#issuecomment-325655681, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYEvE7lEGdii6KppaqahEB30KcIJSkfks5sdAscgaJpZM4PF2fd .

wagnert commented 7 years ago

Depends on the compatibility of the new socket class. If the changes are on a decent level, i'll also give it a try. You're welcome!!

prolic commented 7 years ago

maybe this is of any help: https://gist.github.com/SirSnyder/c6fb3e3c730957a25bfcc08b836a92a7

see also https://github.com/krakjoe/pthreads/pull/743

wagnert commented 7 years ago

Seems to be possible to integrate that, so first i'll see how it works with PHP 7.2 using the default socket library, after that i'll give the new socket library a try.

prolic commented 7 years ago

awesome! that's really great, thanks a lot.

wagnert commented 7 years ago

I gave it a try and it seems to work with PHP 7.2. But we've a problem with the FastCGI library we use, which means that we'll need some time to figure out the problems. It's possible that we only need to upgrade to a newer React version. I'll check that during the next days. Depending on the purpose you want to use the webserver, it's possible to use it right now ... assuming FastCGI is not necessary.

prolic commented 7 years ago

Thanks a lot, will give it a try this weekend.

Sascha-Oliver Prolic

2017-08-30 5:10 GMT+08:00 Tim Wagner notifications@github.com:

I gave it a try and it seems to work with PHP 7.2. But we've a problem with the FastCGI library we use, which means that we'll need some time to figure out the problems. It's possible that we only need to upgrade to a newer React version. I'll check that during the next days. Depending on the purpose you want to use the webserver, it's possible to use it right now ... assuming FastCGI is not necessary.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/appserver-io/webserver/issues/201#issuecomment-325805132, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYEvJz4fWx5mJ9MQZ8JFhwMMXcHqLaVks5sdH4pgaJpZM4PF2fd .

wagnert commented 7 years ago

Perfect. To let you install the composer libraries you've to remove the dependency to the library "crunch/fastcgi" : "2.x-dev" (which includes the specifc React version) from the composer.json Then installation should be not problem.

prolic commented 7 years ago

I just your license and whether this is compatible with what I am trying to do, and it seems like it's not.

See: https://www.gnu.org/licenses/license-list.en.html

Quotes: It is incompatible with the GNU GPL in several ways. and We urge you not to use the Open Software License for software you write.

So I think I need to implement something similar myself. Thanks, I will give it a try anyways for educational purposes.

wagnert commented 7 years ago

Independently if you plan to use it or not, i'll let our attorney checking that, because i think it's simply not true what was written there. Thanks for giving us the tip :)

prolic commented 7 years ago

Appreciate your work, but I must be sure I can build software on top of it without heading into license issues. Apache2, MIT, BSD 3-clause or such would not be a problem at all.

wagnert commented 7 years ago

I'll understand you, for sure. It was not our aim to make the software incompatible with GPL, so i'll let our attorney checking if it's true what was written there. If yes, we will think about changing the licence eventually.

ghost commented 7 years ago

@prolic Hi, I looked into your concerns about the OSL-3.0 license and the link you provided to the GNU page. In my opinion it is rather a political question between GPL and OSL. GPL writes, they do not recommend to use the OSL license because the clause with the distribution assent should be ARGUABLY violated when using mailing lists or version control systems. They recommend that if you write software you should release it under the GPL (no surprise with that :-). Its just when Lawrence Rosen recommends you should use his OSL license instead of GPL. (see http://rosenlaw.com/OSL3.0-explained.htm). Anyway: Even GNU states at the link you submitted: "We urge you not to use the Open Software License for software you write. However, there is no reason to avoid running programs that have been released under this license." In your case it depends imho on what you plan to do technically: If you want to use appserver as a basic infrastructure and you e.g. want to bundle your software that runs on top of it (connected but not integrated), then I see no license conflict. If you want to integrate appserver within your own GPL-software and thus create a derivative work of the GPL software, then you have a license conflict, because both the OSL and the GPL have a strong copyleft effect and demand that the entire derivative work is distributed only under their respective license. I hope I could help you with my explanation and wish you good progress with your project.