Hi!
I am sorry I check all and now there is again about ".....description: "unpack(): Type d: not enough input, need 8, have 0" ".
I will be very glad to get any idea from one of the authors of AMFPHP and Gateway.php class inside it

and other who have any ideas of course.
I am trying to start using AMFPHP. What for? I would like to get powerful engine of flash site - AdminPart. I can make news with Flash and php form, but I want more - to load/unload files etc.
All works fine on local machine Apache 1..+PHP 4...
But I can not even start with test service on remote server of my host company.
www.strel-ka.ru/helloWorld.html - that is the test movie.Input any text and push btn. Movie should get the answer from the server with the same text in the top text field.
CODE in movie is:
import mx.remoting.Service;
import mx.remoting.NetServices;
import mx.services.Log;
import mx.rpc.RelayResponder;
import mx.remoting.PendingCall;
import mx.remoting.RecordSet;
import mx.rpc.ResultEvent;
import mx.rpc.FaultEvent;
import mx.remoting.debug.NetDebug;
NetDebug.initialize();
//myResult = new Object();
var myService:Service=new Service("
http://www.strel-ka.ru/gateway.php/",new Log(),"HelloWorld",null,new RelayResponder(this, "getInfo_Result", "getInfo_Fault"));
//var myService:Service=new Service("
http://localhost/strelka/gateway.php",new Log(),"HelloWorld",null,new RelayResponder(this, "getInfo_Result", "getInfo_Fault"));
function getInfo_Result(re:ResultEvent): Void{
answer.text=re.result
};
function getInfo_Fault (e:ResultEvent):Void {
answer.text = "Description: " + error.description;
}
btn.onRelease=function(){
this.gotoAndStop(2)
var test=txtInput.text
var temp_pc:PendingCall =myService.makeEcho(test)
}
gateway.php (CHMOD 744) is in "www" folder on the server:
<?php
include("./flashservices/app/Gateway.php");
$gateway =new Gateway();
$gateway->setBaseClassPath(realpath("./flashservices/services/")."/");
$gateway->service();
print "OK";
?>
Flashservices folder is in "www" folder.
HelloWorld.php(CHMOD is 744) is in "www/flashservices" folder (and for testing purposes in "www" folder too). HelloWorld.php is:
<?php
class HelloWorld{
function HelloWorld(){
$this->methodTable = array(
"makeEcho" => array(
"description" => "IGOR Echoes the passed argument back to Flash (no need to set the return type)",
"access" => "public", // available values are private, public, remote
"arguments" => array ("arg1")
)
);
}
function makeEcho($messag){
return $messag;
}
}
?>
Additional info. When I use NetCOnnection Debugger in programm FMX 2004 I get:
DebugId: "0"
EventType: "Status"
MovieUrl: "file:///C|/DESIGNLERNINGbckup23.05.2004/DESIGNLERNING/StrelkaSite/BetaStrelkaFolders/ADMINpartSTRELKA/helloWorld.swf"
Protocol: "http"
Source: "Client"
Time: 1110398357186
Date (object #1)
....."Wed Mar 9 22:59:17 GMT+0300 2005"
Status (object #2)
.....code: 2
.....description: "unpack(): Type d: not enough input, need 8, have 0" //this is to my mind the main reason, what does it mean?
.....details: "/home/nashastrelka/www/flashservices/io/AMFInputStream.php"
.....level: "Warning"
.....line: 91
When I use Service Browser in FMX 2004 for getting the description of service "helloWorld" I get "ERROR 404" after trying to connect to remote server. On the other hand the result is positive on the local machine, and I get description.
And last important question for me. All tutorials use NetConnection class. But Macromedia recommends to use Service class as a most powerful. Is it ok for AMFPHP to use Service class? I use it and it works on local machine as you can see.
Thanx in advance. I spent alot of time with this trouble.