AnsweredAssumed Answered

Error 22

Question asked by steve.winter on Sep 18, 2012
Latest reply on Sep 18, 2012 by steve.winter

Hi all


FM 12 solution, updated from FM11, using the API. Single machine install, on Win 2008 server.


Code places a relatively simple find and sort request. approx. 75% of the time it works just fine, approx 25% of the time I get an FM error object back instead


[code] => 22

[message] => 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.


Try the same request again, a 'split second' later, and again 75% of the time it works just fine... at present my code literally has;


$res = $cmd->execute();


if(FileMaker::isError($res)) { showMe('broke, trying again');

$res = $cmd->execute();

if(FileMaker::isError($res)) { showMe('still broken');

$success = false;

$messages[] = 'pSorry, we've not been able to locate the product area you were looking for. Please use the navigation menu above, and then select the specific product or service which you are interested in purchasing.';

} else { showMe('got it this time');

$success = true;

$data = extractRecords($res);


} else {

$success = true;

$data = extractRecords($res);



(Ignore code redundancy I know - this is just 'make it work and track it' code).


So far, I've only seen 'still broken' once, every other time I've got the 'got it this time' response...


Any thoughts...? anyone else seen this...?