So im building an application for android and iphone and im almost done so i decided to start testing on a remote server. However when i change the parameters for the remote server I get a 404 error for the gateway.php file. The path is correct and the file present in the server. I followed this method:
- Changed the parameters on the service files to match the server
- Changed the webroot on the amf_config.ini file to /home/myuser/public_html/
- Edited tha MarkersService.as (the file that extends the super class of the services) and added this _serviceControl.endpoint = “http://www.chania***.com/Chania/gateway.php”;
- Uploaded the .swf file
When testing i get the error. If i change the endpoint to my localhost everything works fine. Any help?
So after a lot of researching and testing i found what you have to do to deploy a mobile app which uses php services on a server. As there is no guide on the internet on how exactly to do this im presenting the steps bellow.
on my project these were “webroot=/home/username/public_html/ and zend_path=/home/username/public_html/ZendFramework/library/”. you should also make sure that at the end of the file the following exists
Finaly you will have to find the myservice.as file in your project and after the initialization add the following line and compile
super._serviceControl.endpoint=”http://www.mydomain.com/myproject/gateway.php”
If you follow the above steps your mobile app should be able to get it’s data from a remote server on both testing and deployment.
I hope that i helped some people out especially new developers on flex mobile