6 Replies Latest reply on Jun 15, 2009 9:52 PM by FluffyBear

    PHP/MySQL talking to Filmaker Server Advanced on a separate Server

    MartinTaylor

      Title

      PHP/MySQL talking to Filmaker Server Advanced on a separate Server

      Your post

      Hi everyone, I am wondering if anyone knows if I can get my MySQL/PHP server (which is hosted externally with a static IP address) to talk to my Filemaker Server Advanced v10 (hosted at a completely different location and IP address). The aim is to get an already very developed PHP solution to access data from our filemaker server. I know this may seem a simple question but my Filemaker development skills stopped around version 6 and I have been thrown into the deep end!

       

      Thanks in advance.

        • 1. Re: PHP/MySQL talking to Filmaker Server Advanced on a separate Server
          kapitaen_1
            

          your mysql/php machine, what is it? linux/unix, mac os, windows? if it is macos or windows, simply have a closer look at your filemaker server cd. there is a folder named jdbc or odbc, you find a odbc driver inside to get access to your filemaker server.

           

          greetings from germany

          chris 

          • 2. Re: PHP/MySQL talking to Filmaker Server Advanced on a separate Server
            MartinTaylor
              

            Hi Chris,

             

            The mysql/php server is a linux box hosted externally to our office. We use it to serve a client project management system that is built in php. The need is to get some of the fields in our filemaker database (which is hosted at a different location and therefore different ip address) to be accessible to our online solution in php based on a search query (i.e. client name). I am a newbie when it comes to the new capabilities of filemaker 7/8/9/10. We built all our filemaker solutions back in version 5 & 6. So any help would be much appreciated.

             

            Thank you so much.

             

            Martin

            • 3. Re: PHP/MySQL talking to Filmaker Server Advanced on a separate Server
              kapitaen_1
                

              your mysql server is a linux box. Hmm, so i see no chance to get the filemake data via odbc.

               

              If you can migrate the mysql to a windows or mac os machine, then you can find a odbc driver on your filemaker server (or filemaker client) cd.

               

               

              if there is anyone who knows better, or can give some hints for a filemaker odbc driver that runs on linux, please post!

               

              greetings from gemany

              Chris

              • 4. Re: PHP/MySQL talking to Filmaker Server Advanced on a separate Server
                FluffyBear
                  

                There's no FM ODBC for Linux drivers from my searches as I was doing the same thing Martin is doing.

                 

                You have several ways to get FM to integrate into a remote server.

                 

                1) The more time consuming but better solution: Build your own odbc bridging server.   You need to program your own little service that take a SQL statement from the remote server and use the local ODBC server on the Windows or Mac machine hosting FM to service that.  This take a lot of work but would pay off depending on the number of transactions that to do.

                 

                2)The much shorter solution:  Use the build in XML for filemaker.  This is what I did to get FM to go with PHP.

                Build a PHP interface class to consume the XML generated from FM and also to query the server.  Insert, Edits, and Searches are HTTP querystrings and you get an XML result back from the server.  This solution work very well if you only have a limited number of records that you need interaction.  On our servers, there is about a 0.3 seconds time for FM to generate an XML request locally.  So it's a decent solution if I need a small number of FM requests, but if I try to get say 100 FM requests of 500+ rows per requests for a single web page generation then this system bog down a bit.  This is where option 1 would have less overheads.  For Mac hosted FM, there is a HUGE overhead in FM using apache to generate the XML response.

                 

                FM does come with it own PHP API, as well as a 3rd party solution called FX.  But I've tried both and they do too much extra things that you don't need at very high time cost.  A FM API request for a certain record would take ~1.5 seconds, by writing my own API to parse the XML, I got it down to about .25-0.4 seconds.  So the amount of time you want to spent on writing your API is based on what performmance you need, the default FM API or FX might work well for your situation.

                 

                For PHP, I would recommend starting tests with the FM PHP API,  try to simulate the heaviest load you need from FM, if the timing is acceptable then go with it.  If it's a little bit high then look to constructing your own.

                • 5. Re: PHP/MySQL talking to Filmaker Server Advanced on a separate Server
                  MartinTaylor
                    

                  Thanks for the suggestions FluffyBear. I'm not sure I made it clear that I am a newbie when it comes to the heavier programming side of things. What I am trying to achieve is get my website (hosted on one IP) to access data from my Filemaker server (hosted on a different IP). I need the ability for a client login (currently configured in php but could be worked into FM) to access records relevant to their individual login.

                   

                  I don't necessarily need to have the mysql database and the filemaker database talk to each other, just access the filemaker data. 

                   

                  I hope that makes things clearer.

                   

                  And thanks for your time.

                  • 6. Re: PHP/MySQL talking to Filmaker Server Advanced on a separate Server
                    FluffyBear
                      

                    If that's all you need, try the API that FIlemaker provide.  It can do a what you need, it's actually a very good API funtionally (I just found it too slow for what I was doing).  There's a few books that provide pretty decent examples of how to get it going.  No mySQL is require.