FM-and-PHP
Open-source PHP class for FileMaker – launched by schubec in 2004.
FM-and-PHP, or FileMaker and PHP, is a project launched by schubec in 2004 to make it easy to access FileMaker databases from version 5 to 12 via PHP.
The project used to live on the website www.fm-and-php.info and has now moved back to schubec.com, as a dedicated website is no longer needed.
Please note: Since FileMaker Inc. began providing its own free class for programming with PHP with version 10, FM-and-PHP is no longer being developed. The information and downloads remain available here – but if you are planning new projects, we recommend the version developed by FileMaker, FmApi4Php.
What is FM-and-PHP?
FM-and-PHP is a free PHP class that lets you access FileMaker Pro 5.0 to 12.0 databases via PHP.
Although FM-and-PHP works in a similar way to FX.php, it was developed completely from scratch and independently of it.
From our daily experience with FX.php in real-world projects and in training courses, we found that there was still room for optimisation. We built these optimisations into our own source code until FM-and-PHP finally emerged as a class in its own right.
FM-and-PHP is fully object-oriented and can therefore be extended easily at any time. Unlike FX.php, you as a developer only access defined methods, so new FileMaker versions can be supported with little effort and without you having to change much in your PHP files.
All public methods of FM-and-PHP are fully documented, making it easy to get started. A technical reference and a comprehensive tutorial are also available.
FM-and-PHP is based on the XML output of the FileMaker Web Companion (FileMaker up to version 6.0) or FileMaker Server Advanced (version 7.0 and later).
FM-and-PHP is released under the BSD licence – you can use FM-and-PHP as often as you like without paying licence fees. As the source code is freely available, you can adapt it to your own needs or have it adapted by third parties. You use FM-and-PHP at your own risk; no security vulnerabilities or bugs are currently known, but the possibility that such issues exist cannot be ruled out.
Professional support and training
FM-and-PHP is free of charge – we, the company schubec, offer training and professional support. Get in touch!
Download
Download the latest version of FM-and-PHP here free of charge:
Licence terms
Copyright © 2004–2010, schubec – Bernhard Schulz, All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Version history
Here you can see what changed in each version of FM-and-PHP:
Version 2.3.3 26 April 2007
- Bugfix: container fields in portals that are read via fmandphp_mediaproxy are now displayed correctly (instead of showing the first image for every row)
Version 2.3.2 15 December 2006
- Removed Base64 encoding from links to the media proxy for improved compatibility
- Introduced the class FM_AND_PHP_DATETIME and the function getDateTime to make working with date formats easier
- The media proxy now also returns individual headers without a warning
- New function getRecordRange
- getListNavigation: the current page is now only shown in bold and no longer as a link
- Navigation functions – new parameter for appending further values to the link
- Added error numbers
- Bugfix in the function addSortField – it had practically no effect, but is now correct
- Better memory handling
- Caching: errors are no longer cached
Version 2.3.1 9 April 2006
- Bugfix: the media proxy's encrypted link is now URL-encoded for better compatibility
Version 2.3.0 22 March 2005
- Bugfix: parameters passed under FileMaker 7 are now converted automatically. (Thanks to Martin Lormes for pointing this out.) FM-and-PHP now behaves the same with regard to special characters under FM 5/6 and 7. See the documentation!!
- The method getNumberOfRepetations() is now called getNumberOfRepetitions(). getNumberOfRepetations() is retained for backward compatibility.
- Corrected the misspellings Repeations and Repetations to Repetitions in passed parameters.
- Changed the background colour of debug messages.
- PHP 5: support for the magic methods __call, __get and __set to make debugging easier.
- Two new search parameters for addSearchField, namely == and "" (empty). See the documentation.
- New function getColumns() (see the documentation).
Version 2.2.5 19 February 2005
- Bugfix for sorting under FileMaker 7 when more than one instance of FM-and-PHP is used.
- Added documentation and a sample script for the media proxy.
Version 2.2.1 17 November 2004
- Added addScript for backward compatibility.
- Updated the reference.
- Added a proxy for container fields. How it works is not yet documented. The documentation will follow as soon as donations have been collected for it.
Version 2.1.0 19 October 2004
- New tutorial in version 2.0.
- The method addLogicalParameter() is now called setLogicalParameter(). addLogicalParameter() is retained for backward compatibility.
- The method addSearchParameter() is now called addSearchField(). addSearchParameter() is retained for backward compatibility.
- Updated technical reference.
Version 2.0.2 12 October 2004
- FM-and-PHP is now officially FileMaker 7 compatible.
- 3rd parameter for setFileMaker Host for FM7 compatibility.
- 2nd parameter for setDatabaseLayout Host for FM7 compatibility.
- Updated the reference.
- Updated all tutorial examples (not yet online).
Version 1.5.0 26 August 2004
- XML parser: the default encoding is now specified as UTF-8 so that umlauts are parsed correctly with PHP 5.
- Fixed various PHP warnings about uninitialised variables.
Version 1.4.1 13 August 2004
- Bugfix: value lists containing umlauts are read correctly.
- Bugfix: value list entries containing the & character are displayed correctly.
- Improvement/bugfix: getValueListCheckbox now returns form field names that PHP interprets as an array.
- More error descriptions
- Unknown errors are output with their error number
- Error and notice texts are now output in English
- getListNavigation: default values now in English
- POST requests now contain the actual host as the HOST value instead of localhost
Version 1.3.0 12 July 2004
- New function: doQuery()
- Changed some internal functions to make future development easier
- Added MySQL cache to the download package
- Bugfix/improvement: the member variable m_CurrentRecord is now declared only once
Version 1.2.6 12 May 2004
- Bugfix when recID has the value “0”
- Greatly improved error handling
- New function getNumberOfRepetations
Version 1.2.5 schubec internal
Internal developer version.
Version 1.2.4 18 April 2004
- Bugfix for “FileMaker field names with special characters”, which are now handled “better”
Version 1.2.3 schubec internal
- Enhancement: record ID (recid) and modification ID (modid) must now be numeric values, otherwise an error is returned
Version 1.2.2 3 March 2004
- Bugfix for script calls: script calls are now actually passed on to FM :-)
Version 1.2.1 25 February 2004
- Value lists containing umlauts are now parsed correctly
- Requests are now sent to the CGI interface “FMPro” instead of “FmPro”, as the lower-case “m” apparently causes errors on certain systems.
Version 1.2 17 February 2004
- First public, generally available version
- Various bugfixes
Version 1.0 16 September 2003
- schubec – internal developer version