Gossamer Forum
Home : Products : DBMan : Installation :

"Document Contains no data" error

Quote Reply
"Document Contains no data" error
I have just download and installed DBman on my local machine. Then I made the appropriate changes (edited db.cgi and check that the path to perl points to Perl 5.003 or better.
Edited default.cfg and set $db_dir_url to the directory that db.cgi resides in) I uploaded, in ASCII, to my hosting UNIX server and tried execute from my browser and received the "document contains no data error". I am using the unchanged dg.cgi script, with the exceptions stated above, as well as the default files that are provided with dbman(unchanged). All files reside in a directory named "dbman" below my root directory due to my inability to gain access to our hosting server cgi-bin directory. I am unsure as to whether our hosting server uses perl 5.003 however, I know that I had to set the path to a special perl 5 directory, but I am unsure as to what exact version of perl. Is there a way to check what version Perl servers are running or have available? I am running Sambar server on my local win98 machine. I have not tried this CGI on my Sambar server, however my other CGI failed multiple times. I am also considering getting apache and attempting to run dbman in it. Any advice from those who are running apache on win98?

I would appreciate any assistance I can get. I am rather stuck.


------------------
john
Quote Reply
Re: "Document Contains no data" error In reply to
Since no one has posted a reply yet. I figure I will just give an update to my dillemma.

At this point I am FROTHING AT THE MOUTH. I have been working on this script for literally over 15 hours with the EXACT SAME RESULTS EVERY TIME..."DOCUMENT CONTAINS NO DATA". I have tried every F#*%# thing I know how to try. I have re-downloaded DBman, re-installed DBMan, re-configured DBman,and up to this point have come quite close to THROWING my monitor across the room three times. I am feeling a little Stressed!!!!!

If anyone has any ideas PLEASE let me know before I need a new monitor. I am going to take some MOTRIN!!

Thanks.

------------------
john
Quote Reply
Re: "Document Contains no data" error In reply to
Now I fel much better After a Whopper and 4 four Motrin.

Alright. He is some more info for Ya. I am now running the script with the following software:
-Win98
-Xitami v2.4c
-Perl 5.004x(this is perl.exe I got from Sambar Server since Xitami does not come with Perl.

I have configured(again) the DBman to be set up on my Win98 machine running Xitami. I have placed the necessary Perl in C:\tools\ and have told db.cgi where it at as follows: #! C:\tools\perl. I have also configured default.cfg all three of the following ways with no luck:
$db_dir_url = "C:/Xitami/cgi-bin";
$db_dir_url = "http://127.0.0.1/cgi-bin";
$db_dir_url = "http://actualIP/cgi-bin";

The error messages in the Xitami cgierr.log is as follows: actaully there are two of them.
1)Bareword found where operator expected at C:\XITAMI\cgi-bin\db.cgi line 50, near "unless ($db_setup =~ /^[A-Za-z0-9]+$/) { die "Invalid"
(Do you need to predeclare unless?)
syntax error at C:\XITAMI\cgi-bin\db.cgi line 50, near "unless ($db_setup =~ /^[A-Za-z0-9]+$/) { die "Invalid config "
String found where operator expected at C:\XITAMI\cgi-bin\db.cgi line 51, near "require ""
(Might be a runaway multi-line "" string starting on line 50)
(Missing semicolon on previous line?)
Scalar found where operator expected at C:\XITAMI\cgi-bin\db.cgi line 51, at end of line
(Do you need to predeclare require?)
String found where operator expected at C:\XITAMI\cgi-bin\db.cgi line 52, near "require ""
(Might be a runaway multi-line "" string starting on line 51)
(Missing semicolon on previous line?)
Bareword found where operator expected at C:\XITAMI\cgi-bin\db.cgi line 52, near "require "auth"
(Do you need to predeclare require?)
String found where operator expected at C:\XITAMI\cgi-bin\db.cgi line 54, near "if ($@) { &cgierr (""
(Might be a runaway multi-line "" string starting on line 52)
(Missing semicolon on previous line?)
Bareword found where operator expected at C:\XITAMI\cgi-bin\db.cgi line 54, near "if ($@) { &cgierr ("Error"
(Do you need to predeclare if?)
String found where operator expected at C:\XITAMI\cgi-bin\db.cgi line 60, near "if ($@) { &cgierr(""
(Might be a runaway multi-line "" string starting on line 54)
(Missing semicolon on previous line?)
Bareword found where operator expected at C:\XITAMI\cgi-bin\db.cgi line 60, near "if ($@) { &cgierr("fatal"
(Do you need to predeclare if?)
String found where operator expected at C:\XITAMI\cgi-bin\db.cgi line 63, near "if ($db_benchmark) { $t1 = new Benchmark; print ""
(Might be a runaway multi-line "" string starting on line 60)
(Missing semicolon on previous line?)
Backslash found where operator expected at C:\XITAMI\cgi-bin\db.cgi line 86, near ")\"
(Might be a runaway multi-line // string starting on line 63)
(Missing operator before \?)
Execution of C:\XITAMI\cgi-bin\db.cgi aborted due to compilation errors.

2)Can't locate Time/Local.pm in @INC (@INC contains: C:\TOOLS\lib\site C:\TOOLS\lib c:\perl\lib c:\perl\lib\site c:\perl\lib\site .) at C:\XITAMI\cgi-bin\db.cgi line 1071.
BEGIN failed--compilation aborted at C:\XITAMI\cgi-bin\db.cgi line 1071.

This should be enough info to get someone started. I REALLY need to get htis to work to keep my insanity(whats left) in tact.

PLEASE HELP??

------------------
john
Quote Reply
Re: "Document Contains no data" error In reply to
Here is a litte more info:
Site: www.networkguys.com
Directory: /dbman
Quote Reply
Re: "Document Contains no data" error In reply to
Well, It's me again.....It's 9:30 PM here in California and I have been working on this dang script since this 4pm yesterday. Not straight through of course. I have FINALLY resolved my issue.

Just for the knowledge of others, and because some may see some levity in the situation, I will post how I "THINK" I may have resolved this problem. Even though I am not 100%

Here's the deal. When I was getting the two different error messages (you can see them above) above they were from two different ways in which I was configuring the db.cgi file at line 37(where you must input the full path). I was one of the people who had to put the full path name in. Now, the reason for the larger of the two error messages was due to an extra "/" at the end of the path. Genius huh? Yeah I know. I realized this after clearing the cgierr.log file (part of Xitam web server at http://www.imatix.com/html/xitami/index.htm) and re-configuring several times until I realized what was giving me the errors. However, after I removed the "/" I was still getting the smaller of the two error messages. I read the error message closely and remembered one of the posts to this forum. It has something to do with a Missing library in one of the member's perl packages. It just so happens that I had the same problem and my Perl could not recognize "Time" and "Date" functions. Pondering this I decided to take a close look at the error I was getting once again and find where the errors are in my files (eg. Can't locate Time/Local.pm in @INC (@INC contains: C:\TOOLS\lib\site C:\TOOLS\lib c:\perl\lib c:\perl\lib\site c:\perl\lib\site .) at C:\XITAMI\cgi-bin\db.cgi line 1071. BEGIN failed--compilation aborted at C:\XITAMI\cgi-bin\db.cgi line 1071) Notice the Line 1071. So what I went through the db.cgi file and did a text search for "local" and "time" and stripped out all the functions that had to do with dates and times. There are a few of them. One is in the auth.pl file as well. After trial and error (pun intended), I finally got the coveted Authentication page!!!!! After attempting to log in, I received yet another error! The fated crypt( ) error. After doing a search in the forum again (for "crypt") and finding out that ActiveStates ActivePerl does not have a problem with the crypt function I headed out to http://www.activestate.com/ActivePerl/ to get my free copy of ActiveState Perl. I installed it without a problem, reconfigured db.cgi to point to the new Perl directory and Whammo. I was in! But wait…one more error. Now I was getting the flock( ) error after try to authenticate. But I was so close! Once again I remembered reading about a flock error in the forum so back I went. This time I did a search for "Flock" and found the only "flock error" entry, learned of the fix, and appropriately re-configured the default.cfg file. I FINALLY GOT INTO THE DATABASE!!! I was so happy. After over 20 hours of grueling monitor worship I got it to work…then I realized how much work I had ahead of my, and I smiled. I didn't care. My script woes were finished…for now!!!!!!

I Hope you can learn from this and maybe it can help you fix one of your problems. This Forum is absolutely marvelous.

Thanks Alex.

PS, my db.cgi is presently pointing to perl.exe and I think that may by why I go the "flock" error. There is also a perl5.00502.exe in that same bin directory. Could I point the db.cgi to perl5.00502 and reconfigure default.cfg to allow for the flock function. Please let me know if you know. Thanks
Quote Reply
Re: "Document Contains no data" error In reply to
Wow! Definately an interesting read. Smile

Most of the problems were from being on a Windows machine:

Quote:
Can't locate Time/Local.pm in @INC

Is from the version of perl that came with Sambar. Time::Local is meant to be a standard module, and should come with perl. You should now have it now that you are using ActiveState's perl. I would replace the lines you had to remove so that you can use date's again.

Quote:
The fated crypt( ) error.

Again, old version of perl problem. I highly recommend using Activestate's port of perl.

Quote:
Now I was getting the flock( ) error after try to authenticate

Windows 95/98 does not support file locking, so flock() won't work. This should work on your production machine though, and you should remember to turn it back on when you upload it to your server.

Quote:
my db.cgi is presently pointing to perl.exe

Just to avoid confusion, unless you are using Apache, the first line of the script does not have any effect. Xitami, IIS, and various other Windows web servers (except Apache) don't care about the first line of the script. You determine what will run the script in the program's config.

Quote:
Could I point the db.cgi to perl5.00502 and reconfigure default.cfg to
allow for the flock function.

Do you mean on your windows95/98 machine? If so, no, you won't be able to get flock() to work on it and will have to leave it off.

Glad you got it working finally!

Cheers,

Alex