Details
Description
We unfortunately have a CiviCRM instance running on PHP version 5.2.2 and cannot upgrade at the current time to a newer version.
There is a bug in PHP 5.2.2 which prevents HTTP_RAW_POST_DATA from being set even when always_populate_raw_post_data On is set
http://bugs.php.net/bug.php?id=41293
I've been using the suggested fix in the php bug (which is to detect the buggy version and populate the variable manually) however this gets rewritten after each CiviCRM update. Can it please be merged into the release.
civicrm/extern/soap.php
Before session_start() add the following (This fix will only be triggered for PHP version 5.2.2 an nothing else)
if (phpversion()=="5.2.2" && !isset($GLOBALS['HTTP_RAW_POST_DATA']) )
{
$GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents('php://input');
}