[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-WebCGI] DB_File Error Messages



Hello everybody,

I have run into a problem with a Perl script I'm working on. It uses 
DB_File and MLDBM, and it works quite well as long as I start it from 
within BBEdit and the output is sent to a BBEdit window.

The problem occurs when I integrate the program in a CGI script. As 
long as I use it to extract information from texts of only a few 
dozen lines, the output is correct, but at the end, the following 
error messages are displayed:

# DB_File::BTREEINFO does not define the method CLEAR File 'Dev:Pseudo'; Line 0
# DB_File::HASHINFO does not define the method CLEAR File 'Dev:Pseudo'; Line 0
# DB_File::RECNOINFO does not define the method CLEAR File 'Dev:Pseudo'; Line 0

This seems odd since I never clear out the tied hashes.

Things get worse when I use the program on longer text files: This 
produces some kind of crash. Of course, I am not sure that the memory 
problem is related to the error messages above, but I guess it's a 
good idea to start with what I know to cause errors. (When I run the 
script from within BBEdit on files of 10 MB in total, it takes about 
40 seconds to complete, which feels a bit slow, but at least there 
are no error messages. It runs using the -w switch and under the use 
strict pragma.)

When I use NDBM_File instead of DB_File, the program works fine and 
without error messages as long as it operates on a very small test 
file (12k). With files of about 100k, nothing happens, until I 
eventually get an error message saying "A CGI or internal server 
component could not complete the requested action", and the browser's 
window title reads "502 Bad Gateway". This at least is what happens 
when I use the Mac OS's built in Web server (with the memory 
allocation increased to the maximum value of 4800k). I tried it with 
Quid Pro Quo, too: The error message now read "The document contained 
no data. Try again later, or contact the server's administrator." 
When I used Internet Explorer instead of Netscape Communicator, the 
result with the OS's Personal Web Sharing remained the same; with 
Quid Pro Quo, the error message changed to "The attempt to load 
'Accessing URL: http:// etc. .acgi' failed."

Has anyone come across these kinds of things before?

Thank you very much in advance,

Luc

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org