Date:  10/23/2012 06:49:21 PM Msg ID:  004537
From:  FoxWeb Support Thread:  004244
Subject:  Re: show_channels.fwx and malformed header
I am REALLY perplexed by the fact that you would be seeing different output from foxweb.exe on the two versions of the OS. Originally I suspected that the header was missing altogether and that the Web server is simply more finicky on Windows 2008 R2. Please send us copies of FoxWebEXE.html and FoxWebEnv.text from the two environments, when you get a chance.
 
Inserting a batch file between the Web server and the CGI module to manually add the header is a serviceable workaround. A better solution would be to switch to IIS, because this would allow you to utilize FoxWeb's ISAPI module, which is more efficient than the CGI module.
 
FoxWeb Support Team
support@foxweb.com email
Sent by Dan Rutz on 10/19/2012 08:27:34 PM:
      I wrote a batch file called FoxWebEXE.bat which contains two lines:
          FoxWeb.exe > FoxWebEXE.html
          SET        > FoxWebEnv.text
     and I placed this batch file on the servers in the cgi-bin folder next to FoxWeb.exe.
 
     I called this batch file from my laptop web browser using the URL:
          [ip_address]/cgi-bin/FoxWebEXE.bat/show_channels.fwx
 
     On my Server 2003 R2 system the resulting FoxWebEXE.html file contained:
          Content-type: text/html
     followed by two new-line characters followed by:
          <html><head>
     and the rest of a properly formatted html response.
 
     However, on my Server 2008 R2 system the resulting FoxWebEXE.html file began with:
          <html><head>
     and the rest of a properly formatted html response, but it lacked the header information.
 
     Can you think why this might be the case?
 
     I tried configuring Apache to add the needed header but I may have done it wrong or it may be that Apache configuration can only add a header to what is returned from Apache to the browser and that what is needed is a header from FoxWeb.exe to Apache.
 
     I'm thinking of writing a Python script to sit between Apache and FoxWeb.exe (much like the batch file) and to use this to return "Content-type: text/html" plus two new-line characters plus whatever FoxWeb.exe returns.
 
     IIS may be an option for us as well.
Sent by FoxWeb Support on 08/06/2012 08:42:18 PM:
You are using the correct version. I'm guessing that you are experiencing a compatibility issue between Apache and this particular FoxWeb function. I am surprised, but only a little bit, because our Apache users are almost non-existent. These days it's extremely rare to see a Windows server non running IIS.
 
There was a time when IIS was not quite mature enough and administrators found Apache for Windows to be an adequate replacement. The situation changed about 10 years ago and, by now IIS is extremely secure, stable and performant.
 
Your server log indicates some sort of problem with the response header, but does not provide any other details. Is it possible to turn on a more verbose logging mode?
FoxWeb Support Team
support@foxweb.com email
Sent by Dan Rutz on 08/06/2012 07:59:06 PM:
      I'm using FoxWeb.exe 4.0.0.0. Is this the current version?
 
     Sorry for the long delay--we now have a 17-month-old girl.
Sent by FoxWeb Support on 03/15/2011 08:47:38 PM:
Congratulations on the new baby! I hope all is well.
 
I'm wondering whether there's a mismatch of components. Are you using the ISAPI or CGI module (foxweb.dll vs. foxweb.exe)? Whichever one you are using, can you check the version number? Is it possible that your Apache configuration is still associating the .fwx extension with an older version of the FoxWeb modules?
 
FoxWeb Support Team
support@foxweb.com email
Sent by Dan Rutz on 03/15/2011 04:18:00 PM:
     Thank you for such a great product!!

     In testing FoxWeb 4.3 with VFP 9 on Server 2008 R2, I'm having a problem getting show_channels.fwx to work. System Info, Error Log, Compile Scripts and Run VFP Code all work fine but when I try Channel Status, the following is displayed:

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, ORR.QueryManager@noaa.gov and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.

     And the Apache (2.2.17) log shows:

[Mon Mar 14 18:58:11 2011] [error] [client 161.55.65.3] malformed header from script. Bad header=<html><head>: FoxWeb.exe, referer: http://161.55.65.26/cgi-bin/FoxWeb.exe/fwAdmin.fwx?AdminScript=menu
     I can see the channels application when I'm logged in to the server (and not running as a service), so that part works. I can even see show_channels2. Just not show_channels. And all my web applications work the just as well on this test server as they do on our current 2003 R2 production server. I just can't monitor channels from a browser.

     Also, I've got another test server running 2008 Standard and show_channels.fwx works fine there.

     Oh, and we're having a baby so I won't be back on this forum until 3/21.

Thank you,

Dan