Bug->Doc #66763 [Asn->Csd]: always_populate_raw_post_data=0 BC issue with in-built web server
| From: | tyrael@php.net | Date: | Mon, 06 Apr 2015 09:28:29 +0000 |
| Subject: | Bug->Doc #66763 [Asn->Csd]: always_populate_raw_post_data=0 BC issue with in-built web server | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-12108@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66763&edit=1
ID: 66763
Updated by: tyrael@php.net
Reported by: sixd@php.net
Summary: always_populate_raw_post_data=0 BC issue with
in-built web server
-Status: Assigned
+Status: Closed
-Type: Bug
+Type: Documentation Problem
Package: Built-in web server
Operating System: Linux
PHP Version: 5.6Git-2014-02-24 (Git)
Assigned To: tyrael
Block user comment: N
Private report: N
New Comment:
I've updated the docs to make it more explicit when is the error triggered and how to fix this
problem:
http://svn.php.net/viewvc?view=revision&revision=336371
Previous Comments:
------------------------------------------------------------------------
[2014-11-06 12:02:30] tyrael@php.net
I've posted a reply there with some additional clarification(for example that you need both
display_errors and display_startup_errors enabled to have a realistic chance to be affected by the
deprecated message introduced in 5.6 other than having a some additional lines in your php error
log.
------------------------------------------------------------------------
[2014-11-06 08:36:33] matt at piwik dot org
FYI: Bramus! whom I don't know blogged about it here: http://www.bram.us/2014/10/26/php-5-6-automatically-populating-http_raw_post_data-is-deprecated-and-will-be-removed-in-a-future-version/
tl;dr The default value for always_populate_raw_post_data in PHP 5.6 is doing more harm than good.
Perfectly good code will spit out that error whenever it receives a request that has a
(non-application/x-www-form-urlencoded encoded) payload. To fix it, explicitly set the value of
always_populate_raw_post_data to -1 in your php.ini.
------------------------------------------------------------------------
[2014-11-06 05:27:57] matt at piwik dot org
FYI first case of a user confused who did not understand the message and then is asking us for help:
http://forum.piwik.org/read.php?2,121546
------------------------------------------------------------------------
[2014-10-27 12:54:52] tyrael@php.net
I would rephrase that a bit, but I can see how splitting that part into it's own sentence would
be less confusing.
------------------------------------------------------------------------
[2014-10-22 01:33:32] matt at piwik dot org
Thanks for the reply!
> when your code(containing your ini_set call) is executed, the population of this variable
> already happened, so ini_set won't work for it.
that's a bummer but I understand that it's not possible.
> but I think I already mentioned this, and also explained why we can't only throw the
> deprecated notice when the variable is actually accessed.
I am still confused which I think shows something can be improved. The error message is:
"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."
Maybe you could change it to: "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 if you use
$HTTP_RAW_POST_DATA then change it to use the php://input stream instead."
This will certainly help some like me understand the meaning of the message. Thank you!
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=66763
--
Edit this bug report at https://bugs.php.net/bug.php?id=66763&edit=1