# Anyone connecting WordPress and Claris Cloud?

**URL:** <https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679>\
**Category:** Questions\
**Tags:** api, claris-cloud, wordpress\
**Created:** [February 10, 2021, 10:39pm UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679 "2021-02-10T22:39:15Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [February 10, 2021, 10:39pm UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/1 "2021-02-10T22:39:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rivet](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/rivet/32/1727_2.png) [@rivet](https://the.fmsoup.org/u/rivet)\
**Post date:** [February 10, 2021, 11:39pm UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/2 "2021-02-10T23:39:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [February 10, 2021, 11:55pm UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/3 "2021-02-10T23:55:24Z")

</div>

Ouch!

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.

---

<div class="post-metadata">

**Author:** ![Cecile](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/cecile/32/98_2.png) [@Cecile](https://the.fmsoup.org/u/Cecile)\
**Post date:** [February 11, 2021, 5:57pm UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/4 "2021-02-11T17:57:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Cecile](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/cecile/32/98_2.png) [@Cecile](https://the.fmsoup.org/u/Cecile)\
**Post date:** [February 11, 2021, 7:18pm UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/5 "2021-02-11T19:18:28Z")

</div>

They say they still use the rewritten one

> **[airmoi/FileMaker](https://github.com/airmoi/FileMaker)**
>
> FileMaker PHP API rewritten for PHP 5.5+. Contribute to airmoi/FileMaker development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [February 11, 2021, 9:35pm UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/6 "2021-02-11T21:35:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Bobino](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/bobino/32/194_2.png) [@Bobino](https://the.fmsoup.org/u/Bobino)\
**Post date:** [February 12, 2021, 3:10am UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/7 "2021-02-12T03:10:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![airmoi](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/airmoi/32/601_2.png) [@airmoi](https://the.fmsoup.org/u/airmoi)\
**Post date:** [February 12, 2021, 8:34am UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/8 "2021-02-12T08:34:09Z")

</div>

@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/](https://your.server.address/fmi/data/v1/)...)  
You will also need an account with fmrest privilege activated in your FileMaker database

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [February 12, 2021, 2:07pm UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/9 "2021-02-12T14:07:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [February 12, 2021, 3:15pm UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/10 "2021-02-12T15:15:46Z")

</div>

I wonder if I'm using the right code. I've forked [GitHub - airmoi/FileMaker: FileMaker PHP API rewritten for PHP 5.5+](https://github.com/airmoi/FileMaker).

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.

---

<div class="post-metadata">

**Author:** ![airmoi](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/airmoi/32/601_2.png) [@airmoi](https://the.fmsoup.org/u/airmoi)\
**Post date:** [February 12, 2021, 4:39pm UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/11 "2021-02-12T16:39:13Z")

</div>

Is your account valid (fmrest privilege activated ?)

---

<div class="post-metadata">

**Author:** ![Bobino](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/bobino/32/194_2.png) [@Bobino](https://the.fmsoup.org/u/Bobino)\
**Post date:** [February 12, 2021, 5:56pm UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/12 "2021-02-12T17:56:16Z")

</div>

@Malcolm I do not want to be dismissive of @airmoi's github repo. I heard good things about another one [here](https://github.com/driftwoodinteractive/fmPDA), the reason why I was mentioning @markdenyse earlier.

Also, a good reference to check in that space is this link from the [Knowledge Base](https://support.claris.com/s/article/data-api---admin-api-packages-wrappers-for-fm-17-x?language=en_US). 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

---

<div class="post-metadata">

**Author:** ![markdenyse](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/markdenyse/32/207_2.png) [@markdenyse](https://the.fmsoup.org/u/markdenyse)\
**Post date:** [February 12, 2021, 6:18pm UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/13 "2021-02-12T18:18:05Z")

</div>

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 🙂

Mark

---

<div class="post-metadata">

**Author:** ![Bobino](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/bobino/32/194_2.png) [@Bobino](https://the.fmsoup.org/u/Bobino)\
**Post date:** [February 12, 2021, 6:21pm UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/14 "2021-02-12T18:21:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [February 12, 2021, 11:39pm UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/15 "2021-02-12T23:39:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [February 12, 2021, 11:42pm UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/16 "2021-02-12T23:42:08Z")

</div>

Yes, this is driving me crazy too.

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [February 13, 2021, 4:26am UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/17 "2021-02-13T04:26:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [February 13, 2021, 4:31am UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/18 "2021-02-13T04:31:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![markdenyse](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/markdenyse/32/207_2.png) [@markdenyse](https://the.fmsoup.org/u/markdenyse)\
**Post date:** [February 13, 2021, 10:06pm UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/19 "2021-02-13T22:06:32Z")

</div>

Malcolm,

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

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [February 13, 2021, 10:43pm UTC](https://the.fmsoup.org/t/anyone-connecting-wordpress-and-claris-cloud/1679/20 "2021-02-13T22:43:06Z")

</div>

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