HTTP_RAW_POST_DATA and php 5.2.2

งมมาตั้งนานว่าทำไม hosting ของบริษัท ที่ไปเช่า verio อยู่ถึงใช้ HTTP_RAW_POST_DATA ไม่ได้
กว่าจะไปเจอ http://bugs.php.net/bug.php?id=41293  สรุปว่า php version 5.2.2 มี bug ทำให้ไม่สามารถใช้ $HTTP_RAW_POST_DATA ได้ ถึงแม้จะไปเปิด config

; Always populate the $HTTP_RAW_POST_DATA variable.
always_populate_raw_post_data = On

แล้วก็ตาม

วิธีแก้ทำได้โดย

if (phpversion()=="5.2.2") $GLOBALS['HTTP_RAW_POST_DATA'] =
file_get_contents("php://input");

จบข่าว