
chris.schults at pccsea
Dec 5, 2008, 11:34 AM
Post #2 of 2
(909 views)
Permalink
|
A quick update: I just switched the order of my two use statements in my test Perl script and I am now getting this error when run from the command line: perl: symbol lookup error: /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/DB I.so: undefined symbol: Perl_Tstack_sp_ptr Chris > -----Original Message----- > From: Schults, Chris [mailto:chris.schults [at] pccsea] > Sent: Friday, December 05, 2008 11:23 AM > 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
|