Howdy,
I have a perl script running through Apache on Caldera Linux, and I'm getting problems with the line below.
tie %data, "DB_File", 'jobs.db', O_RDWR |O_CREAT, 0666 or die "Can't open jobs.db: $!\n";
This prints the error to the apache errorlog
Can't open jobs.db: file exists
It does and i've set it to 777 to make sure my permissions weren't the problem. I'm sure DB_File is supposed to be able to open existing files.
I know I'm doing something wrong I've checked my permissions again and again, but it's not helped.
The Read/write flag is set and so is the create flag.
Has anyone had experiences like this, or does anyone know a way around it, I've tried it on two servers, my own and a commercial one and I get the same error. both were running apache and Perl 5.
Incase you need it here's the code before that line.
------------ Code ----------------
#!/usr/bin/perl -w
use strict;
use DB_File;
use CGI qw(:standard);
use vars qw(@fields);
require "./html.pl";
require "./fields.pl";
my $header = &html_header;
my $footer = &html_footer;
&no_params unless param();
my $id = param('id');
my(%data, %in);
------------ End Code --------------
I've another completely unrelayted question as well. This forum, is it written by elated?, or is it a commercially available product.
Cheers,
Steve.
I have a perl script running through Apache on Caldera Linux, and I'm getting problems with the line below.
tie %data, "DB_File", 'jobs.db', O_RDWR |O_CREAT, 0666 or die "Can't open jobs.db: $!\n";
This prints the error to the apache errorlog
Can't open jobs.db: file exists
It does and i've set it to 777 to make sure my permissions weren't the problem. I'm sure DB_File is supposed to be able to open existing files.
I know I'm doing something wrong I've checked my permissions again and again, but it's not helped.
The Read/write flag is set and so is the create flag.
Has anyone had experiences like this, or does anyone know a way around it, I've tried it on two servers, my own and a commercial one and I get the same error. both were running apache and Perl 5.
Incase you need it here's the code before that line.
------------ Code ----------------
#!/usr/bin/perl -w
use strict;
use DB_File;
use CGI qw(:standard);
use vars qw(@fields);
require "./html.pl";
require "./fields.pl";
my $header = &html_header;
my $footer = &html_footer;
&no_params unless param();
my $id = param('id');
my(%data, %in);
------------ End Code --------------
I've another completely unrelayted question as well. This forum, is it written by elated?, or is it a commercially available product.
Cheers,
Steve.


The only thing I can suggest is that you might need to include the line:
