Why FX.php?

Regardless of what you're using as a data source these days, you have multiple options when it comes to connecting to it. These range from libraries built into PHP, to various database abstraction layers, to data source specific libraries (like the FileMaker API for PHP.) It's probably safe to say that there are at least as many reasons for picking a given option, as there are available options. That said, here are a few items that you may find compelling:

  1. Ease of Use. FX.php was originally created with PHP newbies in mind. And though its flexibility has increased, it remains very easy to learn and use.
  2. Tools. FX includes a number of great tools to help with all sorts of things. For example: the FX Parser will actually help you learn to use FX.php (more on that later in the documentation); the FX Fuzzy Debugger helps demystify FileMaker® database errors; and image_proxy.php provides a slick way of getting images from FileMaker® container fields.
  3. Choices. FX.php talks to FileMaker, MySQL, PostgreSQL, OpenBase, ODBC, and CafePHP data sources now, with more to come (look for some NoSQL options in future releases.) You can use built in functions for any of these, or you can take advantage of data source specific features, if desired.
  4. Open Source. FX has been open source since its creation, and it will remain so. Features and fixes can easily be submitted and discussed via the project's github page.
  5. Abstraction. Some database abstraction layers actually require a fair amount of variation between data sources. FX.php is designed to minimize the knowledge required to use different data sources. It will even generate simple SQL statements for you.

For FileMaker® Developers looking at PHP

PHP is a great web scripting language because, like FileMaker® Pro software, you can actually wrap your head around it. With PHP you can build web applications that meet just about any client's needs. The web offers many PHP resources for help, and the PHP Documentation site is an excellent start.

The benefits for FileMaker® Pro developers increase dramatically because PHP can talk to FileMaker® databases straight from a web page, allowing you to build dynamic web pages based on the content of your clients' FileMaker® Pro solutions. Using PHP from your HTML web page you can dynamically display FileMaker® find results, customize your website layout interface and enable users to update, create and delete FileMaker® Pro records.

The most tantalizing prospect of using PHP, is that although PHP scripts are part of a web document (just like the HTML, CSS, and Javascript), they are processed before any of that. Thus, your HTML, CSS, and JavaScript can be dynamically created and modified based on the contents of your FileMaker® Pro database!

What about the learning curve?

PHP is easy to learn. There are tutorials online (google it) and most any major book store (whether online or brick and mortar) will offer PHP texts for the eager student (and perhaps even an offering or two for the less-than-eager among you.) PHP can be used at a variety of skill levels: from simple page modifications, to complex web applications that span an entire site. PHP is a lot like FileMaker® scripting, yet it has all the familiar functions and controls of a more traditional programming language.

What about FileMaker® database compatibility?

FileMaker® Pro files (any version from 7-14) need to be shared via XML for custom web publishing on FileMaker® Server (a FileMaker® Developer subscription will get you a development copy of Server, if you don't already have one.) An extended privilege set needs to be added to your file with the key word “fmxml”. The user account that will be used to access your file via the web will need to have fmxml privileges.

FileMaker® Pro 6 or earlier files need to be shared through the web companion on FileMaker® Pro client (unlimited version, if available.)

See FileMaker® documentation on Custom Web Publishing via XML for more information.

How much is this going to cost?

PHP is free, and the most common servers used with it (Apache and Nginx) are too! If you're using a recent version of FileMaker® Server, you already have a web server installed with PHP (someday you may want a separate web server with a better PHP install, but this will work great now.) Do not install your own web server software on a machine running a recent version of FileMaker® Server — though there are ways to make it work, things may break unexpectedly.

A number of other FX.php data sources like MySQL, PostgreSQL, etc. are free or have free versions, as well. Unfortunately, if you want to use FileMaker® Server, and you don't already have a copy, there is no free option (the developer subscription referenced above may be your best option.) XAMPP will set you up with Apache, MySQL, and PHP (among other things) on Mac OS X, Linux, or Windows. MAMP (on Mac OS X) and WAMP (under Windows) are platform specific options. Homebrew (also for Mac OS X) is a nice package manager, and can be used to install a variety of data sources and web server software.