View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
I do not have access to iPlanet, but did manage to get access to an old Netscape Server.  After some experimentation, I managed to get script mapping going on this server.  The way to do this is to use the Shell CGI feature of the server:
1. Define your FoxWeb Program Root as a Shell CGI directory.  This is done in the Programs\ShellCGIDirectory part of the admin application:
Prefix: FoxWeb
Shell CGI Directory: c:/Program Files/FoxWeb/Progs
2. Define the fwx extension as a magnus-internal/shellcgi content type in your Web server's MIME types:
Category: type
Content-Type: magnus-internal/shellcgi
File Suffix: fwx
3. Associate the fwx extension with foxweb.exe in Windows.  The easiest way to do so is to double-click on an fwx file.  By default fwx files are not associated with any applications, so Windows will display the 'Open with...' dialog.  Select 'Other...' and point to foxweb.exe in your CGI directory.
To call fwx files, simply use a URL, such as http://servername/foxweb/show_cgi.fwx.  It's possible to configure your server, so that you can place fwx files in the root directory, but this may be dangerous if you are not careful.

FoxWeb Support Team
support@foxweb.com email

Sent by David Hempy on 03/25/2004 12:28:57 AM:


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:
http://edit-dl.ket.org/cgi-pub/foxweb.exe/hi.fwx
 
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:
http://edit-dl.ket.org/temp/hi.fwx 
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:
type=magnus-internal/foxweb-script exts=fwx

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:
        http://edit-dl.ket.org/temp/hi.fwx 
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,
-dave