5 Replies Latest reply on Mar 28, 2011 7:23 AM by zurick2000

    Must Flex develop a PHP app locally first?

    DachFlach Level 1

      When developing an application in Flash Builder 4 that uses PHP/MySQL ( Zend ) ..  must it first be developed locally - on a local server ( Xamp,Wamp, etc..) before being used to access a remote server ( php/mysql ) ?

       

      The initial setup will not accept any Remote Parameters.

      What should the following be ( I realize they will be slightly different for each linux server:

      Web Root:

      Root URL:

       

      I get the following errors:

      1/ Cannot access the web server. The server may not be running, or the web root folder or root URL may be invalid.

      2/ The selected web root folder does not exist.

      I know the server is running.

       

      I have tried numerous configurations and explored many threads on here and see a lot of unanswered questions like this.

      I have also seen examples that are outdated and the screen shots do not look like Flash Builder 4

       

      Any links to current examples or a direct answer, would be great!

        • 1. Re: Must Flex develop a PHP app locally first?
          zurick2

          Did you ever find the answer to this? I have similarly been frustrated by the lack of current, easy-to-understand directions. There are great tutorials and movies for setting up the local server (which I've done) but the obvious next step is to connect to remote servers and the info on how to do so is curiously thin and confusing. Thanks for any help.

          • 2. Re: Must Flex develop a PHP app locally first?
            pauland Level 4

            How hard can it be guys?

             

            You develop locally so that FB can access the local test web server files.

             

            To deploy to the remote server you change the web address to be that of your remote server and you transfer using an FTP program the local files to the remote server. If you have a database you need to export that to your remote server too.

             

            You could develop on a remote server but you'd need to look after all the php/whatever stuff yourself.

             

            I don't generally use Flex to build my remote PHP code and it's not an issue for me either way.

            • 3. Re: Must Flex develop a PHP app locally first?
              zurick2 Level 1

              Thanks for your reply pauland. I appreciate that this isn't an issue for you but a quick search will show you that it is an issue for others. If you have any direct help for connecting Flash Builder to a remote database I will thank you in advance. It does seem like this should be an easy thing to do (at least on par with setting it up locally) but I think specific steps would be more helpful.

              • 4. Re: Must Flex develop a PHP app locally first?
                pauland Level 4

                Flash builder doesn't connect to a local or remote databases. The PHP code generation builds PHP code that interacts with a database local to that PHP code.

                 

                With your local server, you have FB create the PHP code and your flex application accesses the PHP via your local server. There is no concept of flex accessing a database directly, only via the generated PHP code.

                 

                [edit: in terms of specific steps.

                 

                1) Use FB to generate your PHP code and create your local MySQL database.

                 

                2) Test Using your local server.

                 

                3)When done, amend your flex project to use the correct URL for your remote server. Export the local MySQL database and transfer it to the remote server.

                Transfer PHP code to remote server, test PHP code against remote server, test flex against remote server.

                 

                Unfortunately I think the real problem is understanding all the individual bits - you have three seperate technologies at work.

                • 5. Re: Must Flex develop a PHP app locally first?
                  zurick2000

                  Thanks for your time pauland. I appreciate you editing your comment and outlining the specific steps. You've restored my faith in forums.

                   

                  I do think you are right in that there are 3 separate technologies working together and it's hard for someone like me to understand how they work together. That would be a great overview video for beginners.

                   

                  Thanks again and take care.