try setting trace to level 6 for greater detail...
BTW, you can also separate the trace output from your error_log via
DBI->trace(6,"/path/to/trace.log");
from within your handler or script.
Are you using the latest drivers?
--Geoff
> -----Original Message-----
> From: Dan Mahoney [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, October 28, 1999 10:05 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: Newbie problem with DBI under modperl
>
> > Hopefully you have a startup script you use to load various modules
> > into the server memory. If so, could you add the following to it:
> >
> > BEGIN {
> > $ENV{DBI_TRACE} = 2;
> > }
> >
> > This will cause DBI and Apache::DBI (as the case may be) to put a LOT
> > of information into the error file. This might help pinpoint the
> > problem. It sure helped me a lot. Then, if it's not readily
> > apparent what the problem is, post the relavent output so we can take
> > another look at it.
>
> Thanks for the pointer about DBI_TRACE; I tried it and
> collected some output. The increased level of output
> still doesn't allow me personally to figure out what's
> wrong; I'm still too new to mod_perl.
>
> The output I'm getting now looks like:
>
> httpd_1.3.4+raven: [Thu Oct 28 06:56:54 1999] [error] [Thu Oct 28 06:56:54
> 1999] headline.pm: IEO/headline.pm did not return a true value at (eval
> 53) line 2.
>
> [Thu Oct 28 06:56:54 1999] null: ------------------------------
> [Thu Oct 28 06:56:54 1999] null: About to open database at /dev/null line
> 0
> -> DBI->Apache::DBI::connect(DBI:mysql:database=news, root)
> -> DBI->install_driver(mysql) for perl=5.00502 pid=28905 ruid=20
> euid=20
> install_driver: DBD::mysql loaded (version 2.0406)
> <- install_driver= DBI::dr=HASH(0x3c5cbc)
> <- FETCH= 'mysql' ('Name' from cache) at DBI.pm line 64.
> -> connect for DBD::mysql::dr (DBI::dr=HASH(0x3c5cbc)~0x3b9394
> 'database=news' 'root' '' HASH(0x4e8af8))
> imp_dbh->connect: dsn = database=news, uid = root, pwd =
> imp_dbh->MyLogin: dbname = news, uid = root, pwd = NULL,host = NULL, port
> = NULL
> imp_dbh->MyConnect: host = NULL, port = 0, uid = root, pwd = NULL
> imp_dbh->MyConnect: client_flags = 0
> <- connect= DBI::db=HASH(0x3b9480) at DBI.pm line 120.
> -> STORE for DBD::mysql::db (DBI::db=HASH(0x47bf8c)~INNER 'PrintError'
> 1)
> <- STORE= 1 at DBI.pm line 407.
> -> STORE for DBD::mysql::db (DBI::db=HASH(0x47bf8c)~INNER 'AutoCommit'
> 1)
> <- STORE= 1 at DBI.pm line 407.
> <- connect= Apache::DBI::db=HASH(0x3b9480)
> [Thu Oct 28 06:56:54 1999] null: The db is now open at /dev/null line 0
> -> prepare for DBD::mysql::db (Apache::DBI::db=HASH(0x3b9480)~0x47bf8c
> 'SELECT headline, filename FROM story')
> Setting mysql_use_result to 0
> <- prepare= DBI::st=HASH(0x55757c) at headline.pm line 26.
> [Thu Oct 28 06:56:54 1999] null: We've done the prepare at /dev/null line
> 0
> -> execute for DBD::mysql::st (DBI::st=HASH(0x55757c)~0x3b951c)
> -> dbd_st_execute for 003b9558
> ase Selected error 30 recorded: ase Selected
> <- dbd_st_execute -2 rows
> !! ERROR: 30 'ase Selected'
> <- execute= undef at headline.pm line 30.
> [Thu Oct 28 06:56:54 1999] null: DBD::mysql::st execute failed: ase
> Selected at /usr/local/apache/smtp/perl-scripts/IEO/headline.pm line 30.
> -> rows for DBD::mysql::st (DBI::st=HASH(0x55757c)~0x3b951c)
> <- rows= -2 at headline.pm line 31.
> -> rows for DBD::mysql::st (DBI::st=HASH(0x55757c)~0x3b951c)
> <- rows= -2 at headline.pm line 33.
> [Thu Oct 28 06:56:54 1999] null: We got -2 records at /dev/null line 0
> -> fetchrow for DBD::mysql::st (DBI::st=HASH(0x55757c)~0x3b951c)
> -> dbd_st_fetch for 003b9558, chopblanks 0
> fetch() without execute() error 19 recorded: fetch() without execute()
> !! ERROR: 19 'fetch() without execute()'
> <- fetchrow= ( ) [0 items] at headline.pm line 34.
> [Thu Oct 28 06:56:54 1999] null: DBD::mysql::st fetchrow failed: fetch()
> without execute() at /usr/local/apache/smtp/perl-scripts/IEO/headline.pm
> line 34.
> -> DESTROY for DBD::mysql::st (DBI::st=HASH(0x3b951c)~INNER)
> <- DESTROY= undef at unknown location!
>
> It appears that something truly funky is happening
> with the $dbh->execute() call. In the output above
> dbd_st_execute is logging an "ERROR: 30 'ase Selected'";
> where is error 30 defined? Is that coming from DBD, mod_perl,
> or mysql? It appears that an incomplete chunk of text
> is coming out as a text message.
>
> Any pointers on where I ought to look next?
>
> Dan Mahoney
> [EMAIL PROTECTED]