[cgiwrap-users] problem with cgiwrap and dbi
Brought to you by:
nneul
From: dean b. <de...@pu...> - 2002-05-01 16:14:08
|
Hi, Whilst running a cgi script I get the following error: [Wed May 1 16:40:12 2002] [error] [client 193.237.21.207] malformed header from script. Bad header=Can't call method "prepare" on: /usr/cgiwrap/cgiwrap. What is REALLY annoying is that the error message is clipped. I am using a package that includes 'use DBI;' and this is where the prepare method is located (within a function). Part of the package code is as follows: use strict; use Push qw/$CFG/; use DBI; sub _usr_details { my ($db, $server, $dbusr, $dbpw, $query) = @_; my $dbh; eval { $dbh = DBI->connect("DBI:mysql:$db:$server",$dbusr,$dbpw); }; if ( $@ ) { warn "_usr_details: $@: "; return undef ; } my $sqlcmd = $dbh->prepare($query); my $row_count = $sqlcmd->execute; if ($row_count > 0) { my $userdata = $sqlcmd->fetchrow_hashref; $sqlcmd->finish; $dbh->disconnect; return $userdata; } return undef; } Can anyone tell me how to get around this problem? Also, how can I get cgiwrap to dump the ENTIRE error message? Is this a program or system software config issue? TIA Dean |