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

Automatically populating $HTTP_RAW_POST_DATA is deprecated #61

Closed
Spomky opened this issue Aug 19, 2016 · 3 comments
Closed

Automatically populating $HTTP_RAW_POST_DATA is deprecated #61

Spomky opened this issue Aug 19, 2016 · 3 comments

Comments

@Spomky
Copy link

Spomky commented Aug 19, 2016

Hi,

I have the following error when I run tests of this extension.

      │ --- Failed steps:
      │ 
      │     And the response should contain json: # features/send_raw.feature:16
      │       Can not convert actual to json:
      │       <br />
      │       <b>Deprecated</b>:  Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in <b>Unknown</b> on line <b>0</b><br />
      │       <br />
      │       <b>Warning</b>:  Cannot modify header information - headers already sent in <b>Unknown</b> on line <b>0</b><br />
      │       {"warning":"Do not expose this service in production : it is intrinsically unsafe","method":"POST","name":"name","pass":"pass","headers":{"user-agent":["GuzzleHttp\/6.2.1 curl\/7.22.0 PHP\/5.6.5"],"host":["localhost:8080"],"content-type":["application\/json"],"content-length":["35"],"x-php-ob-level":[1]},"query":[]} (Assert\InvalidArgumentException)
@stof
Copy link
Member

stof commented Aug 19, 2016

The extension does not rely on the deprecation feature. you can turn it off in your php.ini (there is no way to avoid the deprecation warning if the feature is turned on, even though you never read $HTTP_RAW_POST_DATA, as the warning is triggered very early in the request processing)

@stof
Copy link
Member

stof commented Aug 19, 2016

and we cannot change the ini setting ourselves either, as it would be too late (the processing of the input request happens before calling the userland code)

@Spomky
Copy link
Author

Spomky commented Aug 20, 2016

OK thanks.
In fact it works fine on my production server but not on the travis-ci platform.
I will investigate according to your comments.

@Spomky Spomky closed this as completed Aug 20, 2016
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