RE: [cgiwrap-users] problem with cgiwrap and dbi
Brought to you by:
nneul
From: Neulinger, N. <nn...@um...> - 2002-05-01 16:25:34
|
Run your script via cgiwrapd, it will dump errors so that you can see them on the browser. -- Nathan ------------------------------------------------------------ Nathan Neulinger EMail: nn...@um... University of Missouri - Rolla Phone: (573) 341-4841 Computing Services Fax: (573) 341-4216 > -----Original Message----- > From: dean browett [mailto:de...@pu...]=20 > Sent: Wednesday, May 01, 2002 11:14 AM > To: cgi...@li... > Subject: [cgiwrap-users] problem with cgiwrap and dbi >=20 >=20 > Hi, >=20 > Whilst running a cgi script I get the following error: >=20 > [Wed May 1 16:40:12 2002] [error] [client 193.237.21.207]=20 > malformed header=20 > from > script. Bad header=3DCan't call method "prepare" on:=20 > /usr/cgiwrap/cgiwrap. >=20 > What is REALLY annoying is that the error message is clipped. >=20 > I am using a package that includes 'use DBI;' and this is=20 > where the prepare=20 > method is located (within a function). Part of the package=20 > code is as follows: >=20 > use strict; > use Push qw/$CFG/; > use DBI; >=20 > sub _usr_details { >=20 > my ($db, $server, $dbusr, $dbpw, $query) =3D @_; > my $dbh; >=20 > eval { > $dbh =3D DBI->connect("DBI:mysql:$db:$server",$dbusr,$dbpw); > }; >=20 > if ( $@ ) { > warn "_usr_details: $@: "; > return undef ; > } >=20 > my $sqlcmd =3D $dbh->prepare($query); > my $row_count =3D $sqlcmd->execute; >=20 > if ($row_count > 0) { > my $userdata =3D $sqlcmd->fetchrow_hashref; > $sqlcmd->finish; > $dbh->disconnect; >=20 > return $userdata; > } >=20 > return undef; > } >=20 > Can anyone tell me how to get around this problem? >=20 > Also, how can I get cgiwrap to dump the ENTIRE error message?=20 > Is this a=20 > program or system software config issue? >=20 > TIA >=20 > Dean >=20 >=20 >=20 |