1 Reply Latest reply on Dec 5, 2012 2:26 PM by JimGeldermann

    Accessing FM data on a Web server via ODBC?

    SteveWhatman_1

      Title

      Accessing FM data on a Web server via ODBC?

      Your post

      Hi All,

      I have a question on the best way to acess data fast from a webserver (LAMP) to the Filemaker Server Pro databases.

      I am leaning towards ODBC but have some questions on that end.

      Firstly here is the setup.

      Filemaker Server is installed on two machines (master - database server and worker - web server and web publishing engine)

      We have a centos box in a data center running a wordpress blog as our site. It is fairly standard install with php53, mysql, apache.

      I have run some iphone apps and web php pages on our internal webserver (within our network) to acess the filemaker data via PHP XML on the worker machine. Have found this to be slow and a little up and down with performance. we would see processor spikes from the fmweb processes. So I am leaning towards ODBC.

      With the ODBC I have hit a bit of a brick wall. I have the master server accepting ODBC connections and am testing with the FMSample DB. I have checked and the port 2399 is acessable from our offsite webserver via a NAT on the firewall to the filemaker server.

      I have installed unixODBC and php53_ODBC onto the webserver. I created a test php page with the following code in it.

      <?php
      $odbc_conn = odbc_connect("Driver={FileMaker ODBC};Server=125.***.***.***;Database=FMServer_Sample;" , 'USER', 'PASSWORD' ) or die(odbc_errormsg() );

      ?>

      I get the following error - [unixODBC][Driver Manager]Data source name not found, and no default driver specified

      My question is, am I meant to setup or configure a DNS on the centos box via a config file?, do I need a filemaker .so driver file to install on the server?

      I have checked that the xDBC plugin is on the filemaker server and the permisions on the file are correct.


      If you could help with acessing filemaker data from a webserver via PHP that would be great, or if I am on the wrong track let me know.


      Thanks


      Steve


        • 1. Re: Accessing FM data on a Web server via ODBC?
          JimGeldermann

               It's simple to have your applet connect to a Filemaker advanced server. Make sure the jdbc jar file is in the webservices library.

                

               Class.forName("com.filemaker.jdbc.Driver").newInstance();

                           String url = "jdbc:filemaker://" + fmAddress + "/" + fmDataBase;
                           Connection conn = DriverManager.getConnection(url, "username",
                                   "password");

                

               Now the conn can be used for executing querries.