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

FMP Server "Dupilcate" file Problem,


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

Recommended Posts

  • Newbies
Posted

I have a problem that's driving me nuts!

I created a database solution consisting of around 10 files. I do have a blank database (!MainForm.fp5) whose purpose is to link to the other files through scripts.

Everything seems to work fine if I open the database as single user using regular FMP. As I click on the various buttons, the proper files appear and minimize as expected, along with appropriate access for different passwords.

If I set the files to multi-user (Only the !MainForm file is visible, the rest are hidden.) and open them using regular FMP, they still work fine.

If I set the files to multi-user (Only the !MainForm file is visible, the rest are hidden.) and host them with FMP Server 5.5, that's where the problem lies.

The user clicks on a button in !MainForm, and executes the script GoToSample, which is

Toggle Window (Minimize)

Perform Script (Sub-Scripts, External: "Sample.fp5")

---Which happens to be the "ViewRecord" script,

which simply goes to the ViewRecords layout

This brings up the Sample screen, but it's missing records. As as administrator, I can create a record in there, but as a lower level password that should be able to create records, I can't. Remember, I only see this behavior when the files are being hosted by Server, not when I open them up directly.

OK, from here, I click on a button that runs the following script, GoToMainForm:

Toggle Window (Minimize)

Perform Script (Sub-Scripts, External: "!MainForm.fp5")

--- which is the script RunOnOpen:

Toggle Window (Zoom)

Enter Browse Mode()

Go to Layout(Refresh Window, "User Start")

Now another copy of !MainForm is opened, not the one I opened through the Hosts dialog. If I click on the Sample button, another Sample file opens, this time with the right records and file access permissions!

Now I close the database, stop the FMP Server service, reboot and bring the FMP Server service back online. I log on remotely, and open the sample file, and I see the version that has the one record that I created earlier as Admin. (I don't understand how this survived a reboot) I click on the !MainForm button, and a new copy of !MainForm opens up, I click on the sample button, and the right version of Sample opens up.

Does anyone have a clue what may be happening, because I sure don't.

Bob

P.S. Everything is running under Win2K. I have checked every item in "My Computer" for duplicate files, and have found none. Also, this is the first time I've tried to use Server.

Posted

OK, it does sound like you have duplicate files somewhere, FIND THEM.

Start by doing the following: put the files on FMServer and make sure that those are the only files with that name on you network, you local computer, the server, etc.

Also make sure that you turn OFF filesharing on the server. FMServer is a database server, NOT a file server.

Open the files by first running Filemaker Pro on your computer, then open your DBs by selecting File menu -> Open File -> Hosts.

Now see if your problems still occur.

  • Newbies
Posted

First, thanks for a quick response.

To put the answer up front, the duplicate files were on MY computer, the one I developed the database from.

My computer is new, and I didn't realize file sharing was on by default. Everytime a script was triggered on the solution computer, it was going back over the network to run the scripts from the files on my computer. When I stopped file sharing from my computer, FMP now ran the scripts in the intended files, the ones one the computer where FMP Server was running.

Thanks so much for the help. I don't know how long (if ever) it would have taken me to realize the scripts were being run on my computer.

Bob Martin

  • 4 weeks later...
Posted

I've noticed the same issue. If I've been working on dev files and have to connect to the production files hosted by FMServer, I inevitably get my local files. Even though I connected to the server hosted 'main' file, that server hosted file wants to open my local copies, e.g.,

Server

- MainFile.fp5 ## opened by Filemaker via Hosts button

- supporting_file_a.fp5

- supporting_file_b.fp5

Gray (my dev box, local)

- MainFile.fp5

- supporting_file_a.fp5 ## opened by MainFile.fp5

- supporting_file_b.fp5 ## opened by MainFile.fp5

I'd like to bump this back up for a clarification. I need to turn off my local File Sharing to prevent this from happening? Note that I've changed the local files to Single User and still get the behavior. I need to turn of File Sharing at the OS level.

So is it that local files are being searched for open first, and then files on the server that hosts the file? I'm just trying to get my arms around the role of the server and how the client interacts with it.

Thanks for the insight!

doug.

Posted

One thing to keep in mind about FileMaker Server - although the files are on the server, they are 'run' on the client so when you call to open a file, FileMaker first looks in the current active folder/directory, then it looks in the FileMaker default folder. File locations are relative to the client - NOT the server.

What I do with server based files, I 'hard-wire' the file - that is, when a script or opener file is to open a file on a server or run an external script, I specify the IP address of the server along with the file name. That way it reduces the chance that a local file will be opened by mistake. When testing files, you still need to rename any duplicate files on your local machine to ensure the correct file is being opened.

In our situation here, we have 11 FileMaker Servers and our users are spread out across the state, so for most users, the servers are not local. 'Hard-wiring' the IP address (Instead of relative address [*] location) ensures that the right file on the right server is opened.

Posted

I'm following you... And I presume you 'hardwire' by selecting the file via the 'Hosts' button in the File|Open dialogs (i.e., when choosing a file for an Open step in a script), which seems to attach an IP address to the name of the file.

I can do all that without issue, but I don't want to be hardwired to the production server in my development environment. If I'm working on local files, and I need to deploy say 12 changed files to the server, do I need to go into each file's scripts and change each Perform Script (External) step (et al) to use a hardwired file rather than a relative file? Or is it okay to use relative files so long as all those relative files were originally opened via hardwire in the main startup script (which would need to be changed for a production deployment)?

From my point of view, I would see this 'file location' information as part of a init file, which changes based on the environment (Dev, QA, Prod). So a quick script swap gets you going. Is there an equivalent? or am I approaching this problem wrong? -- I have 10 years of from-scratch code development skills I'm trying to unlearn here B)-(.

thanks! doug.

Posted

Actually, I suppose I could just have 2 startup scripts in the main file. One pointing the File|Open's to the server and one to the local, relative files.

Then just switch the startup script from Dev to Prod on deployment? This'll only work, I suppose, if the subsequent relative open's work as you would expect. Any insight?

doug.

Posted

That's exactly what I mean by 'hardwire' - specifying the IP address of the server. That way you know which file/server its pointed to. It also ignores any local copies except when the server or file is not reachable.

The down side - is when you move the application to the production server, you need to reset any file opens to the new IP address of the production server.

This method is fairly tedious for an application that has a lot of related files - but I think its worth the extra effort because I know exactly which file is opened and no surprises for the users.

(I also 'hardwire' files in this manner in 'opener' files.)

Posted

You shouldn't hard code the link to server.

Instead:

1)MacOs X

Open NetInfo Manager (applications-->utilities)

Select "machines"

Click on new and edit name of new folder to for ex. FmServer

double click on property name to edit it to "ip_address" (without quotes)

set the ip_address value to IP number of the host you are using.

Click on new (or select from menu "Directory" New property"

Set the property to "name" and it value to FmServer.

Now edit the FileMaker Hosts file (located in preferences-->Filemaker preferences) and add line

FmServer

(if you don't need any other host you could delete them).

2)MacOS Classic

Create an text file Hosts and drop it into system folder

edit the file Hosts

yourserver.yourdomain.com A <insert here the IP address>

FMServer (or whatever name you would like to use) CNAME yourserver.yourdomain.com

Edit the File Maker Host file as in OS X example

Finally open TCP/IP control pannel

Set user level to advanced or higher

The new button "Specify host file" would appear

Select the hosts file you've created

3)Windows

For windows system the procedure is almost the same:

locate the file hosts (windows/system32/drivers/etc/ on XP for other systems I'm not sure)

add the following line

[insert the real IP address of your host] FmServer

of course the above line should be inserted without brackets

Edit FMHosts.txt as in above

Dj

This topic is 8039 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.