Perlfect Solutions
 

[Perlfect-search] Runtime Error - Windows 2000

Roee Rubin roee@irubin.com
Fri, 3 Aug 2001 12:44:36 -0700
Thanks for the reply.

I installed the latest version of DB_File (1.73) and got the same results. I
ran a minimal test version of the script (see below) from the command line
and it ran successfully - the same version running through the web fails,
which leads me to believe that there is a security problem here.

Any clues as to what needs to be modified in the server settings (WIN2K,
IIS5)? Permissions are setup correctly in the cgi-bin directory.


<snippet>

#!c:\perl\bin


use CGI();
$co = new CGI();
my $db_package = "";
# To use tainting, comment in the next 2 lines and comment out the next 8
lines.
# Note that you also have to add "./" to the filenames in the require
commands.
#use DB_File;
#$db_package = 'DB_File';
package AnyDBM_File;
@ISA = qw(DB_File GDBM_File SDBM_File ODBM_File NDBM_File) unless @ISA;
foreach my $isa (@ISA) {
  if( eval("require $isa") ) {
    $db_package = $isa;
    last;
  }
}

package main;
require 'conf.pl';
#require 'SGMLEntities.pl';



tie %inv_index_db, $db_package, $INV_INDEX_DB_FILE, O_RDONLY, 0755 or die
"Cannot open $INV_INDEX_DB_FILE: $!";

print $co->header();
print $co->start_html();
for (keys %inv_index_db) {
        print $_ . "<br>\n";
}


</snippet>
-----Original Message-----
From: Daniel Naber [mailto:daniel.naber@t-online.de]
Sent: Friday, August 03, 2001 12:28 PM
To: roee@irubin.com; perlfect-search@perlfect.com
Subject: Re: [Perlfect-search] Runtime Error - Windows 2000


On Friday 03 August 2001 20:21, Roee Rubin wrote:

> I have attached the configuration file and also attempted to print out
> the path from search.pl which turned out to be fine.

I suggest you try to find a recent version of DB_File from
http://www.activestate.com/ (if you are using activestate perl) and
install it. I have never seen this error and I have no real idea what
causes it. Is perhaps a different process accessing these files (maybe
indexer.pl doesn't want to fninish) so that search.pl cannot read them?

Regards
 Daniel

--
Daniel Naber, Paul-Gerhardt-Str. 2, 33332 Guetersloh, Germany
Tel. 05241-59371, Mobil 0170-4819674