LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: Shibi NS Date: Tue Aug 19 03:15:40 2008 Subject: DBI->connect ?
Tim,
Current version of my application uses apache 1.3.33 and mod_perl-1.30.
Now I am trying to migrate this one to apache 2.2.9 and mod_perl-2.0.4 and
both uses perl v5.8.6
cd /nfs/private/user/sns/apache2/src/httpd-2.2.9/
./configure --verbose --prefix=/nfs/private/user/sns/apache2
--enable-rewrite
--enable-expires --enable-setenvif --enable-include
--disable-asis
--disable-actions --disable-userdir
--enable-maintainer-mode
make
make install
cd /nfs/private/user/sns/apache2/src/CGI.pm-3.37/
perl Makefile.PL PREFIX=/nfs/private/user/sns/apache2
make
make test
make install
cd /nfs/private/user/sns/apache2/src/mod_perl-2.0.4/
perl Makefile.PL PREFIX=/nfs/private/user/sns/apache2
MP_APXS=/nfs/private/user/sns/apache2/bin/apxs MP_DEBUG=1 PERL_CHILD_INIT=1
PERL_STACKED_HANDLERS=1
make
make test
make install
Added following line to my httpd.conf
LoadModule perl_module modules/mod_perl.so
I am also using DBI-1.607 and DBD-Oracle-1.22 to connect to db (Oracle).
But as I call DBI->connect() I am getting "Segmentation fault" any idea why
this is happening . But the application seems to working fine
<Perl>
use DBI;
# Declare and initialize variables
my $host = 'localhost';
my $db = 'mydb';
my $db_user = 'sns';
my $db_password = 'sns';
# Connect to the requested server
my $dbh = DBI->connect("DBI:Oracle:mydb", "$db_user", "$db_password");
my $sth = $dbh->prepare("SELECT sysdate from dual");
$sth->execute();
$sth->finish();
$dbh->disconnect;
</Perl>
% ldd /nfs/private/user/sns/apache2/bin/httpd
/etc/libcwait.so => /etc/libcwait.so (0x006b0000)
libm.so.6 => /lib/i686/libm.so.6 (0x00cee000)
libaprutil-1.so.0 =>
/nfs/private/user/sns/apache2/lib/libaprutil-1.so.0 (0x0072b000)
libexpat.so.0 => /usr/lib/libexpat.so.0 (0x00c89000)
libapr-1.so.0 => /nfs/private/user/sns/apache2/lib/libapr-1.so.0
(0x00d8d000)
libuuid.so.1 => /lib/libuuid.so.1 (0x001f9000)
librt.so.1 => /lib/i686/librt.so.1 (0x00c4d000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x0039f000)
libpthread.so.0 => /lib/i686/libpthread.so.0 (0x007e5000)
libdl.so.2 => /lib/libdl.so.2 (0x008b7000)
libc.so.6 => /lib/i686/libc.so.6 (0x001fc000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00bb6000)
The log files are atached alone with zip file
% uname -a
Linux ap6415isd 2.4.21-47.0.1.6.2.ELhugemem #1 SMP Fri May 11 15:02:46 PDT
2007 i686 i686 i386 GNU/Linux
--Shibi Ns--
--
--Shibi Ns--
| Navigate in group perl.dbi.users at sever nntp.perl.org | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by PHP Developer
Powered By PHP Consultants |