I recently started doing the Flex in a Week series, but I seem to be having a problem connecting to a data service. I've chosen to use a PHP service and when going through the 'Generate Sample PHP Service' wizard, I enter the MySQL Database information on my server (I've tried one hosted on GoDaddy and another hosted on Media Temple), but I keep getting the following error:
java.io.IOException: Server returned HTTP response code: 405 for URL: http://localhost/TestProject/gateway.php
I have IIS 7 installed locally. PHP 5 is installed. AMF is installed.
Is this because I am try to access a remote SQL server rather than a local one? Is there a way to use a live server?
First, make sure the php page can run properly. If the php page can access the database, you should be fine.
405 errors tend to deal with POST errors.
The file type is not registered in the IIS script map settings (e.g. .html or .htm). IIS only allows HTTP requests of type to GET to unmapped files. HTTP requests of type POST, HEAD, and all others are responded to with a 405 resource not allowed error.
Add a script map for the extension. A script map associates a particular file type with a given script module. The web server runs the module on the given file and sends the output to the browser, instead of sending the file directly to the browser.
North America
Europe, Middle East and Africa
Asia Pacific