Can someone run through exactly how to configure the settings with this module? I have all the parameters entered the same way as in a custom PHP script that uses the FX.php script and works. With my Drupal form, however, I get two error log entries when submitting — "Couldn't insert data into filemaker. FM error code: 100" and "Could not set params. Error code: 100"

When cron runs and tries to submit the data, I get a single log entry — "Could not set params. Error code: 100"

In particular, I'm wondering how to enter the server address and database name. My FMP server only accepts secure connections, so would I enter "https://my.servername.com" or just "my.servername.com" and let the scripts negotiate the protocol? And in my custom script, I use DATABASE NAME.fp7. Would the same format work with this module, or should it be just DATABASE NAME (no suffix)?

Comments

flamingvan’s picture

Hi Daddison,
There are instructions on how to use the module in the readme file. Did you look at that?
Also, could you look over this information about FM error code 100 and see if it helps?
http://www.briandunning.com/errors/95

In your custom script are you using and API such as FX.php or the FM api?
Moses

daddison’s picture

I did look at the read me file, but it does not clearly indicate how the connection parameters should be entered.

Also, it turns out that my custom script is using FM api, not FX.php. So I've tried the example scripts from the developer's site (iviking.org) with my server settings and I'm not able to connect that way either. Access to my FMP server is highly restricted by the IT guys, so I must be missing a critical detail like the port number or something. Any other thoughts?

Doug

flamingvan’s picture

Ok, I think I see what's going on. FX.php has a parameter called $dataURLType which you can read about here: http://www.iviking.org/downloads/FXFunctions.pdf (look under "First Function to Call")

That parameter needs to be set to HTTPS because you're using a secure connection, but I didn't provide a setting for it. So I should update the module and add a checkbox or something.

In the meantime you could test the setting for me. Find line 7 in includes/filemaker.inc

$connection = new FX($database['server'],"80","FMPro7");

Change to

$connection = new FX($database['server'],"80","FMPro7", "HTTPS");

That might work...

daddison’s picture

No, that didn't change anything. Can you confirm that I have entered my webform settings correctly?

For Server, I've entered the Filemaker server IP address without the "https://" (I have also tried with just the hostname).

For Database Name, I've entered MY DATABASE NAME.fp7 (with suffix)

Also, I think my FMPro Advanced server is listening on port 5003, so I've tried hard-coding that into the filemaker.inc, but no luck. Does the FX class require the connection to be over port 80 or port 591?

flamingvan’s picture

I think you want to drop the suffix on the database name. Can you try that?
For the port, I'm not sure what's standard for secure connections. Try dropping the suffix and we'll go from there.

daddison’s picture

After working with my FMP server admin to make sure all necessary ports were open and the FMP web publishing engine was working correctly, it turns out that the secret ingredient to get this to work for me was to turn off curl in the FX.php script. I did this at line 149 and line 1874. I also set 'use SSL' to true at line 65 and hard-coded the port and port and protocol at line 7 of filemaker.inc as previously mentioned. My other settings were already correct - the filename does require the suffix, i.e. DATABASE_NAME.fp7.

flamingvan’s picture

I'm glad you got it working. Personally, I never use the suffix when I specify a db name with FX.php, but I've never tried it with SSL.