simonr Posted August 7, 2008 Posted August 7, 2008 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
Genx Posted August 8, 2008 Posted August 8, 2008 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() . ""; }
simonr Posted September 1, 2008 Author Posted September 1, 2008 Thanks for your reply. I think that will have to be the answer for now. Sorry for the delay in this reply also.
Recommended Posts
This topic is 6179 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now