V
Vassilis Tavoultsidis
I am running the following script on an Apache Server 1.3.27 (Unix) with
Linux as an operating system and perl version 5.006001 (I don't know any
other information I just rent this server) and it dies when I try to tie the
hash with the database.
#!/usr/bin/perl
use CGI;
use Fcntl qw( EFAULT :flock);
use DB_File::Lock;
my $q = new CGI;
$temp_data = $ENV{'DOCUMENT_ROOT'};
if($temp_data =~ /\/$/) {
chop($temp_data);
}
print "Content-type: text/html\n\n";
print "DB_File::Lock >>> ";
$db_filename = "${temp_data}/database/epipla";
print "${db_filename}<br>";
tie(%db_hash, 'DB_File::Lock', $db_filename, O_RDONLY, 0755, $DB_HASH,
'read') or die"error";
while (($k, $v) = each(%db_hash))
{
print $k."::".$v."<br>";
};
untie(%db_hash);
print "end";
exit;
Linux as an operating system and perl version 5.006001 (I don't know any
other information I just rent this server) and it dies when I try to tie the
hash with the database.
#!/usr/bin/perl
use CGI;
use Fcntl qw( EFAULT :flock);
use DB_File::Lock;
my $q = new CGI;
$temp_data = $ENV{'DOCUMENT_ROOT'};
if($temp_data =~ /\/$/) {
chop($temp_data);
}
print "Content-type: text/html\n\n";
print "DB_File::Lock >>> ";
$db_filename = "${temp_data}/database/epipla";
print "${db_filename}<br>";
tie(%db_hash, 'DB_File::Lock', $db_filename, O_RDONLY, 0755, $DB_HASH,
'read') or die"error";
while (($k, $v) = each(%db_hash))
{
print $k."::".$v."<br>";
};
untie(%db_hash);
print "end";
exit;