Anyone connecting WordPress and Claris Cloud?

I support a websites based on the WordPress platform and I want to be able to use Claris Cloud hosted databases as a datasource.

I'm struggling with the authentication procedures in a PHP environment and wondering if anyone else has solved that problem, or is interested in helping to solve that problem. The websites are on shared hosts that don't have access to python or node.

I'll cross-post this to the community forums.

We had a similar issue, so we moved the client off CC and over to ODITech for now. We will just have to wait to see if someone creates/updates a PHP library in the future.


The annoying thing is that the python sample provided by Claris works out of the box and the response times are great. I've asked Claris for a PHP equivalent, based on the fact that they have encouraged us to build with PHP for something like 20 years.

I’ll check if 1-more-thing have updated their Php. The had rewritten it completely a few years back

They say they still use the rewritten one

1 Like

Thanks for the link @Cecile , my issue is around authentication via PHP.

There are a few PHP packages on GitHub that interact with the AWS SDK for PHP but they all assume that I am the owner of the Cognito User Pool and that I have access to the application secret. In the case of FileMaker Cloud, I am just one of many users, so I have to figure out how to authenticate without direct access to the application secret. The javaScript and Python code are able to do that.

From what I've been reading in my research, the issue is to do with PHP maths engine. It can't do some things out of the box, and requires maths modules to generate a secure remote password (SRP).

I'd be glad for any PHP geeks to DM me to discuss it as a job.

@markdenyse Would what @Malcolm is talking about be your sort of thing?

@Malcolm connecting WP to your FileMaker database has nothing to do with AWS SDK nor any "math" function.

The only way to connect to your FileMaker Database (when hosted on FileMaker Cloud) is to use the dataAPI.
FileMaker's legacy PHP-API is not compatible with dataAPI, it was written to connect to FileMaker's Custom Web Publishing (which is not available on FileMaker Cloud).
Our version of the PHP-API has been upgraded so it is now compatible with the dataAPI, it should allows you to connect to your FileMaker Database with wordpress.

Note : The dataAPI needs to be activated in your Filemaker Server's console, it is accessible through https (ie https://your.server.address/fmi/data/v1/...)
You will also need an account with fmrest privilege activated in your FileMaker database


I've got all the conditions set up correctly and I can connect easily using the Python sample. So I'll grab your code and try connecting.

My confusion is based around my attempts to use the AWS SDK to establish a connection. In my reading I found people discussing secure remote password (SRP) in relation to Amazon Cognito. They were saying that it was necessary to have the math libs installed to be able to do SRP properly.

I wonder if I'm using the right code. I've forked GitHub - airmoi/FileMaker: FileMaker PHP API rewritten for PHP 5.5+.

Using the sample.php in "demo" and pointing to FileMaker Cloud with the correct credentials I get
- Message :cURL Communication Error: (22) The requested URL returned error: 401 - This can be due to an invalid username or password, or if the FMPHP privilege is not enabled for that user.

Switching to target my server runnning FMS on-premise I don't get any response from the database until I switch on xml/php privileges. At that point, the database appears in the list of databases but at the layout list test it responds with FAIL.

Is your account valid (fmrest privilege activated ?)

@Malcolm I do not want to be dismissive of @airmoi's github repo. I heard good things about another one here, the reason why I was mentioning @markdenyse earlier.

Also, a good reference to check in that space is this link from the Knowledge Base. Maybe @airmoi can reach out to Claris and ask that his repo gets added to the list. I'm glad he shared it with us here, but I'm sure more would benefit if it was listed with the other ones

1 Like

As Malcolm points out, the issue is with how to get authenticated to FM Cloud which is a different beast than simply authenticating with the Data API to FM Server. I have been unable to spend any time monkeying around with the Amazon PHP classes to see if this will even work (in theory it should). The 'work around' is to set up a node server which does work, and there's some sample code that do that.

It boggles my mind that Claris thinks this it's somehow acceptable to be forced to set up a separate server just for authentication. Just my 1 cent :slight_smile:



Thanks @markdenyse for sharing and putting in light the nuances about authentication between FM Cloud and authenticating to non FM Cloud deployment.

@Malcolm I hope this gives you some guidance about how to get closer to your goal.

1 Like

For testing I'm using a full access account that has fmrest active.

Yes, this is driving me crazy too.

I've tried a few different setups but I keep getting a FAIL on the list layouts test. I've verified the settings on the server and the accounts. I'm sure they are good. In fact I was able to verify them with @markdenyse's fmPDA.

I forked fmpPDA and modified the config to point to my On-Premise server. Everything is working as expected. So that much is good.

I've sent a request to a few freelance PHP programmers to see if they are interested in solving the authentication issue. It's the weekend here, so I may not get a reply until monday.


Am I understanding correctly you had to modify fmPDA to get it connect to your on-premise server? Normally that shouldn't be necessary.

No - mistaken assumption. It connects to the on-premise server without modifications ( apart from config ).