After upgrading php to version 5.2.2 amfPHP or cakeamfphp stopped working!
Thankfully i found a quick fix on sourceforge
You only need to add this code at the top of gateway.php
if (!isset($HTTP_RAW_POST_DATA)){
$HTTP_RAW_POST_DATA = file_get_contents('php://input');
}