Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: users

RE: :mysql

 

 

Bricolage users RSS feed   Index | Next | Previous | View Threaded


D-Beaudet at NGA

Dec 5, 2008, 11:34 AM

Post #1 of 1 (684 views)
Permalink
RE: :mysql

This is a SWAG, but I'd start by investigating whether there's an
alternative to having to specify the "use lib" in order to use
DBD::mysql. That just doesn't look right to me. Did you use CPAN to
install DBD::mysql?

> -----Original Message-----
> From: Schults, Chris [mailto:chris.schults [at] pccsea]
> Sent: Friday, December 05, 2008 2:23 PM
> To: users [at] lists
> Subject: DBD::mysql
>
> I realize that this really isn't a Bricolage question, but I thought
> y'all might be able to help ...
>
> I'm trying to develop a template that inserts data to into a MySQL
> database via DBI and DBD::mysql. However, my Bricolage template is
> resulting in a segmentation fault. Weird thing is that CGI scripts
> running on the same server can connect to MySQL fine when requested
from
> web browser.
>
> Here's my template:
>
> <%perl>
> use DBI;
> use lib
'/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi';
> # where DBD::mysql lives
>
> my $dsn = "DBI:mysql:database=database";
>
> # this causes segmentation fault
> my $dbh = DBI->connect($dsn, 'user', 'pass') or die "Couldn't connect
to
> database: " . DBI->errstr;
>
> $dbh->disconnect;
> </%perl>
>
> When I run a similar script from the command line, I get a
segmentation
> fault as well. When I run a CGI script from the command line, I get an
> error that it can't find DBD/mysql (as the CGI script does not include
> path to where the module is installed). But as I said, the CGI script
> works fine from the browser.
>
> Thanks for any insight into this.
>
> Chris

Bricolage users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.