I have a mod_perl script to access PostgreSQL 8.3 database and view/insert/update records. The script has been all mod_perl for a good while now, with everything working fine.
It uses all Apache::Request, Apache::Registry for script and form handling.

I now wanted to improve security a bit, so when I tried accessing script with https, I get this error in log file: Can't locate object method "request" via package "Apache" at pfrap4.pl line 23. [Fri Jul 24 12:36:38 2009] [error] [client X.X.X.X] Premature end of script headers: /var/www/...

line 23

#!/usr/bin/perl
use warnings;
no warnings ('uninitialized');
use strict;
#use diagnostics;

use Apache::Request();
use HTML::Entities ();
use DBI ();

#our $debug = 1;
our $debug = 0;
....

my $r = Apache->request;
my $query = Apache::Request->new($r, POST_MAX => 100000, DISABLE_UPLOADS => 1);

my $dbh = DBI->connect("DBI:Pg:dbname=$database;host=$hostname;port=5432", $username, $password, {'R
aiseError' => 1});

.....
I am using Apache::DBI, self-signed ssl certificates, mod_gzip, mod_auth_digest. I have tried removing mod_auth_digest, mod_gzip, and rebooting as a last resort.

Have not found any useful advice for this problem searching web.

Chris Bennett

--
A human being should be able to change a diaper, plan an invasion,
butcher a hog, conn a ship, design a building, write a sonnet, balance
accounts, build a wall, set a bone, comfort the dying, take orders,
give orders, cooperate, act alone, solve equations, analyze a new
problem, pitch manure, program a computer, cook a tasty meal, fight
efficiently, die gallantly. Specialization is for insects.
  -- Robert Heinlein

Reply via email to