12 Replies Latest reply on Oct 25, 2012 5:52 AM by datastride

    remote website access to local Server data

    AussieMT

      I have been asked to help a charity organisation with the following:

      As it is currently setup:

      Organisation website is managed by site manager in Perth (Australia) and hosted on server in Perth.

      Website access is controlled by username and password.

      User logs onto website, where password is controlled/changed/reset etc

       

      Personal contact details are held on a Filemaker Server Advanced 11 on Windows Server 2008, located in Canberra (Australia). This database is used internally within the organisation for membership and accreditation recording, and data is managed by organisation staff. There is currently no external access to the database.

       

      What they want:

      The hope is for the member to maintain their contact details etc currently held on Canberra FM11.

       

      Member has logged into Perth website, so now organisation wants to provide a 'details' page with current data from Canberra FM11.

      The hope is that the members (some 3000) do not need to reenter username and password, or need entering as individual users on FM11.

       

      I have searched, but so far have not found example of this type of remote data connections etc... or am I missing something basic?

      Appreciate all assistance and referals....

        • 1. Re: remote website access to local Server data
          taylorsharpe

          How are you managing security?  Are you using Active Directory on the Windows Server 2008 to authenticate members logging into FileMaker?  If so, just use the same Active Directory.  Have the Perth website point authentication to the Canberra Server. Assuming you have a good enough internet connection speed, that should not be a problem.  I assuming you are using some type of PHP web site.  But the same works too for Instant Web Publishing.  You can also use FileMaker Security to authenticate, but I imagine you would not be asking this question if you were using FileMaker Security.  If so, then nothing changes.  Why not just have the Perth site redirect to the Canberra site when one needs to log in?  Just an idea. 

          • 2. Re: remote website access to local Server data
            AussieMT

            Thanks for the reply.

            I 'spose what I am looking for is a website(anywhere) where once user has logged in, they can update their details, coming from a FMPro database held somewhere else to the website.

            In my case, the website is using PHP, and no idea how they are managing the usernames and passwords, but once logged in, can identify individual user easily to identify the matching Filemaker data. What I have been looking for is an example.

            The PHP books and PHP help etc, do not seem to cover geographically separated servers and databases so all hints greatfully accepted.

            • 3. Re: remote website access to local Server data
              datastride

              PHP knows where to find a particular FileMaker web site in the same way a remote user of FileMaker Pro does: by IP address.

               

              PHP doesn't care where the FileMaker server that is associated with a particular IP address is located -- across the room or across the world.

               

              If you have a book that deal with the FileMaker API for PHP, you might want to have a look at the first portion of any of these books for some code that looks something like this:

               

              // construct the object to be used when connecting to the FileMaker database

              $hostname = '74.126.80.240';    //  or $hostname = 'www.myserver.com' -- the IP address of your FileMaker server machine

              $database = 'FM_Sample';        //  the name of your FileMaker database

              $username = 'Web_User';         //  some user you have defined in your FileMaker database

              $password = 'charlie7oxbow';    //  your user's password for accessing the FileMaker database

              $db = new FileMaker( $database, $hostname, $username, $password );

               

              You would then use the variable $db in whatever further PHP code you wrote that accesses the database.

               

              HTH!

              • 4. Re: remote website access to local Server data
                AussieMT

                Thanks Morgan, someting at the beginning that I missed....

                 

                I understand that the only port I need open, is for HTTP (in this case port 16080), hence

                $hostname = '74.126.80.240:16080'

                and the PHP site will use this?

                 

                Michael T

                • 5. Re: remote website access to local Server data
                  datastride

                  Michael,

                   

                  I don't believe you need to specify the port number, as the API will connect to the correct service ("listener") on your FileMaker server machine. (I believe PHP talks to the server on the same port (5003) as FileMaker Pro.)

                   

                  Here's a link to a great diagram from the folks at SixFriedRice that I always keep handy:

                   

                       http://sixfriedrice.com/wp/filemaker-firewall/

                   

                  And here's the latest on port usage from FileMaker, Inc.:

                   

                       http://help.filemaker.com/app/answers/detail/a_id/6427/~/filemaker-server-and-filemaker-server-advanced-port-numbers

                   

                  -- Morgan

                  • 6. Re: remote website access to local Server data
                    CarlSchwarz

                    Since you are on Filemaker Server version 11 you can use the "Filemaker PHP Site Assistant" to build that website for you.  It's an easy turnkey thing to create a website like you are suggesting with that tool.

                    • 7. Re: remote website access to local Server data
                      datastride

                      Michael,

                       

                      Personally, I only tried using the Site Assistant once ... That was enough for me!

                       

                      The PHP Site Assistant is, as Carl correctly suggests, an easy way to get an initial site up and running, but it is a real challenge to modify the code to add features not built into the site assistant. I think there's a reason FileMaker, Inc. dropped this tool from FM 12.

                       

                      Even if you have to struggle for a bit to get your first attempt at PHP code working, in the end it will be well worth it, as you will understand what every line of code is doing. And your code will be 1 percent of the size of that generated by the site assistant.

                       

                      Get the book "Web Publishing with PHP and FileMaker 9" by Jonathan Stark. (Things have only changed a little since version 9, so the book is stil la great place to start.) I have purchased all of the books available on this topic, and I believe Jonathan's to be the easiest to read and the simplest to follow. You can literally copy code out of the book to get something up and running.

                       

                      Good luck!

                       

                      -- Morgan

                      • 8. Re: remote website access to local Server data
                        CarlSchwarz

                        I know I'm an "outcast" here but I found that hacking up the PHP site assistant code worked well for me.  I had some custom sites working nicely in a few hours.  From what I've read on these forums though I'm about the only person to have that experience.

                        I've also left some sites "as is" because prettying them up isn't necessary and the site assistant basically spat out what I wanted.

                        I'm probably the only one that shed a little tear when the PHP site assistant was taken away however...

                        • 9. Re: remote website access to local Server data
                          datastride

                          Maybe not so much an "outcast" ... as an "iconoclast".    (And that's a good thing!  ;-)

                          • 10. Re: remote website access to local Server data
                            CarlSchwarz

                            I learnt a new word.  And something new about myself.

                            You made my day!

                            I'm not sure I'm comfortable having the title of "Carl the destroyer" however...

                             

                            Thanks for the lol's

                            • 11. Re: remote website access to local Server data
                              AussieMT

                              Outcasts or not, thanks for your involvement in helping me solve this puzzle.

                              We have tried the Site Assistant, and yes it creates a site, but will not let us retain the original login etc on the association website.

                              I am trying linking the association website, where user has already logged in, to Filemaker, where PHP runs a script, placing the username in a field, and performing a find to obtain the user info. Display this via php code on the website and offer a SUBMIT button so that if user wants to they can write the data back to filemaker record ... makes sense, but now just have to get it to function.

                              I am using Stark's book, so hopefully someting will start to gell soon!.

                              Also, any setup required with IIS v7, or is that just a real big can of worms and needs a MS IIS Certified Techo?

                              Michael T

                              • 12. Re: remote website access to local Server data
                                datastride

                                I just set up yet another Windows 2008 R2 server with IIS 7 and FMSA 12. Basically, I didn't have to do anything excpt ensure IIS 7 was installed and the appropriate ports were open on the firewall. (I've done the same with FMSA 11, 10, etc., though with earlier versions of Windows Server ...)

                                 

                                Piece of cake!