Gossamer Forum
Home : Products : DBMan : Installation :

Internal Server Error

Quote Reply
Internal Server Error
I tried to make the default database, I get the Internal Server Error. my database is:
http://gameclan.cwihosting.com/cgi-bin/dbman/db.cgi

All the files are on 777, so you can read them.
In the db.cgi i left the URL to: ".".
my server is Unix

The config is:-------------
# File and URL's
# --------------------------------------------------------
# URL of the directory dbman resides in. No Trailing Slash Please.
$db_dir_url = "http://gameclan.cwihosting.com/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";

# Database Definition
# --------------------------------------------------------
# Definition of your database. Format is
# field_name => ['position', 'field_type', 'form-length', 'maxlength', 'not_null', 'default', 'valid_expr']

%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 255, 1, '', ''],
URL => [2, 'alpha', 40, 255, 1, 'http://', '^http://'],
Type => [3, 'alpha', 0, 60, 1, '', ''],
Date => [4, 'date', 12, 15, 1, &get_date, ''],
Category => [5, 'alpha', 0, 255, 1, '', ''],
Description => [6, 'alpha', '40x3', 500, 0, '', ''],
Validated => [7, 'alpha', 0, 3, 1, 'Yes', 'Yes|No'],
Popular => [8, 'alpha', 0, 3, 0, '', ''],
Userid => [9, 'alpha', -2, 15, 0, '', '']
);

# The column name for the database key. Can be any column, but it must be unique!
# You can't have two records with the same key value!
$db_key = 'ID';
# Track the key? Should DBMan keep a counter of the next key to use? This isn't
# neccessary if you can guarantee that your entry in the key field will be unique
# (i.e. a userid).
$db_key_track = 1;
# Database delimeter.
$db_delim = '|';
# Use file locking (1 = Yes, 0 = No). Should be used, but won't work on Win95.
$db_use_flock = 1;
# Auto generate the html forms (1 = Yes, 0 = No).
$db_auto_generate = 0;
# Display Benchmarking Information (1 = Yes, 0 = No).
# use Benchmark; # Uncomment this line if benchmarking is used.
$db_benchmark = 0;
# Display Debugging Information (1 = Yes, 0 = No).
$db_debug = 0;

# Select fields. Field name => 'comma seperated list of drop down options'.
%db_select_fields = (
Category => 'General,Configuration Management,Project Management,Process Improvement,Standards,Testing & Quality Assurance',
Type => 'Web,Newsgroup,Mailing List,FTP,Gopher'
);

# Radio fields. Field name => comma seperated list of radio buttons.
%db_radio_fields = ( Validated => 'Yes,No' );

# Checkbox fields. Field name => Checkbox value.
%db_checkbox_fields = ( Popular => 'Yes' );

# Default maximum number of hits returned in a search.
$db_max_hits = 10;
# Bold search results (1 = Yes, 0 = No).
$db_bold = 1;
# Regular and title fonts used in auto_generatrion and html.pl.
$font = 'font face="verdana,arial,helvetica" size="2"';
$font_title = 'font face="verdana,arial,helvetica" size="4"';

# Authorization Options
# --------------------------------------------------------
# No Authentication? (1 = "there is no authentication", 0 = "there is authentication")
# If you choose no authentication, then set the permissions of what
# people can do with: @auth_default_permissions below.
$auth_no_authentication = 0;

# The amount of time in seconds that user files are kept in the
# auth directory before the program removes them. 2-6 hours is
# probably a good value.
$auth_time = 21600; # 6 hours (in seconds)

# Enable (1) or disable (0) logging.
$auth_logging = 1;

# Allow a default user? This means you can specify a user via the URL
# and skip the logon process. Use this to allow people to search without
# logging on, but require log in if they want to add/modify/remove etc.
# (1 = "yes", 0 = "no")
$auth_allow_default = 0;

# Default permissions used if there is no authentication, or for a default
# user. (View, Add, Delete, Modify, Admin), 1 = enable, 0 = disable.
@auth_default_permissions = (1,1,1,1,0);

# Allow people to sign up for their own userid/passwords? They will
# recieve default permissions.
$auth_signup = 1;

# Permissions a new signup should get.
@auth_signup_permissions = (1,1,1,1,0);

# Registered users: can modify/delete _only_ own records. For this to make
# sense you should set default off or to 1,0,0,0.
$auth_modify_own = 0;

# Registered users: can view _only_ own records. For this to make sense
# you should turn off default permissions.
$auth_view_own = 0;

# Auth user field. This is the field position in the database used for storing
# the userid who owns the record. Set to -1 if not used.
$auth_user_field = 9;

# URL to send user if they chose log off. Leave blank and the script will return to
# the logon prompt (although this only makes sense if you are using authentication).
$auth_logoff = "http://www.gossamer-threads.com/scripts/dbman/";

# ===========================================================================
# Build up some variables from your definitions. Internal use only.
foreach (sort { $db_def{$a}[0] <=> $db_def{$b}[0] } keys %db_def) {
push (@db_cols, $_);
$db_sort{$_} = $db_def{$_}[1];
$db_form_len{$_} = $db_def{$_}[2];
$db_lengths{$_} = $db_def{$_}[3];
$db_not_null{$_} = $db_def{$_}[4];
$db_defaults{$_} = $db_def{$_}[5];
$db_valid_types{$_} = $db_def{$_}[6];
($_ eq $db_key) and $db_key_pos = $db_def{$_}[0];
}
1;
------------------------------------------


------------------
Your DB is cool, i wish it work...
Quote Reply
Re: Internal Server Error In reply to
...

[This message has been edited by JPDeni (edited April 03, 2000).]
Quote Reply
Re: Internal Server Error In reply to
....

[This message has been edited by JPDeni (edited April 03, 2000).]
Quote Reply
Re: Internal Server Error In reply to
Try using the ABSOLUTE PATH to your dbman directory in this variable, like the following:

Code:
$db_script_path = "/path/to/cgi-bin/dbman";

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


[This message has been edited by JPDeni (edited April 03, 2000).]
Quote Reply
Re: Internal Server Error In reply to
i get another problems when i put the full path there. then it says that he cant find the html.pl

------------------
Your DB is cool, i wish it work...

[This message has been edited by JPDeni (edited April 03, 2000).]
Quote Reply
Re: Internal Server Error In reply to
....

[This message has been edited by JPDeni (edited April 03, 2000).]
Quote Reply
Re: Internal Server Error In reply to
...

[This message has been edited by JPDeni (edited April 03, 2000).]
Quote Reply
Re: Internal Server Error In reply to
Moshe, lets start over. There does seem to be a communication problem.

First, what sort of system are you running the script on? Unix? Windows? NT? Mac?

Second, you need to make sure that all files have been uploaded in ASCII mode, that the permissions for each file are correct, and (if you're on a Unix system) that your path to perl in the first line of the db.cgi file is correct.

I hesitate to suggest changing the $db_script_path. In more than two years of being involved with this script, I've only seen a few people that needed to do that.

To humor me, please delete all the files from your server and upload them again. Sometimes this will fix everything. (Gremlins have been known to be running around the 'net lately. Smile )



------------------
JPD





Quote Reply
Re: Internal Server Error In reply to
Hello, I have Unix, i just reuploaded all the files, same exact error. you can try too with the link i sent in the first letter.. all the files are in the <b>right</b> place
and the permission. I dont know what to do...

I tried to put the full path there.. i get the error that the "html.pl" cannot be found.

I can give you FTP password so you can check it.. If you have ICQ or AOL IM, i am here

------------------
Your DB is cool, i wish it work...
Quote Reply
Re: Internal Server Error In reply to
It helps a lot that you're using a Unix system. I get lost when trying to deal with MS or Mac systems, since I've never used them.

I'm sorry. I don't have ICQ or AOL IM. (I did, but I found them annoying. Smile )

If you at least get an error message when you have the $db_script_url set, you're a little bit better off than just getting a 500 error. At least it gives us something to track down.

You said in your first post

Quote:
All the files are on 777, so you can read them.

I don't know if that could cause a problem or not. I still am unable to read the db.cgi script, so it might be best if you put that back to 755.

What is the $db_script_path that you put into db.cgi, which caused the problem?

What is the exact error message that you get with you have the $db_script_path set? It would be best to just copy the whole thing and put it in a message here on the forum.

The script does work. Smile Sometimes it just takes a little doing for folks to get it to work for them.



------------------
JPD





Quote Reply
Re: Internal Server Error In reply to
Seems that your script have a moods of his own Smile,
now, i get the internal error all the time, even when i change the script path , so, i changed the folder to wrong one, then maybe you can figure out something from the output... This is *not* the error message:
CGI ERROR
==========================================
Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: Can't locate /home/sites/site118/web/cgi-bin/dbma/html.pl in @INC (@INC contains: /home/sites/site118/web/cgi-bin/dbma /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 .) at default.cfg line 51.

Script Location : /home/sites/site118/web/cgi-bin/dbman/db.cgi
Perl Version : 5.00503
Setup File : default.cfg

Form Variables
-------------------------------------------

Environment Variables
-------------------------------------------
DOCUMENT_ROOT : /home/sites/site118/web
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : */*
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-us,he;q=0.5
HTTP_CONNECTION : Keep-Alive
HTTP_COOKIE : ${id_cookie}_bmusername=CMP_Moshe; ${id_cookie}_bmpassword=57lypzg4
HTTP_HOST : gameclan.cwihosting.com
HTTP_PRAGMA : no-cache
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)
HTTP_VIA : 1.1 proxy (NetCache 4.0R4)
HTTP_X_FORWARDED_FOR: 213.8.7.107
PATH : •@in:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bi8
PATH_INFO : /cgi-bin/dbman/db.cgi
PATH_TRANSLATED : /home/sites/site118/web/cgi-bin/dbman/db.cgi
QUERY_STRING :
REDIRECT_SCRIPT_URI : http://gameclan.cwihosting.com/cgi-bin/dbman/db.cgi
REDIRECT_SCRIPT_URL : /cgi-bin/dbman/db.cgi
REDIRECT_STATUS : 200
REDIRECT_UNIQUE_ID : OOkr1dhuJOUAAFdMqzA
REDIRECT_URL : /cgi-bin/dbman/db.cgi
REMOTE_ADDR : 192.116.202.37
REMOTE_PORT : 27930
REQUEST_METHOD : GET
REQUEST_URI : /cgi-bin/dbman/db.cgi
SCRIPT_FILENAME : /usr/cgiwrap/cgiwrap
SCRIPT_NAME : /cgi-bin/dbman/db.cgi
SCRIPT_URI : http://gameclan.cwihosting.com/cgi-bin/dbman/db.cgi
SCRIPT_URL : /cgi-bin/dbman/db.cgi
SERVER_ADMIN : site118
SERVER_NAME : gameclan.cwihosting.com
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SIGNATURE :
SERVER_SOFTWARE : Apache/1.3.6 (Unix) PHP/3.0.12 mod_perl/1.21 mod_ssl/2.2.8 OpenSSL/0.9.2b
UNIQUE_ID : OOkr1dhuJOUAAFdMqzA

-------------------------------------------
The real error is the internal error.
the path is: http://gameclan.cwihosting.com/cgi-bin/dbman/db.cgi

------------------
Your DB is cool, i wish it work...
Quote Reply
Re: Internal Server Error In reply to
Now I'm really confused. Smile

If you are sure that your path to Perl is correct, that all files were uploaded in ASCII mode and that all the permissions are correct, I need you to copy your default.cfg file and your db.cgi file to a web-accessible directory (one where you would place .html files). Rename them to default_cfg.txt and db_cgi.txt respectively. Then come back here and give me the URL where I can see them.



------------------
JPD





Quote Reply
Re: Internal Server Error In reply to
ok the two files are:
gameclan.cwihosting.com/filename

default.cfg.txt
db.cgi.txt

all are lowercase

------------------
Your DB is cool, i wish it work...
Quote Reply
Re: Internal Server Error In reply to
I still cannot view your db.cgi file. You need it name it db_cgi.txt. Otherwise it tries to execute the file instead of displaying it.

When I tried to see the current status of the file, by going to

http://gameclan.cwihosting.com/cgi-bin/dbman/db.cgi

I got a "File Not Found" error.



------------------
JPD





Quote Reply
Re: Internal Server Error In reply to
oops Smile, my FTP moved them, try again.

also, I noticed that you cant see the db.cgi.txt
as text file, so, i changed it to db.txt.
gameclan.cwihosting.com/db.txt

the problem stays though :-S

btw. thanks for the quick help, you are the best.

------------------
Your DB is cool, i wish it work...
Quote Reply
Re: Internal Server Error In reply to
Okay. So you're getting an internal server error with

$db_script_path = "/home/sites/site118/web/cgi-bin/dbman";

Take it out.

Set it back to

$db_script_path = ".";

You'll be no worse off and maybe better.

I checked the syntax of your db.cgi file and everything's okay.

You're positive that the path to Perl on your system is

#!/usr/bin/perl

Right? Smile

(I'm clutching at straws here!)

One other thought. Have you run cgi scripts from this server before? Sometimes the server is set up to only run scripts from the cgi-bin -- not in any subdirectories. (I had that problem with my server, until I complained very loudly and they changed it for me.)

Thanks for the nice words. I do try. However, I'm going to have to go offline for a while. I gotta make dinner! Smile


------------------
JPD





Quote Reply
Re: Internal Server Error In reply to
Hello, The same thing when i change it to ".", that
was on the start. if the path to perl is not correct
i get a CGI Warp error. and my server can have CGI
anywhere. I have other CGI programs as well..

I can set you an FTP password so you can check them..
(if you do, i can put your ad on my site....)

thanks again Smile

------------------
Your DB is cool, i wish it work...
Quote Reply
Re: Internal Server Error In reply to
I'm going to have to think about this for a while. I don't know why it wouldn't work.

I don't feel comfortable with having FTP access to your site. We should be able to work this out.

I really gotta make dinner. Hubby is starving!!! Smile


------------------
JPD





Quote Reply
Re: Internal Server Error In reply to
its like a real time chat Smile, dont worry, i trust
you. i can give you your own FTP pass, and delete it
after that. i have access to the control panel..
it takes about 30 sec.. so, you dont have to worry.

it will be my pleasure to have your product to work
on my site. i want to make ICQ list, members list
with it.

------------------
Your DB is cool, i wish it work...
Quote Reply
Re: Internal Server Error In reply to
Actually, I think it might be best if you do give me FTP access. Send the info to me at jpdeni@jpdeni.com .

I do want to be clear on something. DBMan is not my script. I was not part of the development of the script, nor am I employed by Gossamer Threads. I'm just a user who has learned some things about it and I like helping people.


------------------
JPD





Quote Reply
Re: Internal Server Error In reply to
I have some news that may not be of comfort to you.

I just uploaded a new application of DBMan. I set all the permissions and uploaded everything in ASCII. I know the path to Perl was correct.

And I got a 500 error.

I tried everything, but it just wouldn't work. Finally I used the files for an existing database I had on my server and replaced them one by one. I finally got it to work, but I don't know how.

Gremlins. I know it's gremlins!


------------------
JPD