Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Error: Unable to open file

Featured Replies

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

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...
  • 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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.