Hello mod_perl world,

I'm running a new installation of Mason, with Apache::DBI, and everything on
the Mason side seems to be working well.

However, when I try to run this code:

* <%init>
*       use DBI;
*       my $dbh = DBI->connect("DBI:mysql:remembering", "root", "");
*       my $sth = $dbh->prepare("insert into users
*                                        (username, password, firstname, lastname)
*                                        values ('Bob', 'abc123', 'John', 'Doe')");
*
*       $dbh->execute;
* </%init>

I get this error:

Can't locate object method "execute" via package "Apache::DBI::db" at
/var/www/clients/remembering/users/new_user_submit.cmp line 8.

I have "PerlModule Apache::DBI" being called from my httpd.conf file in my
mod_perl enabled Apache 1.29

However! When I run this code:

* <%init>
*       use DBI;
* </%init>

* <%perl>
* for my $driver (DBI->available_drivers) {
*       print "$driver<br/>\n";
* }
* </%perl>

I get this output in response:

ExampleP
Proxy
Sponge
mysql

So DBI seems to be being called. I don't know why the "execute" method can't
be found. Can anyone help me figure out this problem? I'm really desperate.
All my versions of Mason, mod_perl, Apache, and MySQL are recent (within the
last two weeks).

Thanks,
Greg


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html

Reply via email to