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

phpsgi #34

Open
c9s opened this issue Sep 25, 2015 · 12 comments
Open

phpsgi #34

c9s opened this issue Sep 25, 2015 · 12 comments

Comments

@c9s
Copy link

c9s commented Sep 25, 2015

Wow amazing! I didn't find your project until I finished the PHPSGI spec and the server implementation. XD

I guess you might be interested in PHPSGI
https://github.com/phpsgi/phpsgi

And we also implemented a HTTP server based on PHPSGI
https://github.com/phpsgi/Funk

It would be great if you can join us and maybe we can share some of codes . :D

@c9s
Copy link
Author

c9s commented Sep 26, 2015

by the way, we also developed an extension for phpsgi https://github.com/phpsgi/phpsgi/tree/master/ext

@tamagokun
Copy link
Owner

Hey, that's great! I'd love to help out any way I can. Rack'em isn't actively worked on these days, but I do have a few production projects that run on it, so it still gets some updates from time to time.

I started it in 2012, so the code is probably pretty outdated. PHP has made some pretty great strides recently.

@c9s
Copy link
Author

c9s commented Sep 27, 2015

so excited! I just added you as the team member in phpsgi. The phpsgi specification is not finished yet actually, I am still thinking about a way to support file upload for SAPI servers and PHP implemented servers like your rackem or reactphp.

@tamagokun
Copy link
Owner

Thanks! Where do you prefer to have conversations? Slack, Gitter, Gchat, etc?

Uploads should just read http form data from the input stream, right? Or are you thinking of the implementation?

@c9s
Copy link
Author

c9s commented Sep 28, 2015

@tamagokun

which one do you prefer? I've opened a #phpsgi channel on PHP Taiwan Slack, if you want a new slack account just for PHPSGI I think it also works. IRC also works for me. :)

Uploads should just read http form data from the input stream, right? Or are you thinking of the implementation?

yeah.. it should read form data from the input stream, but I think the implementation might affect the specification while the implementation is experimental. And for SAPI we have $_FILES, not sure if we want to support the $_FILES array. XD

How does rackem handle the file upload mechanism?

@c9s
Copy link
Author

c9s commented Sep 28, 2015

cc @RickySu

@c9s
Copy link
Author

c9s commented Sep 28, 2015

Let me introduce @RickySu, he is working on libuv http server implementation on both HHVM / Zend PHP engines. He is also interested in PHPSGI. :)

@tamagokun
Copy link
Owner

@c9s man, it's been awhile since I was knee-deep in dealing with PHP file uploads, but let me ramble off some things that I may or may not be remembering correctly:

I never did get around to implementing file streaming or chunk encoding, so the parser is assuming that it has the entire http body in string form.

@tamagokun
Copy link
Owner

Another thing I never got around to doing is #21.

When looking into temp files, there were some functions that claimed it would automatically destroy the temp file when the PHP process closed, but it didn't actually work. Most likely the server implementation would have to keep track of the temp files and delete them on close, or just leave them.

I think Rack just leaves uploads and leaves it up to other libraries to deal with them.

@tamagokun
Copy link
Owner

wow. libuv in php would be just amazing.

Slack is good. I'm on slack all the time anyways.

@c9s
Copy link
Author

c9s commented Sep 28, 2015

Hi @tamagokun! Just invited you to the Slack channel.

I think we might have to think about how to handle both $_FILES from SAPI and the input stream well and have a consistent way to simplify our specification. :)

Will check your links and reply you few days later. we have typhoon and project deadlines coming!

@tamagokun
Copy link
Owner

Thanks! Sounds good! Be safe.

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

No branches or pull requests

2 participants