August 7, 200817 yr Hi, I am trying to perform two separate finds on two separate databases from within one php script. It works, but itermittently I get the message: Error: unable to open file displayed in the browser. If I refresh it normally disappears. If I strip the code down to just perform one find on one of the databases it works every single time with no errors, on either of the two databases / search criteria. It just seems the combination of the two throws an occasional error. Here's the code: <?php include('Filemaker.php'); ?> Total Number of Projects <?php $fm = new FileMaker('xxxx.fp7', 'myhost', 'myusername', 'mypassword'); $findCommand =& $fm->newFindCommand('mylayout'); $findCommand->addFindCriterion('Data Storage', 'No'); $findCommand->addFindCriterion('Customer', 'xxx'); $result = $findCommand->execute(); if (FileMaker::isError($result)) { echo " Error: " . $result->getMessage() . ""; exit; } else { echo ''.$result->getFoundSetCount();''; } ?> Total Number of Lines <?php $fm = new FileMaker('yyy.fp7', 'myhost', 'myusername', 'mypassword'); $findCommand =& $fm->newFindCommand('mylayout'); $findCommand->addFindCriterion('current', 'yes'); $result = $findCommand->execute(); if (FileMaker::isError($result)) { echo " Error: " . $result->getMessage() . ""; exit; } else { echo ''.$result->getFoundSetCount();''; } ?> Any ideas anyone? In advance, many thanks. Simon
August 8, 200817 yr Not really... maybe server is underspec? But depending on how often you get it you may just want to put in a refresh button for the user to hit e.g. if( FileMaker::isError($result) ){ if( $result->getCode() == 802 ) echo " Our server is currently experiencing high traffic. Please click here to try again in a moment"; else echo " Error: " . $result->getMessage() . ""; }
September 1, 200817 yr Author Thanks for your reply. I think that will have to be the answer for now. Sorry for the delay in this reply also.
Create an account or sign in to comment