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.
Mar 31, 1999, 8:26 PM
Veteran / Moderator (8669 posts)
Mar 31, 1999, 8:26 PM
Post #2 of 6
Views: 745
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
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
Apr 1, 1999, 8:07 AM
Veteran / Moderator (8669 posts)
Apr 1, 1999, 8:07 AM
Post #4 of 6
Views: 769
It's been a while since I installed Xitami, so I'm working from a fading memory. I hope this is right.
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
$username = $ENV{'REMOTE_USER'} | | $ENV{'AUTH_USER'};
}
else {
($userid =~ /^([A-Za-z0-9]+)\.\d+$/) ? ($username = $1) : return (0,0,0,0,0);
}
to
# $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.
------------------
JPD
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.
------------------
JPD

