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!


17 Responses to SabreAMF 1.2

  1. 722 shaun 2008-09-14 10:52 am

    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?

  2. 726 Evert 2008-09-14 7:10 pm

    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

  3. 720 shaun 2008-09-15 9:35 am

    Hi Evert,

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

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

    Cheers!

  4. 719 Mike 2008-09-15 12:49 pm

    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.

  5. 718 klucznik 2008-09-15 1:28 pm

    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!!! :]

  6. 717 Evert 2008-09-15 8:40 pm

    Thanks everyone, I will address all these issues soon

  7. 715 Evert 2008-09-16 8:58 pm

    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

  8. 716 Evert 2008-09-16 8:58 pm

    my=by :)

  9. 725 Hodicska Gergely 2008-09-21 11:40 am

    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. ;))

  10. 723 Evert 2008-09-21 5:17 pm

    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

  11. 721 Adam Bryson 2008-09-22 2:50 am

    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.

  12. 724 Wade Arnold 2008-10-03 6:59 pm

    Evert can you fire me an email

  13. 714 Wade Arnold 2008-10-03 8:59 pm

    Evert can you fire me an email

  14. 712 twone 2008-10-14 4:20 am

    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

    thanks

  15. 713 Evert 2008-10-14 1:56 pm

    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.

  16. 727 oscar 2009-01-21 3:01 pm

    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?????

  17. 728 Evert 2009-01-21 3:45 pm

    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



About

My name is Evert, and I've been writing semi-regularly on this blog since 2006.

I'm currently available for contract work.

more info.

Subscribe

Dropbox

Dropbox is a simple cross-platform online backup and sync application. The first 2GB of space is free, and both you and me get an extra 250MB extra space if you sign up through this link.