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.

format file not found - even though it should be..

Featured Replies

Hi everyone,

This one is very very weird.

I'm using FileMaker unlimited on one of the computers at our office to share out databases to the web.

Then to protect the fact that we are using FileMaker as our database and the location of our web server I include all the filemaker data using PHP.

A basic technique but I think it stops most people prying.

So what I do in PHP is...


<?php

include("http://db.ourdomain.com:591/FMPro?-DB=OURDB&-Format=..proshow2004entrants.html etc");

?>

But I keep getting format file not found errors.

I have the filemaker web folder shared out over our network so that a few of us who are developers can edit the format template files.

I have all the format files organised into sub folders and using the syntax ..subfolderformatfile.html in the url seems to work and data is successfully included on other pages where I use this method.

Apart from in this case!

I'm getting format file not found errors (just coming up on my PHP page as a load of javascript errors obviously)

The format file is there, and recognised as if I type the include string into the address bar of my browser it works fine.

So I've checked my page source, checked that it works without the PHP so I decide to check the filemaker unlimited access and error logs.

The error log isn't too helpful. Just tells me 'format file not found'

The access log is very useful as it tells me the exact reason as to why the format file isn't found.

Somehow my PHP include has mangled the

&-Format=..proshow2004worldentrants.html

into

&-Format=..proshow

  • Author

I could understand if it was some kind of weird character set problem or something, but it works fine on other template files (albeit included from a different domain).

Any ideas?

You can try using the slashes in the conventional url form:

<?php

include("http://db.ourdomain.com:591/FMPro?-DB=OURDB&-Format=../proshow/2004entrants.html etc");

?>
You could also try the "urlencode()" and the "urldecode()" functions to see if they return the proper URL. For example:


<?php

include(urlencode("http://db.ourdomain.com:591/FMPro?-DB=OURDB&-Format=..proshow2004entrants.html etc"));

?>

Good Luck.

Garry

  • Author

Hi

Tried that and I now get an include error in my PHP...


Warning: main(http%3A%2F%2Fdb.domain.com%3A591%2FFMPro%3F-DB%3DTEST+DATABASE%26-Lay%3DFRONT%26-Format%3D..%5Cproshow%804world-registryresults.html%26-SortField%3DSHOP+NAME%26-SortOrder%3Dascend%26-Max%3DAll%26-Skip%3D0%26-FindAll): failed to open stream: No such file or directory in /files/home1/dealerworld/proshow/content/registry.php on line 24

I'm assuming that the %80 in the -Format path is the Euro

I strongly suggest that you use "/" instead of "". As "" is part of a Windoz file path and not part of a URL path!

Garry

  • Author

I thought that it didn't matter in the path to the format file.

The reason I use a is so that it's easy to pick out the -format and -error bits of the string quickly.

It works with other folders as I've been doing it for over a year.

I think it's pretty weird how it doesn't work in this case.

I'll try that tomorrow though.

Thanks

Ben

I think the problem may also be caused by the "..". I believe that you may need the full path from the FMP root. Generally the ".." would be fine if you were directly replacing one Format file with another; however, that relativity may be lost by using a PHP script in the "middle".

All the best.

Garry

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.