#!/usr/bin/perl -w sub BEGIN { $ENV{DISPLAY}= "machine:0.0"; } use Carp () ; use CGI qw( ::standard );; use CGI::Carp qw( fatalsToBrowser ); use DBI; use DBD::Pg; our $counter = 0; our $full=new CGI; print $full->header; our $dbh; $path_info = $full->path_info; my ($param1,$param2); $param1='username'; $param2='password'; my $username; $username=$full->param($param1); my $password; $password=$full->param($param2); my $database='jrado'; my $driver='Pg'; my $host='raider-ralph'; my $dsn="DBI:$driver:dbname=$database;host=$host"; $username=~s/^\s+//; $password=~s/^\s+//; unlink '/home/www/dbitrace.log6a' if -e '/home/www/dbitrace.log6a'; DBI->trace(2,'/home/www/dbitrace.log6a'); $dbh=DBI->connect($dsn,$username,$password) or die print "error connecting to database ", $DBI::errstr, "\n"; #### #! /usr/bin/perl -Tw ##use strict; use CGI qw(:all); ##list.cgi ##set up the postgresql interface use DBI; use DBD::Pg; my $match; my $begdate; my $enddate; our $username; our $password; $match=''; $begdate=''; $enddate=''; our $list=new CGI; $begdate=$list->param('begdate'); $enddate=$list->param('enddate'); $match=$list->param('match'); $username=$list->param('username'); $password=$list->param('password'); ##declare scalars ##dsn-related my $host; my $db; my $driver; my $dsn; my $database; our $key; $database='jrado'; $driver='Pg'; $user=''; $host='raider-ralph'; $dsn="DBI:$driver:dbname=$database;host=$host"; ##database handle my $dbh_list; unlink '/home/www/dbitrace.log4' if -e '/home/www/dbitrace.log4'; DBI->trace(2,'/home/www/dbitrace.log4'); $username=~s/^\s+//; $password=~s/^\s+//; $dbh_list=DBI->connect($dsn,$username,$password) or die print "ACCESS DENIED";