Groups

Group Admins
  • Profile Photo
    camille
  • Profile Photo
    Ariel Sommeria-Klein

amfPHP Users

Public Group  |  active 6 months, 1 week ago ago

This forum is not active anymore, please ask your questions on stackoverflow

Only works if $gateway->service() is called

Viewing 1 - 7 of 7 posts
  • Philip

    said

    I’m experiencing a weird situation when making a remoting call from actionscript: unless I call $gateway->service(), nothing will be returned (Charles headers: Content-Length: 0, Content-Type: application/x-amf)

    I set up my gateway in a Codeigniter Controller called Gateway (http://pastie.org/private/loyyisjddnoyqqb5g0hcq). Everything works fine, as long as $gateway->service() is called. Obviously I don’t want to be doing this in a production environment!

    Any help would be appreciated!

    I am using:
    AMFPHP 2.0.1
    PHP 5.3.8
    CodeIgniter 2.1.0

  • Ariel Sommeria-Klein

    said

    I’m not sure I understand what the problem is. You’re supposed to call the service method.
    The code in the basic entry point script in amfphp is

    require_once dirname(__FILE__) . ‘/ClassLoader.php';
    $gateway = Amfphp_Core_HttpRequestGatewayFactory::createGateway();
    $gateway->service();
    $gateway->output();

    so from what I see you’re doing it right.

  • Philip

    said

    Oh, I must have totally misunderstood what the $gateway->service() method does. I thought it outputs the service browser! In that case, how do I hide the service browser?

  • Ariel Sommeria-Klein

    said

    the service browser is in a plugin, though that has changed in the release that came out a couple of days ago, among other reasons because it was confusing people. In your case, delete the plugins/amfphpservicebrowser folder

  • Philip

    said

    Thanks Ariels!
    That is a little confusing having to delete to deactivate a plugin, as it doesn’t play nicely with switching on an ENVIRONMENT constant and deciding whether to use a plugin or not at runtime.

    Do you mind if I ask how it works now in the latest AMFPHP 2.1?

    (Thanks for the brilliant work by the way. I’m very grateful that you’ve successfully breathed new life into this amazing project).

  • Ariel Sommeria-Klein

    said

    point taken. I’m still trying to find a good mechanism for production/development configs, I didn’t like the global switch but I do see it’s advantages.

    in 2.1, the service browser is in the backoffice that now sits next to the Amfphp folder, so if you just deploy the Amfphp folder there is no service browser in it

    your welcome , and thanks for the support :-)

Viewing 1 - 7 of 7 posts
Topic tags: production, Service browser

Warning!

This content
is outdated.

Discover Silex v2,
online website builder.

Sign up for Silex Labs news by email

SilexLabs community Tweets