subscribe

SabreAMF 1.2

Just posted a new SabreAMF version to googlecode, containing mostly bugfixes and a few enhancements. (download). Updating is highly recommended, this release was supposed to get out a bit earlier, but I wanted to test it in a live environment for a bit first.

Changes:

  • We're now throwing an SabreAMF_InvalidAMFException instead of a generic Exception in the event on a corrupt/incorrect AMF request. (contribution by: Asbjørn Sloth Tønnesen.)
  • Fixed a bug in the standard Recordset object (identified by 'datafirm').
  • Fixed string reference problem occuring with multiple AMF3 bodies, identified by sylvinus and fixed with help from the PyAMF team. Thanks guys!
  • Fixed a bug in AMF3 integer encoding. For some small ranges you would end up with the wrong integers in PHP. The integer decoder is also a lot faster now (Fixed by Kevin Martin).
  • SabreAMF_Server now allows alternative inputs than php://input (patch by Asbjørn).

Thanks guys!

Web mentions

Comments

  • shaun

    shaun

    Awesome! Thanks for the update. I really dig SabreAMF - it integrates very nicely with Zend Framework.

    One small thing (and it was the same with the previous version of SabreAMF):

    The authentication hook in the CallbackServer's exec method, on line 126, throws this Fatal Error:

    "Cannot use object of type SabreAMF_AMF3_Wrapper as array"

    To fix it I changed it to this:

    $header_data = $header['data']->getData()->getAMFData();
    $this->authenticate( $header_data['userid'], $header_data['password'] );

    Something to do with AMF0 vs AMF3 perhaps?
  • Evert

    Evert

    Hi Shaun,

    Thats a weird one, I did not know AMF0-style authentication could occur in AMF3 requests..

    I'll be working on refactoring some of the decoding in SabreAMF to better separate AMF0, AMF3 and AMF3+Flex messaging, which should fix most of these issues.

    I'm going to check out if I can find a better fix for this though.. Would you mind opening a ticket and attaching a charles session?

    http://code.google.com/p/sabreamf/issues/list

    Evert
  • shaun

    shaun

    Hi Evert,

    Cool, I've submitted a ticket (with Charles session attached):

    http://code.google.com/p/sabreamf/issues/detail?id=8

    Cheers!
  • Mike

    Mike

    Great new release! I too am using it with ZF (and curious how their announced AMF implementation will compare to SabreAMF.

    BTW, what's the hold up with http://code.google.com/p/sabreamf/issues/detail?id=6 ? Without that patch, SabreAMF breaks for me.
  • klucznik

    klucznik

    Hi, I found a typo in SabreAMF_RecordSet class, "ServerInfo" should be "serverInfo", it's not completely working without this fix. PS. SabreAMF is great!!! :]
  • Evert

    Evert

    Thanks everyone, I will address all these issues soon
  • Evert

    Evert

    Hi Guys,

    I fixed the issue found my klucznik and issue #6,

    Hopefully you guys can test the latest SVN version and let me know if this works out for you.

    Evert
  • Evert

    Evert

    my=by :)
  • Hodicska Gergely

    Hodicska Gergely

    Few days ago Zend announced partnership with Adobe and ZF will get AMF support. I would have two questions:

    Is there any cooperation between the two implementation?

    Has SabreAMF any special feature over AmfPHP? (I guess the source code is more modern. ;))
  • Evert

    Evert

    Hey,

    No there's no cooperation.. haven't heard from them or anything.. =)

    SabreAMF probably has less features than AMFPHP, some details here: http://code.google.com/p/sabreamf/wiki/FAQ
  • Adam Bryson

    Adam Bryson

    Just wanted to say that I think it is cool that you give credit to the people who actually did the work on the fixes. It's nice to see people get the recognition for their efforts.
  • Wade Arnold

    Wade Arnold

    Evert can you fire me an email
  • Wade Arnold

    Wade Arnold

    Evert can you fire me an email
  • twone

    twone

    bug:NetConnection.Call.BadVersion

    function myCallBack($service, $method, $data) {
    $servicePath = './Services/' . $service . '.inc';
    require_once $servicePath;
    $instance = new $service;
    return call_user_func_array(array($instance, $method),$data);
    }

    HelloWorld.inc
    class HelloWorld
    {
    public function say($sMessage)
    {
    return 'You said: ' . $sMessage;
    }
    }
    ?>
    thanks
  • Evert

    Evert

    A 'BadVersion' exception means that there's a problem with your code somewhere and most likely means PHP threw an error. I can't see it in the example you sent me, but you can try 2 things:

    1) open the gateway url straight in the browser. are you getting errors?
    2) run it through a debugging proxy.

    If you still have issues after that, please go to the mailing list as this blog is not the appropriate place to ask questions.
  • oscar

    oscar

    when I open on browser the page gateway.php then it launch an error:

    Fatal error: Uncaught exception 'SabreAMF_InvalidAMFException' with message 'No valid AMF request received' in C:\wamp\www\necro4\agenzia\flex\SabreAMF\Server.php:231 Stack trace: #0 C:\wamp\www\necro4\agenzia\flex\SabreAMF\Server.php(76): SabreAMF_Server->readInput() #1 C:\wamp\www\necro4\agenzia\flex\SabreAMF\flex-gateway\DataServicesServer.php(37): SabreAMF_Server->__construct() #2 C:\wamp\www\necro4\agenzia\flex\SabreAMF\gateway.php(25): Flex_DataServicesServer->__construct() #3 {main} thrown in C:\wamp\www\necro4\agenzia\flex\SabreAMF\Server.php on line 231

    it's problem with inputStream, why?????
  • Evert

    Evert

    Hi Oscar,

    That is actually expected. The gateway url is not intended to be opened straight from a browser, only from within flash using the remoting components.

    Hope this helps,
    Evert