Gossamer Forum
Quote Reply
mod_perl
I'm trying to install GForum with mod_perl and added the necessary stuff into httpd.conf and created the startup file and when I restarted apache it told me Apache::DBI was missing so I installed it:

>>

CPAN.pm: Going to build M/ME/MERGL/ApacheDBI-0.88.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Apache::DBI
cp DBI.pm blib/lib/Apache/DBI.pm
cp AuthDBI.pm blib/lib/Apache/AuthDBI.pm
Manifying blib/man3/Apache::DBI.3
Manifying blib/man3/Apache::AuthDBI.3
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/local/bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.6.1/i686-linux -I/usr/local/lib/perl5/5.6.1 test.pl

sorry, no test sequence available.
/usr/bin/make test -- OK
Running make install
Installing /usr/local/lib/perl5/site_perl/5.6.1/Apache/DBI.pm
Installing /usr/local/lib/perl5/site_perl/5.6.1/Apache/AuthDBI.pm
Installing /usr/local/man/man3/Apache::DBI.3
Installing /usr/local/man/man3/Apache::AuthDBI.3
Writing /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/auto/Apache/DBI/.packlist
Appending installation info to /usr/local/lib/perl5/5.6.1/i686-linux/perllocal.pod
/usr/bin/make install -- OK
<<

....however when I restart apache it still says Apache::DBI is missing but when I try to install it I see:

Apache::DBI is up to date.

Its got to be something simple, but I can't seem to find what the problem is.

Last edited by:

RedRum: Feb 14, 2002, 4:06 AM
Quote Reply
Re: [RedRum] mod_perl In reply to
Is there a setting to show if GForum is running under mod_perl like Links SQL does? I can't seem to find it.

Btw...in mod_perl.pm I changed:

if ($MOD_PERL) { require Apache::DBI; }

to:

if (!$MOD_PERL) { require Apache::DBI; }

....just to get rid of the error for the time being.

Last edited by:

RedRum: Feb 14, 2002, 4:59 AM
Quote Reply
Re: [RedRum] mod_perl In reply to
A quick & dirty way that works for Adcycle, is to turn off PerlSender. You'll get a load of guff at the top of the screen if it's under mod_perl.
Quote Reply
Re: [RedRum] mod_perl In reply to
Any ideas anyone?
Quote Reply
Re: [RedRum] mod_perl In reply to
For some reason we don't have an environment link in Setup. There is one in FileMan though, if you goto admin.cgi?do=fileman and then goto Preferences->Environment, you should see mod_perl (1) if it's running under mod_perl.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] mod_perl In reply to
Ooo ....

Persistant Env: mod_perl (1) SpeedyCGI (0)

....that's with $MOD_PERL changed to !$MOD_PERL

As soon as I change it back it tells be Apache::DBI is missing.
Quote Reply
Re: [Alex] mod_perl In reply to
shell> locate DBI

/root/.cpan/build/ApacheDBI-0.88
/root/.cpan/build/ApacheDBI-0.88/eg
/root/.cpan/build/ApacheDBI-0.88/eg/startup.pl
/root/.cpan/build/ApacheDBI-0.88/AuthDBI.pm
/root/.cpan/build/ApacheDBI-0.88/Changes
/root/.cpan/build/ApacheDBI-0.88/DBI.pm
/root/.cpan/build/ApacheDBI-0.88/MANIFEST
/root/.cpan/build/ApacheDBI-0.88/Makefile.PL
/root/.cpan/build/ApacheDBI-0.88/README
/root/.cpan/build/ApacheDBI-0.88/test.pl
/root/.cpan/build/ApacheDBI-0.88/traces.txt
/root/.cpan/build/ApacheDBI-0.88/blib
/root/.cpan/build/ApacheDBI-0.88/blib/lib
/root/.cpan/build/ApacheDBI-0.88/blib/lib/Apache
/root/.cpan/build/ApacheDBI-0.88/blib/lib/Apache/.exists
/root/.cpan/build/ApacheDBI-0.88/blib/lib/Apache/DBI.pm
/root/.cpan/build/ApacheDBI-0.88/blib/lib/Apache/AuthDBI.pm
/root/.cpan/build/ApacheDBI-0.88/blib/lib/auto
/root/.cpan/build/ApacheDBI-0.88/blib/lib/auto/Apache
/root/.cpan/build/ApacheDBI-0.88/blib/lib/auto/Apache/DBI
/root/.cpan/build/ApacheDBI-0.88/blib/lib/auto/Apache/DBI/.exists
/root/.cpan/build/ApacheDBI-0.88/blib/arch
/root/.cpan/build/ApacheDBI-0.88/blib/arch/auto
/root/.cpan/build/ApacheDBI-0.88/blib/arch/auto/Apache
/root/.cpan/build/ApacheDBI-0.88/blib/arch/auto/Apache/DBI
/root/.cpan/build/ApacheDBI-0.88/blib/arch/auto/Apache/DBI/.exists
/root/.cpan/build/ApacheDBI-0.88/blib/man3
/root/.cpan/build/ApacheDBI-0.88/blib/man3/.exists
/root/.cpan/build/ApacheDBI-0.88/blib/man3/Apache::DBI.3
/root/.cpan/build/ApacheDBI-0.88/blib/man3/Apache::AuthDBI.3
/root/.cpan/build/ApacheDBI-0.88/Makefile
/root/.cpan/build/ApacheDBI-0.88/pm_to_blib
Quote Reply
Re: [RedRum] mod_perl In reply to
Doesn't look like Apache::DBI is installed. It should be in /usr/lib/perl somewhere. The files you list are only the files CPAN module used during installation.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] mod_perl In reply to
When I do:

perl -MCPAN -e 'install Apache::DBI'

...I see:

[root@paul /root]# perl -MCPAN -e 'install Apache::DBI'
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
Going to read /root/.cpan/sources/modules/02packages.details.txt.gz
Database was generated on Fri, 15 Feb 2002 01:40:53 GMT
CPAN: HTTP::Date loaded ok
Going to read /root/.cpan/sources/modules/03modlist.data.gz
Apache::DBI is up to date.
[root@paul /root]#
Quote Reply
Re: [RedRum] mod_perl In reply to
Hi,

Is this the same version of perl you used to build mod_perl?

In your startup.pl add:

warn "VERSION: $]\nINC: " . join ("\n\t", @INC), "\n";

and see what it says.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] mod_perl In reply to
Here's what it says:

VERSION: 5.006
INC: /home/httpd/vhosts/wiredon.net/cgi-bin/forum/admin
/usr/lib/perl5/5.6.0/i386-linux
/usr/lib/perl5/5.6.0
/usr/lib/perl5/site_perl/5.6.0/i386-linux
/usr/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/site_perl
.
/etc/httpd/
/etc/httpd/lib/perl
Quote Reply
Re: [RedRum] mod_perl In reply to
And what does perl -v say from shell? Is there a Apache/DBI.pm in one of those INC directories?

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] mod_perl In reply to
I did a manual install into one of the libs, changed !$MOD_PERL back to $MOD_PERL and I don't get the error anymore.

Very strange.

FYI perl -v gives v5.6.1

Last edited by:

RedRum: Feb 15, 2002, 1:29 PM
Quote Reply
Re: [RedRum] mod_perl In reply to
Ah, that makes sense now.

When you installed Apache::DBI, you installed it using perl -MCPAN -e 'shell' right? Well this installed it using Perl 5.6.1.

However, mod_perl was built using perl 5.6.0, so it's using a different set of libraries and does not have access to the module you installed.

You want to do:

perl5.6.0 -MCPAN -e 'install Apache::DBI'

to install it for the same version mod_perl is using.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [RedRum] mod_perl In reply to
You don't want to comment that out as Apache::DBI is needed. You'll run into random database errors without it.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] mod_perl In reply to
Apache::DBI is being required as normal now.

I tried that perl5.6.0 command and it still says it is up to date.

It must have found the manually installed module as the error has gone. That was installed into a 5.6.1 lib though

Unsure

Last edited by:

RedRum: Feb 15, 2002, 1:53 PM