CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: DBI:
Web Server fails to start DBI related

 



poltrojan
New User

Jun 18, 2008, 11:06 AM

Post #1 of 2 (3297 views)
Web Server fails to start DBI related Can't Post

Ok here is the problem that i have.

I had updated Perl from 5.8 to 5.10
the system is CentOS 5.
installed a program called Request Tracker. (RT)

here is the information below.

-------------------------------------------------------------------

The virtual host configurations file (httpd.conf)



------------------------------------------------------------------------------------------



<VirtualHost _default_>

ServerName example.com

DocumentRoot /opt/rt3/share/html

AddDefaultCharset UTF-8



# this line applies to Apache2+mod_perl only

#PerlModule Apache2 Apache::compat



PerlModule Apache::DBI

PerlRequire /opt/rt3/bin/webmux.pl



<Location />

SetHandler perl-script

PerlHandler RT::Mason

</Location>



#UseCanonicaName Off

ServerAdmin me@example.com

</VirtualHost>

------------------------------------------------------------------------------------------





The following error message I get when I start the webserver is;



------------------------------------------------------------------------------------------



[error] Can't locate DBIx/SearchBuilder.pm in @INC (@INC contains:



/opt/rt3/local/lib

/opt/rt3/lib

/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi

/usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi

/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi

/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi

/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7

/usr/lib/perl5/site_perl/5.8.6

/usr/lib/perl5/site_perl/5.8.5

/usr/lib/perl5/site_perl

/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi

/usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi

/usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi

/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi

/usr/lib/perl5/vendor_perl/5.8.8

/usr/lib/perl5/vendor_perl/5.8.7

/usr/lib/perl5/vendor_perl/5.8.6

/usr/lib/perl5/vendor_perl/5.8.5

/usr/lib/perl5/vendor_perl

/usr/lib/perl5/5.8.8/i386-linux-thread-multi

/usr/lib/perl5/5.8.8 .



/etc/httpd) at /opt/rt3/lib/RT/SearchBuilder.pm line 72.\n

BEGIN failed--compilation aborted at /opt/rt3/lib/RT/SearchBuilder.pm line 72.\n

Compilation failed in require at /opt/rt3/lib/RT/Principals.pm line 74.\n

BEGIN failed--compilation aborted at /opt/rt3/lib/RT/Principals.pm line 74.\n

Compilation failed in require at /opt/rt3/lib/RT/User_Overlay.pm line 81.\n

BEGIN failed--compilation aborted at /opt/rt3/lib/RT/User_Overlay.pm line 81.\n

Compilation failed in require at (eval 81) line 3.\n

Compilation failed in require at /opt/rt3/lib/RT/Record.pm line 77.\n

BEGIN failed--compilation aborted at /opt/rt3/lib/RT/Record.pm line 77.\n

Compilation failed in require at /opt/rt3/lib/RT/CurrentUser.pm line 74.\n

BEGIN failed--compilation aborted at /opt/rt3/lib/RT/CurrentUser.pm line 74.\n

Compilation failed in require at /opt/rt3/lib/RT.pm line 51.\n

BEGIN failed--compilation aborted at /opt/rt3/lib/RT.pm line 51.\n

Compilation failed in require at /opt/rt3/bin/webmux.pl line 68.\n

BEGIN failed--compilation aborted at /opt/rt3/bin/webmux.pl line 68.\n

Compilation failed in require at (eval 2) line 1.\n

[error] Can't load Perl file: /opt/rt3/bin/webmux.pl for server sjmticket.stjosephmedia.com:0, exiting.



------------------------------------------------------------------------------------------



I did a search for “SearchBuilder.pm” and the following location that yielded was;



------------------------------------------------------------------------------------------



/opt/rt3/lib/RT/SearchBuilder.pm

/root/.cpan/build/DBIx-SearchBuilder-1.53-epDGes/SearchBuilder.pm

/root/.cpan/build/DBIx-SearchBuilder-1.53-epDGes/blib/lib/DBIx/SearchBuilder.pm

/usr/local/lib/perl5/site_perl/5.10.0/DBIx/SearchBuilder.pm



------------------------------------------------------------------------------------------





So basically what I am looking at is that the old PERL (5.8.8) wasn’t overwritten when I had updated to PERL 5.10 version, which it does register in the system if I check the version, but the apaches doesn’t.

the perl -v output is below
--------------------------------------------------------------------
[root@example conf]# perl -V
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
Platform:
osname=linux, osvers=2.6.18-53.1.21.el5, archname=i686-linux
uname='linux sjmticket.sjmedia.mag 2.6.18-53.1.21.el5 #1 smp tue may 20 09:34:18 edt 2008 i686 i686 i386 gnulinux '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fno-strict-aliasing -pipe -I/usr/local/include'
ccversion='', gccversion='4.1.2 20070626 (Red Hat 4.1.2-14)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.5.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.5'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib'


Characteristics of this binary (from libperl):
Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
USE_LARGE_FILES USE_PERLIO
Built under linux
Compiled at May 27 2008 14:36:24
@INC:
/usr/local/lib/perl5/5.10.0/i686-linux
/usr/local/lib/perl5/5.10.0
/usr/local/lib/perl5/site_perl/5.10.0/i686-linux
/usr/local/lib/perl5/site_perl/5.10.0

--------------------------------------------------------------------
Any ideas how I can fix this? Thx.


pengo
New User

Jul 1, 2008, 7:33 AM

Post #2 of 2 (2909 views)
Re: [poltrojan] Web Server fails to start DBI related [In reply to] Can't Post

one way to incluse the 5.10 modules with your apache is this

create a file named perl5.10.pl in the same directory as httpd.conf
open perl5.10.pl and add the following lines into it


Code
#!/usr/bin/perl -W 
use strict;

use lib '/usr/local/lib/perl5/5.10.0/i686-linux';
use lib '/usr/local/lib/perl5/5.10.0';
use lib '/usr/local/lib/perl5/site_perl/5.10.0/i686-linux';
use lib '/usr/local/lib/perl5/site_perl/5.10.0';

1;


open httpd.conf and add the following line before the line " PerlModule Apache::DBI"

Code
PerlRequire /path/to/apache/conf/perl5.10.pl


change the /path/to/apache/conf to the path where your httpd.conf resides
restart apache and let me know if everything is ok


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives