Gossamer Forum
Home : Products : DBMan : Installation :

Hosting Server Rules Issue

Quote Reply
Hosting Server Rules Issue
Hello again everyone - another slight problem.

I have managed to upload and run all aspects of the default DBman in the cgi-bin on my UNIX hosting server with no problems, apart from file locking which must be switched off.

I phoned the hosting server helpline and they have told me that the CGI script should be in the cgi-bin directory, but the data files (default.db, etc.) should be in a separate directory called cgi-files - the root directory has the following directories:

docs
cgi-bin
cgi-files
logs
private
sounds

Any suggestions on configuring the db.cgi and default.cfg to ensure the correct path would be greatly appreciated?

Tried searching threads and the FAQ site but no luck!

Thanks in advance.

Keef


Quote Reply
Re: Hosting Server Rules Issue In reply to
I've never done this before, so I'm not absolutely certain. However, let's give it a try, shall we? Smile

I think you should be able to set up your .cfg file like

Code:

# URL of the directory dbman resides in. No Trailing Slash Please.
$db_dir_url = "http://server/cgi-bin";
# URL of dbman.
$db_script_url = $db_dir_url . "/db.cgi";
# Full Path and File name of the database file.
$db_file_name = $db_script_path . "../cgi-files/default.db";
# Full path and file name of the counter file.
$db_id_file_name = $db_script_path . "../cgi-files/default.count";
# Full path and file name of the authorization directory.
$auth_dir = $db_script_path . "../cgi-files/auth";
# Full path and file name of the password file.
$auth_pw_file = $db_script_path . "../cgi-files/default.pass";
# Full path and file name of the log file.
$auth_log_file = $db_script_path . "../cgi-files/default.log";
# Full path and file name of the html routines.
require $db_script_path . "../cgi-files/html.pl";
I think that's right. Give it a shot and see if it works. If not, we'll try something else. Smile

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Hosting Server Rules Issue In reply to
Many thanks for the reply - I've tried this one but no luck. I have debugging switched on in the default.cfg file but the error message asks me to switch it on - it seems that it maybe can't find default.cfg?

Do I have to do anything with the $db_script_path in the db.cgi file?

If db.cgi is where it all starts, there seems to be no route
from there to the default.cfg file in the 'cgi-files' directory?

Keef

Quote Reply
Re: Hosting Server Rules Issue In reply to
Just another thought for your consideration and advice?

As the default.cfg file is never 'written to' I could maybe install it along side db.cgi in the cgi-bin and ensure that the path to the other files is as per your previous message.

I'll give it a try and get back to you.

Keef

Quote Reply
Re: Hosting Server Rules Issue In reply to
Cracked it, but it did take some time, although it does seem logical when you find the solution!

Here it is:

db.cgi - change $db_script_path to:
# If you run into problems, set $db_script_path to the full path
# to your directory.
$db_script_path = "/cgi-files/dbman";


default.cgi - change to:
# URL of the directory dbman resides in. No Trailing Slash Please.
$db_dir_url = "/cgi-bin/dbman";
# URL of dbman.
$db_script_url = $db_dir_url . "/db.cgi";
# Full Path and File name of the database file.
$db_file_name = $db_script_path . "/default.db";
# Full path and file name of the counter file.
$db_id_file_name = $db_script_path . "/default.count";
# Full path and file name of the authorization directory.
$auth_dir = $db_script_path . "/auth";
# Full path and file name of the password file.
$auth_pw_file = $db_script_path . "/default.pass";
# Full path and file name of the log file.
$auth_log_file = $db_script_path . "/default.log";
# Full path and file name of the html routines.
require $db_script_path . "/html.pl";

I kept 'db.cgi' and 'default.cfg' in the cgi-bin directory and all the other files in the cgi-files directory.

Haven't tried the 'file locking' turned back on yet, but I'll be back if I have problems - thanks again for the help and encouragement.

Keef

Quote Reply
Re: Hosting Server Rules Issue In reply to
Excellent! I forgot about loading the .cfg file. Blush

Glad you were able to work it out.

JPD
http://www.jpdeni.com/dbman/