Bug #67991 [Com]: always_populate_raw_post_data deprecation warning buggy

From: Date: Wed, 10 Sep 2014 07:35:10 +0000
Subject: Bug #67991 [Com]: always_populate_raw_post_data deprecation warning buggy
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187491@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
 Comment by:         felix dot hassert+phpbugs at sevenval dot com
 Reported by:        felix dot hassert+phpbugs at sevenval dot com
 Summary:            always_populate_raw_post_data deprecation warning
                     buggy
 Status:             Open
 Type:               Bug
 Package:            *Web Server problem
 Operating System:   Debian Linux
 PHP Version:        5.6.0
 Block user comment: N
 Private report:     N

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[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


Thread (2 messages)

« previous php.bugs (#187491) next »