Quote:
#!/usr/bin/perl
use DBI;
use strict;
# This script connects to the psql database, retrieves the data for a given dataid
# and creates a xml file with the fgdc specification.
#open the xml file to prepare the xml document
open my $FOUT, ">>client.xml";
print $FOUT "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n";
#make connection to the database
my $database = "db_name";
my $hostname = "localhost";
my $username = "username";
my $password = "";
my $dsn = "DBI:Pg:dbname=$database";
#my $dbh = DBI->connect($dsn, $username, $password,{ RaiseError => 1, AutoCommit => 0 });
my $dbh = DBI->connect('DBI:Pg:dbname=cwdiscovery','brakesh','', { RaiseError => 1, AutoCommit => 0 });
...
for a start you should use warnings and strict ie lines 2
use warnings;
Is there no password on the database?
have you checked /var/log/httd/error_log (assuming linux/unix here)
you can follow it by typing in a terminal tail -f /var/log/httd/error_log
If nothing is appearing in error log it may be worth converting to CGI script and checking ie:
add
use CGI
print header()
print start_html
after use strict
then print end_html at end of file
make executable and copy to cgi-bin directory