Segmentation fault at DBI->connect

From: Naya Sutapanit (bowchung_at_hotmail.com)
Date: 12/15/04


To: dbi-users@perl.org
Date: Wed, 15 Dec 2004 06:50:26 +0000

Hi, all
I'm trying to connect database in MySQL by Perl DBI but I found segmentation
fault at DBI->connect
Here is my code
----------------------------------------------------------------------------------------------------------------------
#!/usr/bin/perl -w

use strict;
use DBI;

print "connect to dababase\n";

my @driver_names = DBI->available_drivers;
my $name;
foreach $name(@driver_names){
        print $name."\n";
}

my $dbh = DBI->connect('DBI:mysql:test') or die "Cannot connect db" .
DBI->errstr;
print "finish";
-----------------------------------------------------------------------------------------------------------------------------------
After I run, here is the output

[root@sflow cgi-bin]# ./connectDB.pl
connect to dababase
ExampleP
Pg
Proxy
Sponge
mysql
Segmentation fault
--------------------------------------------------------------------------------------------------------------------------------------

I use mySQL4.1.7, perl5.8.3 on Fedora core2.
What's wrong??

Thank you in advance
Naya

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/



Relevant Pages

  • Re: dupe times in Time::HiRes
    ... Resolution (well, a reduction of symptoms at least): ... and that either DBI::DBD and/or MySQL are at fault. ... code that allows anyone to reproduce the fault next email. ...
    (comp.lang.perl.modules)
  • Re: constant string
    ... > my question is when i compile this in Linux (gcc) i get a segmentation ... and i get a segmentation fault (and i also noticed ...
    (comp.lang.c)
  • Re: regarding handling segmentation fault
    ... Is there any way where in I can invocate page fault exception during ... >> way can we handle segmentation caused by accessing page which is not ... > If you have tried to access an incorrect address causing a seg fault, ... > Erik de Castro Lopo nospam@mega-nerd.com ...
    (comp.os.linux.development.system)
  • constant string
    ... my question is when i compile this in Linux (gcc) i get a segmentation ... ' any thing enclosed between " and " is a string constant' so here i am ... and i get a segmentation fault (and i also noticed ...
    (comp.lang.c)
  • Re: understanding pointers
    ... that "Segmentation fault"? ... it yield the value 't', of type char. ... You can't *modify* a string literal, ...
    (comp.lang.c)