Gossamer Forum
Home : Products : DBMan : Customization :

Run DBman offline?

Quote Reply
Run DBman offline?
Anyone know how I could run the cgi offline? I thought it would be as simple as pointing the locations to the right places on my computer, but when I bring it up in Netscape all I get is the text file. In IE 5 it asks for the application type to open it with. Any ideas? Thanks in advance.
Quote Reply
Re: Run DBman offline? In reply to
You need to get server software on your computer. There are a number of free server programs available for download. The one I had most luck with was Xitami, which you can get at http://www.imatix.com/

Other people use Personal Web Server (from Microsoft) and Apache (you can find the site from Yahoo or a million other places).

You'll also need to have Perl on your system. Download ActivePerl from http://www.activestate.com/


------------------
JPD





Quote Reply
Re: Run DBman offline? In reply to
JPDeni, thanks! I downloaded the Xitami, now what? I tried following running the script from my browser after installation, and got the same message? I've already got the latest pearl.
Quote Reply
Re: Run DBman offline? In reply to
It's been a while since I installed Xitami, so I'm working from a fading memory. I hope this is right. Smile

Put your DBMan files in the cgi-bin that's within the Xitami directory. In default.cfg, change your $db_dir_url to

http://127.0.0.1/cgi-bin/dbman

(assuming your DBMan files are in a directory called "dbman")

Set $db_use_flock to 0. ("flock" won't work on Windows.)

In your auth.pl file, sub auth_check_password, comment out

my ($server_auth) = $ENV{'REMOTE_USER'} | | $ENV{'AUTH_USER'};

Also in auth.pl, sub auth_check_permissions

Change

Code:
if ($ENV{'REMOTE_USER'} | | $ENV{'AUTH_USER'}) {
$username = $ENV{'REMOTE_USER'} | | $ENV{'AUTH_USER'};
}
else {
($userid =~ /^([A-Za-z0-9]+)\.\d+$/) ? ($username = $1) : return (0,0,0,0,0);
}

to

Code:
# if ($ENV{'REMOTE_USER'} | | $ENV{'AUTH_USER'}) {
# $username = $ENV{'REMOTE_USER'} | | $ENV{'AUTH_USER'};
# }
# else {
($userid =~ /^([A-Za-z0-9]+)\.\d+$/) ? ($username = $1) : return (0,0,0,0,0);
# }

In other words, just leave the line that starts with ($userid =~ .

These last things are because of the way Xitami does server authentication.

You might need to change the "path to perl" in the first line of db.cgi. Or, if you have perl.exe associated with the .pl extension, just change the name of db.cgi to db.pl

In your browser "Location" window, enter

http://127.0.0.1/cgi-bin/dbman/db.cgi

(or db.pl)

Let me know what happens. Smile

------------------
JPD





Quote Reply
Re: Run DBman offline? In reply to
Well, I am finally showing something; although its not expected. Now I get a message that says that url does not exist on this web site????? Any ideas?
Quote Reply
Re: Run DBman offline? In reply to
I'm really hoping some other Xitami user will happen by. I'm really not much of an expert on this.

Maybe going to the Xitami site and asking will help.


------------------
JPD