Amfphp: Fix for PHP 5.2.2 compatibility issue

Posted on Sunday 13 May 2007

The current versions of amfphp do not support PHP 5.2.2 because of a minor but annoying change in that build: $HTTP_RAW_POST_DATA is not populated. I have fixed it in the 1.2 branch, available on SourceForge, and in the 1.9 branch, available here.

You can also patch it yourself by doing the following. Find either core/amf/app/Gateway.php (1.9) or amf-core/amf/app/Gateway.php. Before line 140 or so, where you see if(isset($GLOBALS['HTTP_RAW_POST_DATA']) && ...), add the following:


if (!isset($GLOBALS['HTTP_RAW_POST_DATA'])){
    $GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents('php://input');
}
 

Sorry about the inconvenience.


WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 145)]
SELECT * FROM wp_comments WHERE comment_post_ID = '248' AND comment_approved = '1' ORDER BY comment_date

No comments have been added to this post yet.

Leave a comment




Your e-mail address is never displayed. If you run into issues with SpamKarma blocking you, email me at $patrick->5etdemi(com)


RSS feed for comments on this post | TrackBack URI