FileMaker icon indicating copy to clipboard operation
FileMaker copied to clipboard

When setting $fm->useDataApi = true; getting errors regarding "Authorization header missing 'Basic' or 'Bearer'." - PHP 8 limitation for updating to 3.0.0-beta2

Open bearinaustin opened this issue 1 year ago • 0 comments

I read the documentation and examples in the dataAPI branch of this package. I am running into an error when authenticating using dataAPI.

` $fm = new FileMaker($database, $host, $username, $password,['errorHandling' => 'default']);

$fm->useDataApi = true;

$findCommand = $fm->newFindCommand($layout);

$findCommand->addFindCriterion('tournament_year',$year); $findCommand->addFindCriterion('tournament_semester',$semester);

$findCommand->addSortRule('tournament_sport',1,FileMaker::SORT_ASCEND);

$result = $findCommand->execute();

if(FileMaker::isError($result)) { echo($result->getMessage()); exit; } `

Resulting error is: "Authorization header missing 'Basic' or 'Bearer'."

--

I realized that my composer was only installing 3.0.0-beta1 and not beta 2 because it was throwing an error that: airmoi/filemaker 3.0.0-beta2 requires php ^5.6|^7.0 -> your php version (8.2.15) does not satisfy that requirement.

Is the branch compatible with PHP 8?

bearinaustin avatar Nov 22 '24 20:11 bearinaustin