Gossamer Forum
Home : Products : DBMan : Installation :

Installation in different directories

Quote Reply
Installation in different directories
Hiya. I'm trying (somewhat unsuccessfully) to install dbman on my ISPs server. They allow the installation of cgis, but want all data files to live in the users' directory. Can anyone recommend a good/required structure for everything? Ideally, i'd have as much info in my directory as possible, so I don't have to bug them to install the files everytime I make a change. Anywho, here is what I was trying to do:

/cgi-bin/auth.pl
/cgi-bin/html.pl
/cgi-bin/db.cgi
/cgi-bin/default.cfg

/home/mydir/db/default.count
/home/mydir/db/default.log
/home/mydir/db/default.pass
/home/mydir/db/default.db

Then, I modified default.cfg to point to all the correct files ($db_script_url, $db_file_name, $db_id_file_name, $auth_dir, $auth_pw_file, $auth_log_file).

Any chance this is gonna work?

Quote Reply
Re: Installation in different directories In reply to
If you have set the full paths to the files, it should work. If it doesn't give me a holler. Smile

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Installation in different directories In reply to
I'm hollering! =)

Maybe you can help me with two related questions...

1) db.cgi seems to rely on all the default.whatever files. When I create a new db, can it live somewhere besides /cgi-bin? For example, would something like this be valid:

http://server/cgi-bin/db.cgi?db=/some/path/to/db

2) If the above is true, can db.cgi be tweaked so it is the only file in cgi-bin? Everything but the default.cfg is defined within default.cfg, so I'm guessing that isn't a problem--except for the cfg itself. I tried changing line 41, like so:

41: $in{'db'} ? ($db_setup = $in{'db'}) : ($db_setup = '/some/path/to/default');

I couldn't get this to work, but should/could it?

Thanks again!

Quote Reply
Re: Installation in different directories In reply to
In Reply To:
would something like this be valid:
http://server/cgi-bin/db.cgi?db=/some/path/to/db
I'm afraid not. I was thinking that you might be able to put all of your .cfg files in a separate directory, which you could then define within the db.cgi script. But I'm not sure that will work either, since the .cfg file is a Perl script. It might, though.

Give it a try. Move (or copy) your .cfg file to another directory and set the path to that directory in db.cgi --

require "/path/to/$db_setup.cfg"; # Database Definition File

I have no idea whether it will work or not, but there's only one way to find out! Wink

I think the above has a better chance of working than what you tried, but I applaud you for trying!!! Smile

I'm not sure about whether the auth.pl and html.pl files can be in different directories. Again, because they are Perl scripts, they may need to be in the cgi-bin.

I would try it with the .cfg file first. If that works, then move the html.pl file. If that works, you'll need to change the line that "requires" the auth.pl file to be similar to the line above.



JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Installation in different directories In reply to
Ok, I tried all possible ways and here's the one that worked:

1) In the "File and URL's" of the .cfg file:
Remove "$db_script_path ." from

Full Path and File name of the database file.
Full path and file name of the counter file.
Full path and file name of the password file.
Full path and file name of the log file.
Full path and file name of the html routines.

IMPORTANT:
Leave the "Full path and file name of the authorization directory." without changes.

2) Put the .cfg file in the same directory where the db.cgi resides.

3) Cross your fingers :-)

4) Launch your browser and try the db.cgi URL with your "newdirectory" database.

I hope that helps.

Regards

Felipe Huicochea