We have reset all users FileMaker related profile fields. Please take the opportunity to update your information,  this will provide background to members whom read your posts. Click here.

Jump to content
charmcello

FMP PHP API: dropdowns and radio buttons missing

Recommended Posts

charmcello    0

I am tasked with troubleshooting a web registration form that queries a Filemaker Pro v12 database via a Filemaker PHP API.

The web form had been running well for a couple of months after major revision, when all of a sudden:

  1. All dropdowns are empty
  2. All radio buttons are missing
  3. These symptoms appear to be browser-independent.

The appearance of these symptoms is mysterious:

  1. Nobody has modified the PHP code for the web form - I've done a compare with a backup done at the time when the web form was not broken and it is identical to what is currently on the server. 
  2. The Filemaker Pro layout that the web form is querying is just fine - all the value lists for the dropdowns and radio buttons are present.

I've created a stripped-down version of the web form: https://campmeetings.cccsda.org/test_form.php and I've also attached the php source code file.

The date and record fields are populating correctly. Notice the empty dropdown list after "Church I attend."

Could this be caused by an incompatibility between the FMP PHP API and PHP libraries on the server? Perhaps due to a PHP update on the server? Any ideas how to troubleshoot this? 

test_form.php

Share this post


Link to post
Share on other sites
webko    52

I wil note that this is not done purely with the API - it's an FMStudio v2 generated page which uses some custom functions not used in the API.

And that FMStudio went unsupported a few years back.

It's also not a query page - it creates a new record, and reads data back from that record.

That said, if the WebForm layout does have the value lists available when a brand new record is created (used for drop downs and buttons), this looks like it should work

Edited by webko

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • By Jake Thomann
      For anyone interested in an npm package that communicates with Filemaker's data API, I am currently developing here - https://github.com/thomann061/fmrest
    • By gczychi
      Hi,
      I want to access a data base «Import.fmp12» hosted on FMS 16 with the new Rest API but cannot get it to work.
      Testing with «ARC Plugin for Chrome» (great tool, btw) and Postman.
      In ARC, I get the error 802 – Unable to open file; in Postman, I won't even get that far:  «Could not get any response»
       

      This is what I did so far:
       – The file is accessible fine with any FileMaker client using FileMaker username and password (triple checked spelling, etc.)
       – Can connect fine to WebDirect with any browser and http
       – Cannot connect using Rest API and http, so went for https
       – Got an authentication error with https, so
       – Installed a self-signed certificate both on the server Mac and on local Mac for my myowndomain.com
      Getting mixed results:
       – Firefox: myowndomain.com certificate: Error code: SEC_ERROR_UNKNOWN_ISSUER  (to be expected)
       – Safari: FMI Default Certificate: Certificate not valid (host name mismatch). For whatever reason, Safari doesn't use my certificate.
       – Chrome: strikethrough https but shows the WebDirect server
       – ARC Plugin: Using https://myowndomain.com/fmi/rest/api/auth/Import Can get now through to the server (no SSL-Auth problems anymore), but the result is: {"errorMessage": "Unable to open file","errorCode": "802"}
       – Postman: Using https://myowndomain.com/fmi/rest/api/auth/Import «Could not get any response» and an error message: «{"errorMessage":"Method Not Allowed"}»
       
      Any ideas?
      Thanks  for any help.
       
      Gary
       
    • By jamescv7
      XML error: No memory at line 1
      Greetings, this error occurred when the Filemaker API cannot generate a bunch of records. (1000+ records and above)
      I've adjusted the time out settings for PHP even the memory limits.
      Is there any possible solution for this?
       
      According to some information, the error turns out that the 10 MB XML scripts is unchangeable.
      thanks.
    • By Ken d'Oronzio
      FREE fmREST.php – Simplifies & manages PHP connections to FileMaker 16’s REST-based Data API.
      The newly released FileMaker Server 16 now offers REST access to your FileMaker databases. There’s more about that how this impacts PHP developers here.
      The bottom line is that to use REST as part of your PHP solution, you would usually need to write a series of cURL functions and you would have to manually manage connecting & disconnecting from your server, and saving your tokens.
      This is a pain!
      We know it’s a pain, because we have spent the last several weeks rolling REST functionality into soSIMPLE Calendar.
      We created this class file to make it easier to manage dynamic REST sessions for soSIMPLE and our custom development. The goal of the class file was to help PHP developers start using the new REST engine as quickly and easily as possible.
      We’ll also be updating it with new features. If you’d like to add something to it, please let us know.
      What fmREST.php does:
      Makes every REST call available as a PHP function. Automatically login into FileMaker Server whenever you call any REST functions Saves your token for 15 minutes to reuse Checks for a broken or disconnected token and automatically reconnects and runs your function again Where do I get it?
      You can download the fmREST class file here.
×