Date:  09/11/2007 04:28:49 AM Msg ID:  003503
From:  galhome152 Thread:  003501
Subject:  Re: control when scripts are compiled
 Silly me, found out the problem, which was my own doing.
Foxweb seems to be compiling using the same rule as VFP i.e. if the .prg/fwx is newer than the .fxp then compile. However, if there is a time difference between the development machine and the server (say the development machine is several hours ahead of the server) then .prg/fwx will continue to be newer than the .fxp even if Foxweb compiles it on the server.

This file time difference is not an issue if the .prg/fwx files are uploaded using FTP, because the uploaded files will be saved under the server date and time. However, if you zip up the .prg/fwx files, upload and then unzip, the files will be date timed as per the local development machine rather than the server date time. This then introduces the recompilation problem.

Panic now over :-)

Sent by galhome152 on 09/11/2007 03:23:52 AM:


I have tried to see if this problem has been raised in the forum, and check the documentation, but could not find the answer to my problem.

I am running the Foxweb 3.5.1 as a service on IIS6. It works fine apart from the following problem :

In fw_enter.prg I issue :
SET PROCEDURE TO [some path]\main.prg

main.prg is a big file containing all my procedures and functions. These procedures/functions are called from various foxweb scripts on my site.

This works perfectly fine in a single user environment, but causes errors in a multi-user environment.

The problem is that main.prg is recompiled each time fw_enter.prg is run. The error appears whenever several people call a script at the same time, and hence fw_enter.prg is run at the same time, and therefore main.prg is recompiled at the same time, and ultimately Foxweb tries to create main.fxp at the same time for several different people.

The error is :

Error #: 102
Message : Cannot create file [some path]\main.fxp
Program : [some path]\fw_enter.fxp
Line #: 19
Line : SET PROCEDURE TO "[some path]\main.prg"

The solution is simple - switch off automatic compilation. The problem is that I cannot find any way to do so in Foxweb 3.5.1. Help!