Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5918 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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() . "";

}

  • 4 weeks later...

This topic is 5918 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.