Coder Social home page Coder Social logo

kdoronzio / fmrest.php Goto Github PK

View Code? Open in Web Editor NEW
28.0 12.0 17.0 141 KB

PHP class file to support FileMaker Server Data API (REST engine)

Home Page: https://sosimplesoftware.com/fmrest.php

License: MIT License

PHP 100.00%
data-api php rest-api filemaker

fmrest.php's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fmrest.php's Issues

HTTP Verb Error 1704

Hey there, I am using your fmRest API since a while and everything works great thanks! However, when I try to use findRecords, I always get this error: Resource doesn't support the specified HTTP verb [code] => 1704

I tried debugging it, looked at your fmrest.php file and so on but never found out what's wrong..

Do you have any idea concerning this topic?

Kind regards
Yassin

For use with webhooks

Hi,

Thanks for this great php class. I've tweaked it to work with webhooks wherein it stores the session token to a text file on the server rather than a variable in the client's browser (since there wouldn't be a browser session in the case of webhooks).

I've tested and it works, but others may have improvements.

I'm new to Github - is this something you'd like me to post or share back to this repository in some way?

Chris

Sorting Example

There seems to be no examples for Sorting the found records.

Empty result

I have used this code I set all connection host and database name layout name perfectly but when I run this I got this error can you help me
emptyresult

Parameters in documentation are off

First of all I wanted to thank you for this great piece of code. It did save me a lot of headaches.

I notices there's a difference in the parameters the Filemaker Data API expects and the examples you provided. For the getRecords function you mention the offset and range parameters, but the FM API expects _offset and _limit.
Any change this can be edited?

Error : HTTP/2 stream 0 was not closed cleanly

First, Many thanks for your tool. I'm not a developper and I can simply use it for data publication from FM on a website.
But, since few days, I've this error when I open the connection to FM with fmrest :
Result: HTTP/2 stream 0 was not closed cleanly: Unknown error code (err 1)

For the moment, I have solved the problem, thanks to an info on StackOverflow, by adding this line (on line 384):
curl_setopt ($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
(Be careful, I don't know if this is the right thing to do).

(https://stackoverflow.com/questions/56865217/php-curl-error-http-2-stream-0-was-not-closed-cleanly-protocol-error-err-1)

Best Regards,

Empty timestamp

I am having trouble with getting a timestamp from the API.

The timestamp $timestampBeginn is being created, later on it needs to be fetched again but it's always empty.
Here is snippet of my code:

	$dateEnd = new DateTime('NOW');
	$dateEnd = $dateEnd->format('Y-m-d H:i:s');
	$timestampEnd = strtotime($dateEnd);
	$timestampBeginn = $result['response']['data'][0]['fieldData']['timestamp'];
	$recordId = $result['response']['data'][0]['fieldData']['recordId'];
	$calltime = $timestampEnd - $timestampBeginn;
	$record['calltime'] = $calltime;
	$dataedit['fieldData'] = $record;
	$result = $fm->editRecord($recordId, $dataedit, $layout2);

When being created, the timestamp $imestampBeginn works properly and is shown.

FMREST --> curl communication error: (77) after recent RHEL patch

Hello -- Trying to track down the root cause of this issue:

My server applied a patch this morning and afterwards FMREST throws a CURL communication error when trying to call our filemaker server. I ran an undo on the patch and it was working normally again:

Installed     rpm-4.11.3-48.el7_9.x86_64                  @rhel-7-server-rpms
Installed     subscription-manager-1.24.52-2.el7_9.x86_64 @rhel-7-server-rpms
Installed     yum-3.4.3-168.el7.noarch                    @rhel-7-server-rpms

Packages Altered:
Updated nspr-4.34.0-3.1.el7_9.x86_64 @rhel-7-server-rpms
Update 4.35.0-1.el7_9.x86_64 @rhel-7-server-rpms
Updated nss-3.79.0-5.el7_9.x86_64 @rhel-7-server-rpms
Update 3.90.0-2.el7_9.x86_64 @rhel-7-server-rpms
Updated nss-softokn-3.79.0-4.el7_9.x86_64 @rhel-7-server-rpms
Update 3.90.0-6.el7_9.x86_64 @rhel-7-server-rpms
Updated nss-softokn-freebl-3.79.0-4.el7_9.x86_64 @rhel-7-server-rpms
Update 3.90.0-6.el7_9.x86_64 @rhel-7-server-rpms
Updated nss-sysinit-3.79.0-5.el7_9.x86_64 @rhel-7-server-rpms
Update 3.90.0-2.el7_9.x86_64 @rhel-7-server-rpms
Updated nss-tools-3.79.0-5.el7_9.x86_64 @rhel-7-server-rpms
Update 3.90.0-2.el7_9.x86_64 @rhel-7-server-rpms
Updated nss-util-3.79.0-1.el7_9.x86_64 @rhel-7-server-rpms
Update 3.90.0-1.el7_9.x86_64 @rhel-7-server-rpms

Are you aware of any CURL compatibility issues with recent RHEL updates that I can investigate? I know it wasn't the firewall as I toggled it off and on with no improvement. Are there CURL verify settings I can configure in FMREST?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.