Gossamer Forum
Home : Products : DBMan : Installation :

Changing name of default.cfg

Quote Reply
Changing name of default.cfg
When I leave default.cfg as is, dbman works fine, even if I put ?=anything after the db.cgi in the browser. If I rename default.cfg, then I get an internal server error if I put ?=newname after db.cgi and of course ?=default doesn't work either. If I go back to default.cfg all is well again. I can't get a debug message, which presumably means that db.cgi isn't finding newname.cfg. Any ideas? Thanks.Tony.
Quote Reply
Re: [tbalazs] Changing name of default.cfg In reply to
Although others haven't reported a need to do so, I've found that anytime I rename my default.cfg I've had to go into db.cgi and change:

$in{'db'} ? ($db_setup = $in{'db'}) : ($db_setup = 'default');

to

$in{'db'} ? ($db_setup = $in{'db'}) : ($db_setup = 'newname');

see if that helps any.

also make sure you use: ?db=newname

Last edited by:

Watts: Aug 9, 2002, 10:20 AM
Quote Reply
Re: [tbalazs] Changing name of default.cfg In reply to
Are you also including the newname in the following line in your .cfg file?

$db_file_name = $db_script_path . "/newname.db";

I always rename all my files, but find it works best to rename all the files to match the name of the .cfg file such as the db, count, and log files.

I believe it looks for the database file name to be the same as the name of the .cfg file.

I've never had to make the change in my db.cgi file in over 100 databases.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Changing name of default.cfg In reply to
Thank you both very much. The weird thing is that the first time I changed the name of default.cfg everything was OK. I did change
$db_file_name = $db_script_path . "/newname.db";
but the script still didn't work this last time. I know the first time I renamed the cfg file successfully I didn't alter db.cgi, but I will try it.
Tony.
Quote Reply
Re: [tbalazs] Changing name of default.cfg In reply to
When the config file has been renamed, you need to identify the db name in the url.

http://yourdomain.ext/.../to/db.cgi?db=dbname (where dbname = config file name)



~ Karen
Quote Reply
Re: [Karen] Changing name of default.cfg In reply to
Unsure well it's all a bit odd coz I have tried all your suggestions and the thing still only works with all files called default. What's weirder is that the first time I tried renaming it worked fine. Oh well. Thank you for your help.