View Full Version : AMFphp Error opening URL "http://localhost/Hello/gateway.php"
prune
08-03-2005, 10:49 PM
I have used the example from the wiki on amfphp and I keep getting this error. What tools can I use to see what is wrong?
http://localhost/flashservices/browser/ function works with php5 and apache2.
gateway.php is:
//default gateway
include "app/Gateway.php";
$gateway = new Gateway();
$gateway->setBaseClassPath(realpath("../services/") . "/");
$gateway->service();
AS:
import mx.remoting.*;
import mx.rpc.*;
import mx.remoting.debug.NetDebug;
var gatewayUrl:String = "http://localhost/flashservices/gateway.php"
NetDebug.initialize();
var _service:Service = new Service(gatewayUrl, null, 'HelloWorld', null , null);
var pc:PendingCall = _service.say("Hello world!");
pc.responder = new RelayResponder(this, "handleResult", "handleError");
function handleResult(re:ResultEvent)
{
trace('The result is: ' + re.result);
}
function handleError(fe:FaultEvent)
{
trace('There has been an error');
}
in NetConnection Debugger:
.....code: "NetConnection.Call.Failed"
.....description: "HTTP: Status 500"
.....details: "http://localhost/flashservices/gateway.php"
.....level: "error"
thanks
voodooguru
08-04-2005, 07:30 PM
i get this same exact error...
not on this tutorial but with whatever i do...
for some reason flash can never open gateway.php, no matter where i put it.
error 500 is "Internal Server Error" or something like that if you look it up...
ive been trying to get this to work for two weeks now...
i have no idea what i'm doing wrong.
i am using FLash MX 2004 Professional
with remoting components installed.
I am using PHP 5.0.4 (are there issues with 5.0.4 and amfphp?)
i can get some of the tutorials to work... the ones that you use to test if its installed properly... and it is, according to the tests.
details:
I am trying to build a small flash application that takes a parameter (searchitem) and passes it to a php script, which then query's a sql server using a ADOdb connection... amfphp is supposed to let flash recieve objects right? so the php script should be able to return a recordset object, which flash can read and set as the dataprovider for a datagrid...
my file directory is C:\Inetpub\wwwroot\Dashboard\gateway.php
my flashservices directory is C:\Inetpub\wwwroot\flashservices
my gateway.php references \app\Gateway.php correctly...
my .php file that executes my query is in C:\Inetpub\wwwroot\Dashboard\services
Whenever I test my movie the NetConnection Debugger has the error:
Error opening URL "http://localhost:80/Dashboard/gateway.php"
i have tried all sorts of port numbers...no port number... nothing works?
the actual error in the debugger is:
.....code: "NetConnection.Call.Failed"
.....description: "HTTP: Status 500"
.....details: "http://localhost:80/Dashboard/gateway.php"
.....level: "error"
so i am lost.
plz help me.
thanks!
I'm having the same problem. Did anyone ever figure anything out?
b
ozdemit
09-27-2005, 02:55 PM
Hey guys, I do not know but I could solve this problem like that put your PHP classes in the folder "services" and call it again.. it seems problem is this url http://localhost/Hello/gateway.php, u do not need a gateway in hello folder
Not sure what your trying to do sorry or what amfphp does will search it out right after this, though if it only suports objects between php and flash its still not what Im looking for.
Any way, unless your view the site from the computer your host (I guss you would be) and the server is a win32 platform localhost will only return an error. Try changing this to a WAN, or External IP, and even just the lan IP of the PC.
Im also not sure what software your using ie, what httpe server and php engine (ie apache and zean) these can help to solve your problem.
Foot note: When viewing your http site using localhost can become a problem if your HOST file dosn't contain this, just cheak it (as maleware or spyware can distroy your entrys and replace them making localhost null on return) look under "[windows installed path]\system32\drivers\etc\" for the file HOSTS drag drop it in too notepad and past this line at the most botten IF you don't see something like it all ready "127.0.0.1 localhost", or a faster way is not to use local host at all and just 127.0.0.1 meh powers in your hands :P!!
klangdon
10-05-2005, 05:10 AM
Try just accessing the amfgateway url through your browser. Assuming you have "Friendly HTTP Error Messages" turned off you should see a more detail error there.
Onanga
11-04-2005, 08:12 PM
Hello!
Had also the same kind of trouble since it wasn't finding the gateway url.
I made a post on flash-forum (http://flash-forum.onanga.com/viewtopic.php?t=1), but that's in French...:rolleyes:
Anyways, the problem was caused in my case by the proxy. Amfphp did not seem to like that. I removed my proxy ip and bang, it worked!!!
Good luck to you all
Vince
GaiusCoffey
03-22-2007, 06:58 PM
Just had a rough time with the same problem, until I discovered an error in my PHP. It seems as if when AMFPHP encounters a crash, it returns a url not found error rather than error output.
I guess that's why they have the browser test page...
baskar
03-23-2007, 12:44 PM
hi
can i call a c++ function using its class object from flash.
flash remoting with c++ is possible?
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.