Gossamer Forum
Home : Products : DBMan : Installation :

Yes, it's the Internal Error again!

Quote Reply
Yes, it's the Internal Error again!
In just trying to get the demo db running, I am getting the now infamous "DBMan encountered an internal error. Please enable debugging to view." message. After going through all of the archives and checking my files over and over (turning debugging on and off; putting in a path name and then taking it out; checking to make sure there are no backslashes; etc.), I'm still getting the error. Here are the files in text form and I would definitely appreciate the patience of anyone that would look at them and let me know if I've missed something.

(Normally, they are in my 'cgi-bin' directory with the proper prefixes)

www.toytrucklines2.com/db.txt (aka: db.cgi file)
www.toytrucklines2.com/default.txt (aka: default.cfg file).

Thanks so much for all of the help,

Tim

Quote Reply
Re: Yes, it's the Internal Error again! In reply to
If you turn debugging on, what sort of error message are you getting?

- Mark


Astro-Boy!!
http://www.zip.com.au/~astroboy/
Quote Reply
Re: Yes, it's the Internal Error again! In reply to
I'm getting the same Internal Error message whether debugging is turned on or off.

Quote Reply
Re: Yes, it's the Internal Error again! In reply to
Hi Tim, are you on a Unix or NT OS?

In db.cgi - try changing this line
# If you run into problems, set $db_script_path to the full path
# to your directory.
$db_script_path = "/export/emc-cust01/1/6/4/toytru/cgi-bin/dbman";

Back to the default setting:

$db_script_path = ".";

If this doesn't work - please save your html.pl as a text file and provide the url where it can be viewed.

Quote Reply
Re: Yes, it's the Internal Error again! In reply to
I'm running on a UNIX box.

I've tried switching the path name back to "." with no luck.

I'll post the html.pl file to the web site (under "www.toytrucklines2.com/html.txt") in a couple of minutes.

Thanks again.

Tim

Quote Reply
Re: Yes, it's the Internal Error again! In reply to
Tim, is this the correct path to perl on your system?

#!/usr/bin/perl

I'm not really seeing anything obvious which could be a causing a problem on the install - looks like the files are pretty much the unmodified download at this point.

Quote Reply
Re: Yes, it's the Internal Error again! In reply to
In Reply To:
I'm getting the same Internal Error message whether debugging is turned on or off.
The error message only prints if $db_debug is set to "1" in default.cfg. So the error is probobly happening before it gets that far...

Try adding the line $db_debug = 1; to db.cgi under the $db_script_path variable.

That should give you a more descriptive error message and you should get a better idea of what to do next.

- Mark


Astro-Boy!!
http://www.zip.com.au/~astroboy/
Quote Reply
Re: Yes, it's the Internal Error again! In reply to
Hi Mark, the Internal Server Error is encountered when the scripts cannot be run at all - and normally not when there is an internal error in the scripts. The debug option will only work once the scripts can actually be accessed.

Most common causes for the Internal Server Error would be:

A) Inaccurate path to perl

B) Adding fields and not having comma's in the right place:
Popular => [8, 'alpha', 0, 3, 0, '', ''],
Userid => [9, 'alpha', -2,15, 0, '', '']<< lack of comma
NewField => [10, 'alpha', 0, 3, 0, '', ''],<<shouldn't be a comma
);

C)Adding fields and getting the field number sequence out of order:
Popular => [8, 'alpha', 0, 3, 0, '', ''],
NewField => [10, 'alpha', 0, 3, 0, '', ''],
Userid => [9, 'alpha', -2,15, 0, '', '']
);

D) Inadvertently removing &html_print_headers; from html.pl when customizing the layout of the home page.




Quote Reply
Re: Yes, it's the Internal Error again! In reply to
Tim, you've customized the html.pl file somewhat so I'm guessing you want to use the customized display for your pages - and perhaps that's the problem - you've customized the display but instructing dbman to use autogenerate.

Try changing this line in default.cfg
$db_auto_generate = 1;

to be
$db_auto_generate = 0;



Quote Reply
Re: Yes, it's the Internal Error again! In reply to
In Reply To:
Hi Mark, the Internal Server Error is encountered when the scripts cannot be run at all - and normally not when there is an internal error in the scripts. The debug option will only work once the scripts can actually be accessed.
True, but timlightfoot is recieving the "DBMan encountered an internal error. Please enable debugging to view." message produced by DBMan, not the standard 500 error produced by a web server.

So the script is running, but something is going wrong before it can completely load default.cfg, and the script is being sent to sub cgierr. But because the script hasn't reached the $db_debug variable, it remains un-set so the full debug message is never printed.

If we set the variable sooner, we'll get a more descriptive error message from DBMan and I'm sure it will help give some clues.

Cheers,

- Mark


Astro-Boy!!
http://www.zip.com.au/~astroboy/
Quote Reply
Re: Yes, it's the Internal Error again! In reply to
Sorry Mark - earlier when I had used Tim's url from his default.cgi file and added the db.cgi to call the script, I had gotten a 500 server error. That may have been when he had the filepath included in db.cgi. I hadn't gone back to check current error and had just relpied based on the error I had received earlier.

~ Karen

Quote Reply
Re: Yes, it's the Internal Error again! In reply to
I added the db_debug code, deleted the path name in the db.cgi file and tried to run the demo program. Here's what I got:

"DBMan encountered an internal error.


CGI ERROR
==========================================
Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: default.cfg did not return a true value at db.cgi line 52."

Line 52 of db.cgi is "if ($@) { &cgierr ("Error loading required libraries.\nCheck that they exist, permissions are set correctly and that they compile.\nReason: $@"); }"

I have checked my permissions repeatedly - they are all okay - and I just installed everything that came with the DBman download. Is it possible that I am actually having a server error (I have had problems with this web host in the past not setting permissions on my account correctly)? Or should I download the whole package again and reinstall?

Thanks again for all of the help.

Tim

Quote Reply
Re: Yes, it's the Internal Error again! In reply to
Hi Tim, well something's changed to let you begin getting to the scripts - that a good thing <smile>

Okay, the error message is:
Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: default.cfg did not return a true value at db.cgi line 52."

The other details are providing indicators on what to check and where the error was captured.

You'll need to doublecheck that the files exist, that they have the right permissions, the path is accurate, and that the files have been uploaded in ascii text mode.

Permissions should be:
db.cgi (755) -rwxr--r--
html.pl (644) -rw-r--r--
auth.pl (644) -rw-r--r--
default.cfg (644) -rw-r--r--
default.pass (666) -rw-rw-rw-
default.count (666) -rw-rw-rw-
default.log (666) -rw-rw-rw-
default.db (666) -rw-rw-rw
auth (777) drwxrwxrwx

PS - Line 52 of the db.cgi file you posted earlier, appears to be require "auth.pl"; # Authorization Routines on my line counter.



Quote Reply
Re: Yes, it's the Internal Error again! In reply to
Hi Karen (and others): I think the insertion of the $db_debug = 1; line after the $db_script_path = "."; line that is kicking out the error messages.

Anyway, no luck so far with any of the suggestions. I've even gone so far as to delete everything, download a fresh version, and reloaded (and I've checked permissions and ACSCII upload status jillions of times). Now I'm getting an error message that says that I have an error in Line 51 (instead of Line 52 like last time). I'm going to contact my web host and make sure that they've got my root permissions set correctly (this has been a problem in the past with other sites I've done). I'll post again once I find out if that was the cause (will probably take 12 hrs or so).

Thanks again,

Tim