Error starting Apache

I think (i’m not a linux guru), i got Apache with mod_perl installed
correctly. How can I check this?

Anyway when I try to start up Apache i get the following error:
=======================Start error message
Starter httpd: Syntax error on line 750 of /etc/httpd/conf/httpd.conf:
Can’t locate Apache/DBI.pm in @INC (@INC contains:
/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) at (eval 4)
line 3.

e[60G[e[1;31mFEILETe[0;39m]
=======================End error message

Heres the part I have inserted into my /etc/httpd/conf/httpd.conf:
=======================Start offending section

Virtualhost rt2.lindconsult.no

<VirtualHost 192.168.1.1>
DocumentRoot /usr/local/rt2/WebRT/html/
ServerName rt.lindconsult.no
PerlModule Apache::DBI #<-----line 750
PerlFreshRestart on
PerlRequire /usr/local/rt2/bin/webmux.pl

SetHandler perl-script
PerlHandler RT::Mason
</Location

=======================End offending section
Theres allso all sorts of other stuff in it that I dont understand.

Does anybody have a hint as to what might be wrong?

Can’t locate Apache/DBI.pm in @INC (@INC contains:
/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) at (eval 4)

I just checked, and DBI.pm is located on 3 places:

/usr/lib/perl5/site_perl/5.6.0/i386-linux/DBI.pm
/usr/lib/perl5/site_perl/5.6.0/i386-linux/bundle/DBI.pm
/usr/lib/perl5/site_perl/5.6.0/Apache/Session/Store/DBI.pm

It should find the first one right, cause this one is in @INC above. So
I guess it is a permission problem, or what?

Olav!

Olav,

you actually answered your question already…

DBI.pm isn’t located anywhere in ther @INC paths:

/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

Try either reinstalling DBI.pm by hand compiling it (perl Makefile.PL, make, make test, make install) or make a symlink (not the best solution!) so it points to the DBI.pm where it is located… ln -s /usr/lib/perl/site_perl/5.6.0/i386-linux/DBI.pm /usr/lib/perl5/5.6.0/i386-linux/DBI.pm .

That should fix your problem.

Regards,
AleshOn Sat, 2 Feb 2002, Olav [ISO-8859-1] Lindkjølen wrote:

Date: Sat, 02 Feb 2002 17:44:26 +0100
From: “Olav [ISO-8859-1] Lindkjølen” olav.lind@online.no
To: “Olav [ISO-8859-1] Lindkjølen” olav.lind@online.no
Cc: rt-users@lists.fsck.com
Subject: Re: [rt-users] Error starting Apache…

Can’t locate Apache/DBI.pm in @INC (@INC contains:
/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) at (eval 4)

I just checked, and DBI.pm is located on 3 places:

/usr/lib/perl5/site_perl/5.6.0/i386-linux/DBI.pm
/usr/lib/perl5/site_perl/5.6.0/i386-linux/bundle/DBI.pm
/usr/lib/perl5/site_perl/5.6.0/Apache/Session/Store/DBI.pm

It should find the first one right, cause this one is in @INC above. So
I guess it is a permission problem, or what?

Olav!


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

DBI.pm isn’t located anywhere in ther @INC paths:

/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

Try either reinstalling DBI.pm by hand compiling it (perl Makefile.PL, make, make test, make install) or make a symlink (not the best solution!) so it points to the DBI.pm where it is located… ln -s /usr/lib/perl/site_perl/5.6.0/i386-linux/DBI.pm /usr/lib/perl5/5.6.0/i386-linux/DBI.pm .

That should fix your problem.

First solution didn’t (reinstalling it by hand, perl Makefile.PL, make,
make test, make install), no errors though, but I still cant start
Apache. Same error.

Olav!

Try either reinstalling DBI.pm by hand compiling it (perl Makefile.PL, make, make test, make install) or make a symlink (not the best solution!) so it points to the DBI.pm where it is located… ln -s /usr/lib/perl/site_perl/5.6.0/i386-linux/DBI.pm /usr/lib/perl5/5.6.0/i386-linux/DBI.pm .

Second sugestion didn’t work either…

Olav!

Anyway when I try to start up Apache i get the following error:
=======================Start error message
Starter httpd: Syntax error on line 750 of /etc/httpd/conf/httpd.conf:
Can’t locate Apache/DBI.pm in @INC (@INC contains:

 PerlModule Apache::DBI #<-----line 750

In one of your @INC directories, there should be a subdirectory named
’Apache’. In that directory, DBI.pm should exist. If it does, you have a
permissions problem (the user running the web server must be able to read
the file, and have at least execute permission on all directories leading
to where the file is).

You can find the file by invoking ‘locate’, ie: (note that not any old
DBI.pm will do, we want one in a directory named ‘Apache’)

locate DBI.pm | grep Apache

If that doesn’t work, brute force will:

find / -path \*Apache/DBI.pm -print

If you really don’t have Apache/DBI.pm, you need to install it manually,
via:

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

( you will probably also need to rinse and repeat for Apache::Session.
See http://www.fsck.com/rtfm/ and search for ‘Apache::’ )

/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) at (eval 4)
line 3.

Regards,

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B                      Operations

locate DBI.pm | grep Apache

This found: /usr/lib/perl5/site_perl/5.6.0/Apache/Sessions/Store/DBI.pm

( you will probably also need to rinse and repeat for Apache::Session.

How do I rinse?

Olav!

locate DBI.pm | grep Apache

This found: /usr/lib/perl5/site_perl/5.6.0/Apache/Sessions/Store/DBI.pm

Perl will see the above file as Apache::Sessions::Store::DBI , not quite
the file you want. You’re wanting something like
/usr/lib/perl5/site_perl/5.6.0/Apache/DBI.pm .

Use CPAN as per the previosu mail and you’ll be all set to go.

( you will probably also need to rinse and repeat for Apache::Session.

How do I rinse?

Ah. Its a slang expression to indicate that you might have to repeat the
previous procedure for something else. It derives from the common
Shampooing instructions ‘Lather well into hair. Rinse, Repeat’. Note
that the lack of an end-condition is the reasons why most Programmers have
wild, unkempt hair. :wink:

Regards,

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B                      Operations

If you really don’t have Apache/DBI.pm, you need to install it manually,
via:

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

Worked :slight_smile:

( you will probably also need to rinse and repeat for Apache::Session.

See http://www.fsck.com/rtfm/ and search for ‘Apache::’ )

Now I can start httpd, but got another problem when trying to access it
Internal Server error, and this entry in /var/log/httpd/error_log:

[Sat Feb 2 15:43:49 2002] [error] Can’t write to
’/var/log/rt.log.21089.0’: Permission denied at
/usr/lib/perl5/site_perl/5.6.0/Log/Dispatch/File.pm line 68.

What permissions are wrong?
I tried to change owner and group to rt:rt, and root:rt. Allso tried
chmod g+w rt.log* in var/log

Olav!

If you really don’t have Apache/DBI.pm, you need to install it manually,
via:

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

Worked :slight_smile:

Cool.

( you will probably also need to rinse and repeat for Apache::Session.

See http://www.fsck.com/rtfm/ and search for ‘Apache::’ )

Now I can start httpd, but got another problem when trying to access it
from my win box:
Internal Server error, and this entry in /var/log/httpd/error_log:

[Sat Feb 2 15:43:49 2002] [error] Can’t write to
’/var/log/rt.log.21089.0’: Permission denied at
/usr/lib/perl5/site_perl/5.6.0/Log/Dispatch/File.pm line 68.

What permissions are wrong?

The user that your web server runs as is trying to create a log file for
RT as defined in etc/config.pm . I would suggest that you create a
directory ‘/var/log/rt’, chown that directory to be the web user, and edit
etc/config.pm ($LogDir) to point to that directory.

Regards,

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B                      Operations