Skip to content

Empty php://input on post request. #138

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

Closed
dskozin opened this issue Sep 13, 2018 · 7 comments
Closed

Empty php://input on post request. #138

dskozin opened this issue Sep 13, 2018 · 7 comments
Labels

Comments

@dskozin
Copy link

dskozin commented Sep 13, 2018

Hello!
I'm trying to use php-pm, but have empty php://input on post request.
This happens when run in docker and when run without docker.
Can't understand why.

I thought this may because nginx, but i just proxy request from nginx to embeded server, and it's work properly.

Somebody can help me?

May be similar to #136

@andig
Copy link
Contributor

andig commented Sep 13, 2018 via email

@andig
Copy link
Contributor

andig commented Sep 13, 2018

Actually, if you're using a request/response framework- why should php://input even work at all? IMHO that is a wrong expectation when working with these frameworks. All request properties are exposed via the respective request abstractions.

@dskozin
Copy link
Author

dskozin commented Sep 17, 2018

If request is large there is more useful to use it as stream.
Php://input is a normal way to get post data.

@andig
Copy link
Contributor

andig commented Sep 17, 2018

This is supported e.g. By the Symfony API, see https://api.symfony.com/4.1/Symfony/Component/HttpFoundation/Request.html#method_getContent.

As far as ppm is concerned you‘ll not be able to use the php built-in streams.

@andig
Copy link
Contributor

andig commented Sep 25, 2018

Ping @dskozin can we close this issue?

@dskozin
Copy link
Author

dskozin commented Sep 26, 2018

Ping @dskozin can we close this issue?

Yes. I thinked php://input is normal way for any cases. I was wrong.

@andig
Copy link
Contributor

andig commented Sep 26, 2018

You‘re welcome

@andig andig closed this as completed Sep 26, 2018
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

2 participants