Gossamer Forum
Home : Products : DBMan : Installation :

CGI error again

Quote Reply
CGI error again
Hi all,

Following readme file, I have installed DBMan on my NT platform with IIS 4.0, however, I find the following error message:

CGI Error

The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

That's all I have. I have no ideal what's the problem.

Please help.

Thanks
CaryUnsure
Quote Reply
Re: [caryhung] CGI error again In reply to
Check out this thread reference:

Subject: DBMan in a Windows environment - Checklist
AstroBoy 12-Oct-00
Thread: http://gossamer-threads.com/p/108916

Have you search the forum for the error message you are receiving? If not, please try that as there is probably a solution provided.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [caryhung] CGI error again In reply to
Quote:
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:


Incomplete header errors are oft times associated with an incorrect path to perl. Double check the first line in db.cgi and make sure the correct path/to/perl on your machine is being used there (try comparing the path to the other script you have running.)

~ Karen
Quote Reply
Re: [Karen] CGI error again In reply to
>>Incomplete header errors are oft times associated with an incorrect path to perl.<<

NT is a little different as the path to perl isn't required at the top of scripts normally.

The first point of reference for errors such as this is the error log.
Quote Reply
Re: [RedRum] CGI error again In reply to
Hi all,

Thank you for your help. However, I have checked my path:

In DB.CGI:
$db_script_path = "d:\perl\bin"; #where Perl has been installed.

In Default.cfg
$db_dir_url = "http://webserver/cary/dbman"; #where is the path of my DBMan.

However, I still cannot invoke my DBMan! In the error message, there is no specifiy file mentions. (which I have stated in the first message)

BTW, I would like to clarify how to invoke the DBMan?

Or can I use everything in Default? say default.db

Please help.

Thanks
Cary
Quote Reply
Re: [caryhung] CGI error again In reply to
Cary, did you review the info in the post Lois cited?

Have you tried this change from that post?

2) The variable $db_script_path in db.cgi MUST be set to the full location of your DBMan directory on your filesystem. (without the last slash)

A quick note on the file path variable, try to avoid using the backslash character as it is an escape character.
eg: $db_script_path = "c:\inetpub\cgi-bin\dbman";

Either escape the backslash first: $db_script_path = "c:\\inetpub\\cgi-bin\\dbman";
Or use forward slashes: $db_script_path = "c:/inetpub/cgi-bin/dbman";
Quote Reply
Re: [Karen] CGI error again In reply to
Hi Karen,

Thank you for your help. No more error message!

However, it seems that it cannot invoke the DBMan, for I try to type the following:

http://webserver/cary/dbman/db.cgi
or http://webserver/cary/dbman/db.cgi?uid=default

It prompts the dialog box and asks me to save the db.cgi file. Any suggest?

Many thanks
Cary
Quote Reply
Re: [caryhung] CGI error again In reply to
Quote:
It prompts the dialog box and asks me to save the db.cgi file. Any suggest?




Aaah! Okay, that's progress! Wink

Now, you need to use AstroBoy's suggestion here:

3) For DBMan to work on Windows systems, you need to change the extension on your db.cgi to .pl (make sure you do the same in your default.cfg!)


The change is needed because your server isn't configured for processing .cgi file extensions.

edit - should explain that a bit more. Open your db.cgi file in the text editor you've been using then select Save As to rename the file db.pl. You'll then need to locate the line in default.cfg that defines the path to the file and change the filename in that path to be /db.pl instead of /db.cgi. - /edit

~ Karen

Last edited by:

Karen: Mar 11, 2002, 5:27 PM
Quote Reply
Re: [Karen] CGI error again In reply to
When calling the script you also want to include the name of your database file. If you are using 'default' then instead of using:

http://webserver/cary/dbman/db.cgi?uid=default

Use:

http://webserver/cary/dbman/db.cgi?db=default&uid=default

change db= to the actual name of your database file.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [Karen] CGI error again In reply to
Hi Karen,

A little bit in progress, thanks!

For I still find the following error:

DBMan encountered an internal error. Please enable debugging to view.

Any suggestion?

Cary
Quote Reply
Re: [Karen] CGI error again In reply to
Hi Karen,

One more information for you.

In db.cfg:
$db_debug = 1;

Then, I don't understand why it will ask me to enable the debug view??

Please help.

Cary

Last edited by:

caryhung: Mar 11, 2002, 5:48 PM
Quote Reply
Re: [caryhung] CGI error again In reply to
Using:

$db_debug = 1;

is usually only set to 1 when you are getting your script up and running and doing the testing.

Once everything is working set it to:

$db_debug = 0;

and you will not see the debugging message any longer.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] CGI error again In reply to
Hi LoisC,

Thank you for your advice. However, no matter I set $db_debug = 1 or 0, it doesn't invoke DBMan.

Any suggestion?

Cary
Quote Reply
Re: [caryhung] CGI error again In reply to
Okay, let's recap.

Did you save your file as db.pl and upload the new file as a text file?

Did you change this line in default.cfg? :

# URL of dbman.
$db_script_url = $db_dir_url . "/db.cgi";


to be:

# URL of dbman.
$db_script_url = $db_dir_url . "/db.pl";


Do each of your field names have a comma at the end EXCEPT the last field?

Popular => [8, 'alpha', 0, 3, 0, '', ''], << comma
Userid => [9, 'alpha', -2, 15, 0, '', ''] << no comma

Is your database directoryinside a directory named "cary"?

Have you renamed the default.cfg file?

Are you accessing your database using?:

http://yourdomain.com/cary/dbman/db.cgi?db=default

If all is okay with each of those questions, you will need to save your default.cfg file as a text file (Save As default.txt) and upload it to an area on your server that can be viewed from the web and post the address where we can see the file.

~ Karen
Quote Reply
Re: [caryhung] CGI error again In reply to
A good idea would have been to open up the download box to read the error. It normally tells you the problem.

Also cgi scripts do not necessarily need to be .pl as I use XP which is built on the NT kernel which has no problem with cgi scripts.

You could be hunting forever. You need to view an error log, its so much simpler.

Last edited by:

RedRum: Mar 12, 2002, 2:05 AM
Quote Reply
Re: [RedRum] CGI error again In reply to
Hi RedRum,

Can you show me how to open up the download box and to read the error? Please help.

Thanks
Cary
Quote Reply
Re: [caryhung] CGI error again In reply to
When the box pops up just click "Open" or "Save" then read the file.
Quote Reply
Re: [Paul] CGI error again In reply to
Hi Paul,

Thank you for your help. I've already download/save the file, however, it is a 'DB.CGI' file and it contains no error log. Then, what should I do?

Or you mean 'file' is another file?

Please reply.

Regard
Cary
Quote Reply
Re: [caryhung] CGI error again In reply to
Hi,

I sent you an email.
Quote Reply
Re: [caryhung] CGI error again In reply to
Cary, it's good you've been able to get DBMan installed. If you run into problems on the customization, post in that forum.

For others participating/watching this thread, I believe it was escaping the slashes that worked (in db.cgi/pl).
$db_script_path = "c:\\inetpub\\cgi-bin\\dbman";