View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
 
I followed your suggestion, with encouraging results. I created compile.fwx, which lists the index files, and calls CompileBatch().  Here is that file:
 
<html>
<body>
<h1>.fwx comile tester</h1>
<h2>Current Time: <%= datetime() %> </h2>

<p>Files matching "index.*": </p>
<ul>
<%
   
    m.count = ADIR(aFileList, "index.*")
   
    for m.i = 1 to m.count
    %>
    <li> File: <%= aFileList(m.i, 1) %>: <%= aFileList(m.i, 2) %> bytes; modified: <%= aFileList(m.i, 3) %> <%= aFileList(m.i, 4) %> Attribs: <%= aFileList(m.i, 5) %> </li>
    <%
    endfor
   
%>
</ul>

<p>Compiling index.fwx with fwCompile:</p>

<%
    fwCompile.Force = .T.
    fwCompile.Encrypt = .T.
    fwCompile.HidePaths = .F.
    fwCompile.ErrorStatusPrefix = '<font color="red">'
    fwCompile.ErrorStatusSuffix = '</font></br>' + CHR(13) + CHR(10)
    fwCompile.FileStatusPrefix = ''
    fwCompile.FileStatusSuffix = '</br>' + CHR(13) + CHR(10)
    Response.Buffer = .T.
    fwCompile.CompileBatch(".", .F.)
    Response.Write('<br>Total files compiled: ' + ;
        Server.ToString(fwCompile.FileCount) + LF ;
        + '<br>Total Errors: ' + Server.ToString(fwCompile.Errors.Count) + LF)

   
%>

<p>Files matching "index.*": </p>
<ul>
<%
   
    m.count = ADIR(aFileList, "index.*")
   
    for m.i = 1 to m.count
    %>
    <li> File: <%= aFileList(m.i, 1) %>: <%= aFileList(m.i, 2) %> bytes; modified: <%= aFileList(m.i, 3) %> <%= aFileList(m.i, 4) %> Attribs: <%= aFileList(m.i, 5) %> </li>
    <%
    endfor
   
%>
</ul>

</body>
</html>

 
 
 
After some tinkering, it was recreating the index.fxp file (but not index.prg, FWIW) with each hit, such as this:
 
 
 

.fwx comile tester

Current Time: 2008/03/19 20:51:23

Files matching "index.*":

  • File: INDEX.FWX: 5143 bytes; modified: 2008/03/19 19:07:56 Attribs: .A...
  • File: INDEX.FXP: 11332 bytes; modified: 2008/03/19 19:08:00 Attribs: .A...
  • File: INDEX.PRG: 13749 bytes; modified: 2008/03/19 19:08:00 Attribs: .A...

Compiling index.fwx with fwCompile:

c:\ket\jubilee_testing\about.prg
c:\ket\jubilee_testing\archive_video.prg
Error while compiling c:\ket\jubilee_testing\compile.prg: File cannot be closed because outstanding references exist. (1184)
c:\ket\jubilee_testing\guest.prg
c:\ket\jubilee_testing\guest_list.prg
c:\ket\jubilee_testing\index.prg
c:\ket\jubilee_testing\program.prg
c:\ket\jubilee_testing\test.prg
c:\ket\jubilee_testing\upcoming.prg
c:\ket\jubilee_testing\upcoming2.prg

Total files compiled: 9
Total Errors: 1

Files matching "index.*":

  • File: INDEX.FWX: 5143 bytes; modified: 2008/03/19 19:07:56 Attribs: .A...
  • File: INDEX.FXP: 11364 bytes; modified: 2008/03/19 20:51:24 Attribs: .A...
  • File: INDEX.PRG: 13749 bytes; modified: 2008/03/19 19:08:00 Attribs: .A...
 
 
Of course, we're not concerned about compile.fwx not compiling while it is executing...that would be asking a lot! ;-)
 
So things appear to be working now.
 
I then edited index.fwx and hit it directly in the browser.  For the first time in over a week (spanning at least one reboot), it auto-generated as it is supposed to.  I have not been able to get it to fail since.  
 
At this point, I'm not sure if something about CompileBatch cleared some blocking issue, or some external issue happened to get resolved around the same time.  Regrettably, I failed to confirm the normal behavior was broken today prior to this test, so I do not know how the timing of this test and the end of the problem relate.  
 
I will keep an eye out for any future occurrances of this issue.  If it occurs again, I will test more thoroughly and follow up to this forum.  If anyone else runs into this problem, consider running the code listed above...and please reply to this thread with your observations and results.
 
 
-dave
 
--
David Hempy
Internet Database Administrator
Kentucky Educational Television
(859)258-7164 - (800)333-9764
Sent by FoxWeb Support on 03/17/2008 06:58:41 PM:
The first thing I would do is test the hypothesis that FoxWeb is unable to see index.fwx.  To do so, you could write a FoxWeb script (with a name other than index.fwx) that tries to access index.fwx the same way that FoxWeb does.  FoxWeb uses the ADIR function with an extension of * to find all files that match the script name.  For example, in your case you would run:

ADIR(aFileList, "index.*")

You could then traverse the array to find out whether index.fwx is visible to FoxWeb channels.  If the file is visible, you could even try to compile it with the fwCompile object to see if there are problems in the compilation process.
FoxWeb Support Team
support@foxweb.com email