THE SHORT OF IT:
How can I get .fwx files in the web root to work with Netscape Enterprise server?
THE LONG OF IT:
I've got about eight years of legacy FoxWeb applications that run fine and dandy with FoxWeb 1.29a under the server formerly known as Netscape Enterprise Server (then called Sun One and currently called iPlanet 6.0...can't wait to see what it's called next).
Anyway, I'm trying to upgrade to FoxWeb 2.x (2.6 to be exact) so that I can use .FWX files in an .asp kind of way. I specifically need them to work within the web root, with "normal" URL's. That is, no /cgi-, no foxweb.exe, etc. In a nutshell, I need a static .htm file in the same directory needs to cross-link back and forth with the .fwx file using only relative links.
I've got FW 2.6 installed on our development server, and my old programs work just fine, with URL's like /cgi-pub/foxweb.exe/Gradebook@/db/pub/pub?courseid=LT1Y (Well...there are a few things that I need to change, but only because I was being sloppy with v1.29...those issues I know I can fix, so that's not the subject of this inquiry)
Now that I'm trying to get the .fwx files to work. I have gotten them to work under the FoxWeb Program root, as shown here:
However, I have been unable to get .fwx files in the web root to work, which is my critical need. Here is an example, which has the exact same code as the link above:
Initially, this sent to the browser that file verbatim, without evaluating the dynamic bits. You could view source in the browser and see the FoxWeb code in the <%...%> tags. (but this changed later...read on)
So some of the things I've tried in various combinations:
I've turned on "Use Web Server's directory mappings." No improvement.
The FW docs talk about how to associate .fwx files with foxweb.exe (or .dll) for other web servers, but doesn't describe how to set this up for Netscape Enterprise (aka iPlanet / SunOne). So I took a stab at it, adding the following lines to three config files:
Added to mime.types:
Added to obj.conf:
Service method="(GET|POST)" type="magnus-internal/foxweb-script" fn="FoxWeb"
Added to magnus.conf:
Init fn="load-modules" shlib="d:/cgi/pub/FoxWeb.dll" funcs="FoxWeb"
These changes are largely modelled on how I had to change the files to install PerlEx. (a perl accelerator with .asp style templates) I'll admit I made up the mime-type "magnus-internal/foxweb-script" and the function name "FoxWeb" without fully understanding the entire situation. I'm not sure if that's kosher or not.
So this is promising...at least now I get a 500 server error when I hit my page in the web root:
Before I only got the text file. The web server log reports:
[25/Mar/2004:02:44:20] config ( 1692): for host 192.168.1.120 trying to GET /temp/hi.fwx, func_exec reports: cannot find function named FoxWeb
So at least now the web server knows that .fwx files are special, but is having a hard time connecting the file to foxweb.dll . That's an improvement.
I also tried changing foxweb.dll to foxweb.exe in magnus.conf:
Init fn="load-modules" shlib="d:/cgi/pub/FoxWeb.exe" funcs="FoxWeb"
This was worse, as the server wouldn't even start up:
[25/Mar/2004:02:54:10] failure ( 736): Configuration initialization failed: Error running init function load-modules: dlsym for FoxWeb failed (The operation completed successfully.
Going back to FoxWeb.dll, I looked at the funcs="FoxWeb" a bit closer. In the case of PerlEx, the line I was emulating was:
Init fn="load-modules" shlib="d:/perl/bin/PerlNSEX.dll" funcs="PerlService"
Looking at PerlNSEX.dll in hex editor, I *think* PerlService is a function available in that .dll. (I'm way out of my league here, but I'm desperate!) That would explain why me making up the function name "FoxWeb" would be useless. Again, I'm just guessing at this point.
So I've just about run out of ideas. I really, really, really want to upgrade from FW v1.29 to v2.x. In fact, we purchased four license upgrades a year ago...I don't recall exactly why I didn't actually upgrade FoxWeb at the time...I either ran into some of these snafus, or simply got pulled off in other directions and let it slide off the back burner. Anyway, my need is now pressing, and getting these .fwx files to work will really fit a dire need I have right now.
Can anyone shed any light on my problem?
Thanks for reading this far,