Doc #67991 [Opn->Csd]: always_populate_raw_post_data deprecation warning buggy
| From: | salathe@php.net | Date: | Sun, 26 Oct 2014 16:29:59 +0000 |
| Subject: | Doc #67991 [Opn->Csd]: always_populate_raw_post_data deprecation warning buggy | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-11589@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67991&edit=1
ID: 67991
Updated by: salathe@php.net
Reported by: felix dot hassert+phpbugs at sevenval dot com
Summary: always_populate_raw_post_data deprecation warning
buggy
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: *Web Server problem
Operating System: Debian Linux
PHP Version: 5.6.0
-Assigned To:
+Assigned To: salathe
Block user comment: N
Private report: N
New Comment:
The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2014-10-26 16:29:42] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=335142
Log: auto_populate_raw_post_data generates E_DEPRECATED when *used* (doc bug #67991)
------------------------------------------------------------------------
[2014-09-10 10:56:56] mike@php.net
It should read
"... will now generate an E_DEPRECATED error when used" instead of
"... will now generate an E_DEPRECATED error when enabled"
The "enabled" was taken from UPGRADING, sorry.
------------------------------------------------------------------------
[2014-09-10 07:35:10] felix dot hassert+phpbugs at sevenval dot com
This seems to be related to https://wiki.php.net/rfc/slim_post_data (found
via #66763).
If I read the slim_post_data proposal correctly, I do understand, why this happens. In my case, no
content-type is present. Thus the "always" in aprpd is different when using 0 or -1.
However, the 5.6 migration docs was misleading me, because I did not _enable_ the flag.
------------------------------------------------------------------------
[2014-09-10 07:19:13] felix dot hassert+phpbugs at sevenval dot com
Description:
------------
http://www.php.net/manual/en/migration56.deprecated.php
states, that a warning is triggered, if always_populate_raw_post_data is _enabled_. In my PHP.ini it
is turned off:
always_populate_raw_post_data = Off
When I perform an _empty_ post request on any PHP file (even an empty one), the deprecation warning
occurs in my logs:
PHP Deprecated: 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 Unknown on line 0
PHP version:
PHP 5.6.0 (cli) (built: Sep 3 2014 16:15:07)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
Test script:
---------------
cd whereever-your-docroot-is/
touch test.php
curl -X POST 'http://127.0.0.1:8080/test.php'
Expected result:
----------------
no warning
Actual result:
--------------
log message:
PHP Deprecated: 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 Unknown on line 0
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67991&edit=1