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

amfPHP Users

Public Group  |  active 7 months, 3 weeks 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


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


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

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

  • Philip


    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


    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


    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


    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

Upcoming Events / Événements à venir

  1. Atelier Silex #1 Hello World à Silicon Banlieue

    2 February @ 13:30 - 17:30
  2. Atelier Silex #2 Hello World à Silicon Banlieue

    5 February @ 13:30 - 17:30
  3. Atelier Vim #6 : Vive Vim !

    16 February @ 19:00 - 21:00
  4. Silex Labs décrypte Javascript en mode Dojo

    19 February @ 19:00 - 21:00
  5. Atelier d’initiation à Git : Push toi de là que je m’y merge !!

    24 February @ 19:00 - 21:00

Sign up for Silex Labs newsletter

Follow Silex Labs on Twitter

Silex Labs community Tweets

Facebook page

Enter your email address to subscribe to this blog and receive notifications of new posts by email.