Jump to content
Server Maintenance This Week. ×

Server Side scripts suddenly stopped working


infoweb

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

Recommended Posts

Hi there,

 

I have a bit of a challenging issue.

 

A few days ago all server side scripts stopped working in our file.

 

We have about half a dozen user triggered server side scripts and they all suddenly stopped working. When they are executed the scripts hangs and I have to restart filemaker.

 

Here is what I have tested so far:

 

Created a new table, with 1 field: timestamp

 

created a new server side script that does the following:

 

Goes to the layout

Creates a new record

set field timestamp with the current timestamp

Commits the record

 

the result of running this is that FM13 hangs - no new record created.

 

The Next thing I did was  to create a completely new file with a different name, create the same table and field, imported the script, uploaded it to the server and tried running the server side script in the new file and it worked - so server issue is ruled out.

 

Next, I download the problem file - Performed a recovery, cloned it, re-upload the cloned version with 0 records and tried the script again - FM hung again - so the issue seems file specific.

 

Next I tested the same script running locally on problem file - it worked.

 

so the issue only seems to occur in the problem file when running on the server  - the script will run perfectly when the problem file is run local and it runs perfectly when duplicated in another file on the server.

 

Is there some setting that I or someone else may have changed that could be stopping the script from running on the server in this file?

 

At a loss for what to try next...

 

I have 37 tables, heaps of scripts and around 10,000 plus records that I would have to recreate if I had to start from scratch, so really would like to fix my existing file...

 

Any suggestions?

Link to comment
Share on other sites

Hi there,

 

Ok I found the issue, I have a script that runs the first time a file is opened that requires user input - it seems for some reason this is also triggered everytime I execute PSOS

 

any suggestions on how to skip this script step?

 

I have tried using get (systemplatform) within an "if" statement but that doesn't seem to work. 

 

Any suggestions on how I can avoid running the start up script when executing PSOS?

 

Mark

Link to comment
Share on other sites

Thanks Wim,

 

I used a custom function I found on a site called IsRunningOnServer which returns 1 when running on server.

 

PatternCount ( Get ( ApplicationVersion ) ; "Server" )

 

As you suggested I'm using that to skip any server incompatible steps.

 

Thanks for the suggestion.

 

This seems to have solved the problems.

Link to comment
Share on other sites

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