2 Replies Latest reply on Oct 28, 2011 7:48 PM by Charles Hamlyn

    How do you connect Flash Builder to a NON-LOCAL PHP Server?

    Charles Hamlyn Level 1

      Is it possible to connect Flash Builder 4 to a non-local PHP Server?  In my case, I want to connect to a PHP server on my web-host (similar to GoDaddy).

       

      This seems like a really stupid question, but every single tutorial or forum post I've Googled in the past 2 hours talk about how easy this is but all of them use "...localhost..." in the Root URL and I can't find anywhere in Flash Builder to enter FTP style credientals!

       

      I do not want to turn my PC into a PHP/SQL/IIS server.  I want to be able to do all of my work remotely as I do with Dreamweaver. 

       

      I've been trying to do this one simple thing for the better part of 2 days and can't believe how under-documented this feature is.

       

      Please please please help!

       

      Thanks

      Charles

        • 1. Re: How do you connect Flash Builder to a NON-LOCAL PHP Server?
          Jason Woodcock

          Upload your services to a directory on your host, upload your remoting app (Zend AMF etc) and configure it, then change the end point in your code to the gateway.php on your server:

           

           

          yourService.endpoint = "http://www.yoururl.com/pathway-to-your/gateway.php";

          For instance, one of mine are:

           

           

          protected function updateButton_Click(event:MouseEvent):void

                      {

                          // TODO Auto-generated method stub

                          support_Requests.ticket_id = supportGrid.selectedItem.ticket_id;

                          support_Requests.hub = supportGrid.selectedItem.hub;

                          support_Requests.username = supportGrid.selectedItem.username;

                          support_Requests.contactNumber = supportGrid.selectedItem.contactNumber;

                          support_Requests.email = supportGrid.selectedItem.email;

                          support_Requests.request = supportGrid.selectedItem.request;

                          support_Requests.status = statusButtons.selectedValue.toString();

                          support_Requests.note = noteUpdate.text;

                         

                          supportRequestsService.endpoint = "http://www.not-telling-you-my-url/app-resources/gateway.php";

                          updateSupport_RequestsResult.token = supportRequestsService.updateSupport_Requests(support_Requests);

                          currentState='Home';

                      }

          1 person found this helpful
          • 2. Re: How do you connect Flash Builder to a NON-LOCAL PHP Server?
            Charles Hamlyn Level 1

            Thanks for the help Jason.

             

            I think I need to step back a little bit and explain my situation better.

             

            I'm trying to connect my Project to a MySQL database via AMFPHP 2.0 via the data connection wizard. Both the database and PHP are hosted on a remote server. 

             

            One of the first steps is to configure your server, you can get to the screen by going to Project > Properties > Choose Flex Server on the left-hand menu. 

            Application server type = PHP

            Now it wants a Web root URL (local files I assume because of the browse button)

            and Root URL (and the example is just "http://localhost")

             

            I've tried entering both a local and relative to web server Web Root and a handful of variations on the Root URL to get it to look at my site.

             

            Whenever I click Validate Configuration it errors with: "Cannot access the web server. The server may not be r...g, or the web root folder or root URL may be invalid."

             

            I can actually move past this screen, but trying to use the data connect wizard gives me errors about not having a gateway.php in the bin-debug folder, but it's there, both locally and on the remote.