well, it looks like you are using Apache::DBI? Did you try disabling that?
also, not that it matters for this problem, but setting RaiseError will keep
you from needing all those ||die things:
$dbh = DBI->connect("dbi:mysql:database=news", "user", "pass",
{RaiseError => 1, AutoCommit => 1, PrintError => 1}) || die
$DBI::errstr;
$sth = $dbh->prepare("SELECT headline, filename FROM story");
the archives of the DBI users list at
http://www.xray.mpe.mpg.de/mailing-lists/dbi/
might be of service in the future. I found some references to the same
error, but no solutions...
I'm not a mySQL user, so I may not be of much help other than this...
--Geoff
> -----Original Message-----
> From: Dan Mahoney [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, October 28, 1999 11:09 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: Newbie problem with DBI under modperl
>
> > 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.
>
> Cool, I did that - thanks for the pointer! Of course,
> the output is even more mysterious now to my inexperienced
> eyes....
>
> The output I'm getting now (in the error_log) looks like:
>
> DBI 1.13-nothread dispatch trace level set to 6
> Note: perl is running without the recommended perl -w option
> -> DBI->Apache::DBI::connect(DBI:mysql:database=news, root)
> -> DBI->install_driver(mysql) for perl=5.00502 pid=788 ruid=20 euid=20
> install_driver: DBD::mysql loaded (version 2.0406)
> New DBI::dr (for DBD::mysql::dr, parent=, id=)
> dbih_setup_handle(DBI::dr=HASH(0x3c5cbc)=>DBI::dr=HASH(0x3b948c),
> DBD::mysql::dr, 0, Null!)
> dbih_make_com(Null!, DBD::mysql::dr, 84)
> dbih_setup_attrib(DBI::dr=HASH(0x3b948c), Err, Null!) SCALAR(0x47c510)
> (already defined)
> dbih_setup_attrib(DBI::dr=HASH(0x3b948c), State, Null!)
> SCALAR(0x3c5f80) (already defined)
> dbih_setup_attrib(DBI::dr=HASH(0x3b948c), Errstr, Null!)
> SCALAR(0x47a69c) (already defined)
> dbih_setup_attrib(DBI::dr=HASH(0x3b948c), Handlers, Null!)
> ARRAY(0x3b963c) (already defined)
> dbih_setup_attrib(DBI::dr=HASH(0x3b948c), Debug, Null!) 0 (already
> defined)
> <- install_driver= DBI::dr=HASH(0x3c5cbc)
> >> FETCH DISPATCH (DBI::dr=HASH(0x3b948c) rc2/1 @2 g0 a5767c0)
> at /usr/local/lib/perl5/site_perl/5.005/Apache/DBI.pm line 64.
> <- FETCH= 'mysql' ('Name' from cache) at
> /usr/local/lib/perl5/site_perl/5.005/Apache/DBI.pm line 64.
> >> connect DISPATCH (DBI::dr=HASH(0x3c5cbc) rc1/5 @5 g0 a5767d0)
> at /usr/local/lib/perl5/site_perl/5.005/Apache/DBI.pm line 120.
> -> connect for DBD::mysql::dr (DBI::dr=HASH(0x3c5cbc)~0x3b948c
> 'database=news' 'root' '' HASH(0x523870))
> New DBI::db (for DBD::mysql::db, parent=DBI::dr=HASH(0x3b948c),
> id=HASH(0x3b94ec))
> dbih_setup_handle(DBI::db=HASH(0x3b9594)=>DBI::db=HASH(0x47c42c),
> DBD::mysql::db, 3c58dc, HASH(0x3b94ec))
> dbih_make_com(DBI::dr=HASH(0x3b948c), DBD::mysql::db, 536)
> dbih_setup_attrib(DBI::db=HASH(0x47c42c), Err, DBI::dr=HASH(0x3b948c))
> SCALAR(0x47c510) (already defined)
> dbih_setup_attrib(DBI::db=HASH(0x47c42c), State,
> DBI::dr=HASH(0x3b948c)) SCALAR(0x3c5f80) (already defined)
> dbih_setup_attrib(DBI::db=HASH(0x47c42c), Errstr,
> DBI::dr=HASH(0x3b948c)) SCALAR(0x47a69c) (already defined)
> dbih_setup_attrib(DBI::db=HASH(0x47c42c), Handlers,
> DBI::dr=HASH(0x3b948c)) ARRAY(0x3b963c) (already defined)
> dbih_setup_attrib(DBI::db=HASH(0x47c42c), Debug,
> DBI::dr=HASH(0x3b948c)) 0 (already defined)
> 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(0x3b9594) at
> /usr/local/lib/perl5/site_perl/5.005/Apache/DBI.pm line 120.
> >> STORE DISPATCH (DBI::db=HASH(0x47c42c) rc2/1 @3 g0 a5764d0)
> at /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBI.pm line 407.
> -> STORE for DBD::mysql::db (DBI::db=HASH(0x47c42c)~INNER 'PrintError'
> 1)
> STORE DBI::db=HASH(0x47c42c) 'PrintError' => 1
> <- STORE= 1 at
> /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBI.pm line 407.
> >> STORE DISPATCH (DBI::db=HASH(0x47c42c) rc2/1 @3 g0 a5764d0)
> at /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBI.pm line 407.
> -> STORE for DBD::mysql::db (DBI::db=HASH(0x47c42c)~INNER 'AutoCommit'
> 1)
> <- STORE= 1 at
> /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBI.pm line 407.
> <- connect= Apache::DBI::db=HASH(0x3b9594)
> >> prepare DISPATCH (Apache::DBI::db=HASH(0x3b9594) rc1/2 @2 g0
> a576650) at /usr/local/apache/smtp/perl-scripts/IEO/headline.pm line 27.
> -> prepare for DBD::mysql::db (Apache::DBI::db=HASH(0x3b9594)~0x47c42c
> 'SELECT headline, filename FROM story')
> New DBI::st (for DBD::mysql::st, parent=DBI::db=HASH(0x47c42c), id=)
> dbih_setup_handle(DBI::st=HASH(0x5575d0)=>DBI::st=HASH(0x3b9570),
> DBD::mysql::st, 5575dc, Null!)
> dbih_make_com(DBI::db=HASH(0x47c42c), DBD::mysql::st, 204)
> dbih_setup_attrib(DBI::st=HASH(0x3b9570), Err, DBI::db=HASH(0x47c42c))
> SCALAR(0x47c510) (already defined)
> dbih_setup_attrib(DBI::st=HASH(0x3b9570), State,
> DBI::db=HASH(0x47c42c)) SCALAR(0x3c5f80) (already defined)
> dbih_setup_attrib(DBI::st=HASH(0x3b9570), Errstr,
> DBI::db=HASH(0x47c42c)) SCALAR(0x47a69c) (already defined)
> dbih_setup_attrib(DBI::st=HASH(0x3b9570), Handlers,
> DBI::db=HASH(0x47c42c)) ARRAY(0x3b963c) (already defined)
> dbih_setup_attrib(DBI::st=HASH(0x3b9570), Debug,
> DBI::db=HASH(0x47c42c)) 0 (already defined)
> Setting mysql_use_result to 0
> <- prepare= DBI::st=HASH(0x5575d0) at
> /usr/local/apache/smtp/perl-scripts/IEO/headline.pm line 27.
> >> execute DISPATCH (DBI::st=HASH(0x5575d0) rc1/1 @1 g0 a563880)
> at /usr/local/apache/smtp/perl-scripts/IEO/headline.pm line 31.
> -> execute for DBD::mysql::st (DBI::st=HASH(0x5575d0)~0x3b9570)
> -> dbd_st_execute for 003b95e8
> ERROR EVENT 30 'ase Selected' on DBI::st=HASH(0x3b9570)
> ase Selected error 30 recorded: ase Selected
> <- dbd_st_execute -2 rows
> !! ERROR: 30 'ase Selected'
> <- execute= undef at
> /usr/local/apache/smtp/perl-scripts/IEO/headline.pm line 31.
> >> rows DISPATCH (DBI::st=HASH(0x5575d0) rc1/1 @1 g0 a563980)
> at /usr/local/apache/smtp/perl-scripts/IEO/headline.pm line 32.
> -> rows for DBD::mysql::st (DBI::st=HASH(0x5575d0)~0x3b9570)
> <- rows= -2 at /usr/local/apache/smtp/perl-scripts/IEO/headline.pm
> line 32.
> >> rows DISPATCH (DBI::st=HASH(0x5575d0) rc1/1 @1 g0 a563980)
> at /usr/local/apache/smtp/perl-scripts/IEO/headline.pm line 34.
> -> rows for DBD::mysql::st (DBI::st=HASH(0x5575d0)~0x3b9570)
> <- rows= -2 at /usr/local/apache/smtp/perl-scripts/IEO/headline.pm
> line 34.
> >> fetchrow DISPATCH (DBI::st=HASH(0x5575d0) rc1/1 @1 g1 a0) at
> /usr/local/apache/smtp/perl-scripts/IEO/headline.pm line 35.
> -> fetchrow for DBD::mysql::st (DBI::st=HASH(0x5575d0)~0x3b9570)
> -> dbd_st_fetch for 003b95e8, chopblanks 0
> ERROR EVENT 19 'fetch() without execute()' on DBI::st=HASH(0x3b9570)
> fetch() without execute() error 19 recorded: fetch() without execute()
> !! ERROR: 19 'fetch() without execute()'
> <- fetchrow= ( ) [0 items] at
> /usr/local/apache/smtp/perl-scripts/IEO/headline.pm line 35.
> >> DESTROY DISPATCH (DBI::st=HASH(0x5575d0) rc1/1 @1 g0 a0) at
> unknown location!
> <> DESTROY ignored for outer handle DBI::st=HASH(0x5575d0) (inner
> DBI::st=HASH(0x3b9570))
> >> DESTROY DISPATCH (DBI::st=HASH(0x3b9570) rc1/1 @1 g0 a0) at
> unknown location!
> -> DESTROY for DBD::mysql::st (DBI::st=HASH(0x3b9570)~INNER)
> <- DESTROY= undef at unknown location!
> dbih_clearcom (h 0x5575d0, com 0x564328):
> FLAGS 0x111: COMSET Warn PrintError
> TYPE 3
> PARENT DBI::db=HASH(0x47c42c)
> KIDS 0 (0 active)
> IMP_DATA undef in 'DBD::mysql::st'
> NUM_OF_FIELDS 0
> NUM_OF_PARAMS 0
> dbih_clearcom 0x5575d0 (com 0x564328, type 3) done.
>
> -> DBI::END
> >> disconnect_all DISPATCH (DBI::dr=HASH(0x3c5cbc) rc1/4 @1 g0
> a5766c0) at /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBI.pm line
> 424.
> -> disconnect_all for DBD::mysql::dr (DBI::dr=HASH(0x3c5cbc)~0x3b948c)
> <- disconnect_all= '' at
> /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBI.pm line 424.
> <- DBI::END complete
> >> DESTROY DISPATCH (Apache::DBI::db=HASH(0x3b9594) rc1/1 @1 g0
> a0) during global destruction.
> <> DESTROY ignored for outer handle Apache::DBI::db=HASH(0x3b9594)
> (inner DBI::db=HASH(0x47c42c))
> >> DESTROY DISPATCH (DBI::db=HASH(0x47c42c) rc1/1 @1 g0 a0) during
> global destruction.
> -> DESTROY for DBD::mysql::db (DBI::db=HASH(0x47c42c)~INNER)
> IMPLICIT ROLLBACK ON DESTROY!
> ERROR EVENT 15 'Rollback ineffective while AutoCommit is on' on
> DBI::db=HASH(0x47c42c)
> Rollback ineffective while AutoCommit is on error 15 recorded: Rollback
> ineffective while AutoCommit is on
> imp_dbh->svsock: 2e4e18
> <- DESTROY= undef during global destruction.
> dbih_clearcom (h 0x3b9594, com 0x2e4c08):
> FLAGS 0x111: COMSET Warn PrintError
> TYPE 2
> PARENT DBI::dr=HASH(0x3b948c)
> KIDS 0 (0 active)
> IMP_DATA HASH(0x3b94ec) in 'DBD::mysql::db'
> dbih_clearcom 0x3b9594 (com 0x2e4c08, type 2) done.
>
> >> DESTROY DISPATCH (DBI::dr=HASH(0x3c5cbc) rc1/1 @1 g0 a0) during
> global destruction.
> <> DESTROY ignored for outer handle DBI::dr=HASH(0x3c5cbc) (inner
> DBI::dr=HASH(0x3b948c))
> >> DESTROY DISPATCH (DBI::dr=HASH(0x3b948c) rc1/1 @1 g0 a0) during
> global destruction.
> -> DESTROY in DBD::_::common for DBD::mysql::dr
> (DBI::dr=HASH(0x3b948c)~INNER)
> <- DESTROY= undef during global destruction.
> dbih_clearcom (h 0x3c5cbc, com 0x58d3c8):
> FLAGS 0x215: COMSET Active Warn AutoCommit
> TYPE 1
> PARENT undef
> KIDS 1 (1 active)
> IMP_DATA undef in 'DBD::mysql::dr'
> dbih_clearcom 0x3c5cbc (com 0x58d3c8, type 1) done.
>
> > Are you using the latest drivers?
>
> I hope so! I'll go check now.
>
> Dan