View Full Version : Include errors with AMFPHP

03-25-2003, 10:04 PM
Hi everyone.

Like other here I am keen to get the hang of Flassh remoting using PHP. It looks great.

I've had my first stab at Jesse's tutorial tonight. The explanation is very clear but I can't get the gateway.php file set up to include the other .php files.

I've tried relative addresses, absolute addresses for all the files that need including but keep getting the same error message.

Have any of you had this problem? Any ideas on how to correct it?


03-25-2003, 10:43 PM
What error message are you getting exactly?

03-25-2003, 11:06 PM
Hi Jesse

I'm using Windows2000, with IIS5.0, PHP4 and the latest flash remoting components from macromedia.

I've commented out:
//if(!defined("AMFPHP_INCLUDE_PATH")) {

and changed




in an attempt to get the simple relative address to work.

The error message is: Fatal error: Failed opening required '../io/AMFInputStream.php' (include_path='.;c:\php\includes') in c:\inetpub\wwwroot\flashservices\app\gateway.php on line 27

I've moved the file around and tried different addresses with the same error.

What I don't understand is - the relative address from simple_gateway.php to include gateway.php works fine.
include "../flashservices/app/gateway.php";

I've had success by copying all the flashservices files into the same directory as gateway.php and using

require_once("Executive.php"); etc as the address.

Any ideas?


03-25-2003, 11:14 PM
The include methods have changed since 0.5beta. I set them up yesterday and experienced the same problems. You have to use the "define" command in the gateway which you call the other gateway from to set the path... ahh it's on my laptop which I haven't got handy at the moment but it goes something like this:

include "flashservices/app/Gateway.php";

$gateway = new Gateway();
The anonying thing about these sorts of setups is they are system specific... but that's how I got it working. By defining the include path in my gateway implimentaiton. Note that my tutorial needs updating to encompass there new features. It will be remade by early next week, once I've had a chance to learn more about the changes.

03-25-2003, 11:16 PM
Also see "example 3" in the README which ships with the package

03-25-2003, 11:22 PM
Sorry if I wasn't clear.

I do not have a problem with the 'include' in the simple_gateway.php

It is with the 'include' statements in the gateway.php form AMFPHP implementation.