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.
Aug 9, 2002, 10:17 AM
Veteran (1141 posts)
Aug 9, 2002, 10:17 AM
Post #2 of 6
Views: 4898
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
$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
Aug 9, 2002, 11:49 AM
Veteran / Moderator (3034 posts)
Aug 9, 2002, 11:49 AM
Post #3 of 6
Views: 4910
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/
$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/
Aug 9, 2002, 1:27 PM
Novice (14 posts)
Aug 9, 2002, 1:27 PM
Post #4 of 6
Views: 4902
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.
$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.
Aug 12, 2002, 12:04 AM
Enthusiast / Moderator (885 posts)
Aug 12, 2002, 12:04 AM
Post #5 of 6
Views: 4901
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
http://yourdomain.ext/.../to/db.cgi?db=dbname (where dbname = config file name)
~ Karen