Question on enabling Apache:DBI

Moderator: crythias

Post Reply
ptay
Znuny newbie
Posts: 85
Joined: 13 Jul 2010, 18:55
Znuny Version: 5.0.10

Question on enabling Apache:DBI

Post by ptay »

Anyone able to assist with enabling Apache::DBI?

I am following the steps here to enable Apache::DBI.

I updated /opt/otrs/scripts/apache2-perl-startup.pl file to this:

Code: Select all

use Apache::DBI ();
Apache::DBI->connect_on_init('DBI:mysql:otrs', 'otrs', 'my_mysql_pwd');
use DBI ();
When I restart httpd it fails to start. I also tried 'DBI:mysql:database' in place of 'DBI::mysql:otrs'

Apache error log shows:

Code: Select all

[Mon Jul 19 17:59:20 2010] [notice] caught SIGTERM, shutting down
[Mon Jul 19 17:59:21 2010] [error] Can't locate Apache/DBI.pm in @INC (@INC contains: /opt/otrs/Kernel/cpan-lib /opt/otrs/ /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 . /etc/httpd) at /opt/otrs/scripts/apache2-perl-startup.pl line 47.\nBEGIN failed--compilation aborted at /opt/otrs/scripts/apache2-perl-startup.pl line 47.\nCompilation failed in require at (eval 2) line 1.\n
[Mon Jul 19 17:59:21 2010] [error] Can't load Perl file: /opt/otrs/scripts/apache2-perl-startup.pl for server orca:80, exiting...
I believe the issue with my DBI::mysql::otrs entry. Apache docs say $data_source goes there.

Here is my relevant db settings in Config.pm:

Code: Select all

# ---------------------------------------------------- #
    # database settings                                    #
    # ---------------------------------------------------- #
    # DatabaseHost
    # (The database host.)
    $Self->{'DatabaseHost'} = 'localhost';
    # Database
    # (The database name.)
    $Self->{'Database'} = 'otrs';
    # DatabaseUser
    # (The database user.)
    $Self->{'DatabaseUser'} = 'otrs';
    # DatabasePw
    # (The password of database user. You also can use bin/CryptPassword.pl
    # for crypted passwords.)
    $Self->{'DatabasePw'} = 'xxxxxxxxxxx';
    # DatabaseDSN
    # (The database DSN for MySQL ==> more: "man DBD::mysql")
    $Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{Da
tabaseHost};";
Any suggestions would be great.
Test:: OTRS 5.0.10 w/MariaDB 5.5.47 backend on RHEL7
Prod:: OTRS 5.0.10 w/MariaDB 5.5.47 backend on RHEL7
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Question on enabling Apache:DBI

Post by crythias »

It does not appear that Apache::DBI is installed on your system.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
ptay
Znuny newbie
Posts: 85
Joined: 13 Jul 2010, 18:55
Znuny Version: 5.0.10

Re: Question on enabling Apache:DBI

Post by ptay »

Thank you much crythias, I installed Apache::DBI and it works!
Test:: OTRS 5.0.10 w/MariaDB 5.5.47 backend on RHEL7
Prod:: OTRS 5.0.10 w/MariaDB 5.5.47 backend on RHEL7
Post Reply