Solaris 10 + Apache 2 + mysql + DBD

Hi all.

I am working on getting RT working on a Solaris 10 x86 system using
Apache 2, mod_perl2 and Mysql.

When I start Apache 2 it fires up fine. However as it accepts a
connection I get the Apache 2 clean install test page and the following
log entry shows up in error_log:

[Wed Nov 09 15:58:58 2005] [error] [client an.ip.address] DBD::mysql
initialisation failed: Can’t locate object method “driver” via package
“DBD::mysql” at /opt/csw/lib/perl/csw/DBI.pm line 747.\n\nPerhaps the
capitalisation of DBD ‘mysql’ isn’t right. at
/opt/csw/share/perl/site_perl/DBIx/SearchBuilder/Handle.pm line 108\n

The following is where my DBD.pm perl module instances are located:

/opt/csw/share/perl/site_perl/DBIx/DBSchema/DBD.pm

/opt/csw/lib/perl/csw/DBI/DBD.pm

In both cases I have tried removing one and then the other in case (long
shot) there was some interference.

The RT section of httpd.conf reads like:

ServerName a.url.com.au

DocumentRoot /opt/rt3/share/html

AddDefaultCharset UTF-8



PerlModule Apache2 Apache2::compat



PerlModule Apache2 Apache::DBI

PerlRequire /opt/rt3/bin/webmux.pl



<Location>

    SetHandler perl-script

    PerlHandler RT::Mason

</Location>



RedirectMatch permanent (.*)/$ http://fsck.com$1/index.html

http://fsck.com$1/index.html

The MySQL database is located on another machine, but I have confirmed
that this is accessible using the local mysql client and have confirmed
that the mysql access credentials are correct in the RT configuration.

As some of you may have worked out, I am using the BlastWave Solaris
packages, as this has yielded the best result so far. I am using their
Perl, Apache2, Mysql4, gcc3 and perl modules where available. All other
modules have been installed via CPAN.

So, with all this in hand, does anyone have any thoughts as to why the
“driver” object method might not be getting found?

Thanks,

BenR

Hi all.

I am working on getting RT working on a Solaris 10 x86 system using Apache
2, mod_perl2 and Mysql.

When I start Apache 2 it fires up fine. However as it accepts a connection
I get the Apache 2 clean install test page and the following log entry shows
up in error_log:

[Wed Nov 09 15:58:58 2005] [error] [client an.ip.address] DBD::mysql
initialisation failed: Can’t locate object method “driver” via package
“DBD::mysql” at /opt/csw/lib/perl/csw/DBI.pm line 747.\n\nPerhaps the
capitalisation of DBD ‘mysql’ isn’t right. at
/opt/csw/share/perl/site_perl/DBIx/SearchBuilder/Handle.pm
line 108\n

The following is where my DBD.pm perl module instances are located:

/opt/csw/share/perl/site_perl/DBIx/DBSchema/DBD.pm

/opt/csw/lib/perl/csw/DBI/DBD.pm
Please, locate “DBD/mysql.pm” file. AFAIU it should be under /opt/csw/ dir.
[snip]

As some of you may have worked out, I am using the BlastWave Solaris
packages, as this has yielded the best result so far. I am using their
Perl, Apache2, Mysql4, gcc3 and perl modules where available. All other
modules have been installed via CPAN.
Are you sure that BlastWave’s perl has access to modules you’ve
installed manually?

So, with all this in hand, does anyone have any thoughts as to why the
“driver” object method might not be getting found?

Thanks,

BenR

Best regards, Ruslan.

The following is where my DBD.pm perl module instances are located:

/opt/csw/share/perl/site_perl/DBIx/DBSchema/DBD.pm

/opt/csw/lib/perl/csw/DBI/DBD.pm
Please, locate “DBD/mysql.pm” file. AFAIU it should be
under /opt/csw/ dir. [snip]

As some of you may have worked out, I am using the BlastWave Solaris
packages, as this has yielded the best result so far. I am using
their Perl, Apache2, Mysql4, gcc3 and perl modules where
available. All other modules have been installed via CPAN.
Are you sure that BlastWave’s perl has access to modules you’ve
installed manually?

This is a good point Ruslan and if Ben still has problems, I should be
able to help him.

I build most of the blastwave perl modules and most of those modules
are built for my production RT site. However, I do not use apache2,
mod_perl2 or mysql, so there may be a few modules missing from the
blastwave packages. I use apache, mod_perl and postgresql. I also use
the same except using mysql4 on a test Solaris host.

The OP can mail be privately on any modules needed and I will see what
I can do. If the OP is building modules using gcc that create shared
library objects, then that could be a problem.

I attached a brief description of how I build perl modules. Also
attached is a file to source for setting up the build environment. Of
course, the compiler options (CC, CXX, F77, CFLAGS) are wrong for the
OP.

I will also try to help in other ways, such as my build scripts for RT,
if desired. Or if you want to start with apache, mod_perl, it is a
fairly simple path to install my RT package.

Alex

perl-BUILD.NOTES.txt (193 Bytes)

perl-myflags.i386 (393 Bytes)

Thanks for the follow up guys, but I managed to solve all my problems.

This problem, and a later one I posted about, both existed due to
duplicate DBI and DBD library sets existing in the /opt/csw path.

e.g.
/opt/csw/share/perl/site_perl/DBIx/DBSchema/DBD.pm
/opt/csw/lib/perl/csw/DBI/DBD.pm

When I changed the name of the “correct” one, from say DBD.pm to
DBD.pm~bak, suddenly everything started working. BINGO!!!

My build method, and I hope to find time to generate a build document,
was to essentially follow the RT install guide, but as it had a
requirement I installed the Blastwave package.

So, as I required Apache : % pkg-get -i Apache2
… as I required perl : % pkg-get -i perl
Etc…

The most noticeable variation to the RT install documentation that I
took, was when it said to “% make fixdeps”, I did “% gmake testdeps” and
ran down the list of not-found dependencies (this was a Solaris 10 core
install, so there were plenty). I then used the Blastwave package
manager to install as many of those as possible, instead of letting “%
gmake fixdeps” do all of the leg work. This meant that when I did
‘fixdeps’ it was almost a works first time job.

So everything is working great now. The only way Blastwave could have
made my life any easier would have been if “% pkg-get -I RT” worked.

Thanks,
BenRFrom: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Alex
Moore
Sent: Friday, 11 November 2005 10:26 AM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Solaris 10 + Apache 2 + mysql + DBD

The following is where my DBD.pm perl module instances are located:

/opt/csw/share/perl/site_perl/DBIx/DBSchema/DBD.pm

/opt/csw/lib/perl/csw/DBI/DBD.pm
Please, locate “DBD/mysql.pm” file. AFAIU it should be
under /opt/csw/ dir. [snip]

As some of you may have worked out, I am using the BlastWave Solaris
packages, as this has yielded the best result so far. I am using
their Perl, Apache2, Mysql4, gcc3 and perl modules where
available. All other modules have been installed via CPAN.
Are you sure that BlastWave’s perl has access to modules you’ve
installed manually?

This is a good point Ruslan and if Ben still has problems, I should be
able to help him.

I build most of the blastwave perl modules and most of those modules
are built for my production RT site. However, I do not use apache2,
mod_perl2 or mysql, so there may be a few modules missing from the
blastwave packages. I use apache, mod_perl and postgresql. I also use
the same except using mysql4 on a test Solaris host.

The OP can mail be privately on any modules needed and I will see what
I can do. If the OP is building modules using gcc that create shared
library objects, then that could be a problem.

I attached a brief description of how I build perl modules. Also
attached is a file to source for setting up the build environment. Of
course, the compiler options (CC, CXX, F77, CFLAGS) are wrong for the
OP.

I will also try to help in other ways, such as my build scripts for RT,
if desired. Or if you want to start with apache, mod_perl, it is a
fairly simple path to install my RT package.

Alex

Hi,

As an ISP we get a lot of spam coming in to our ticket queues (support@
abuse@ etc)

Has anyone been able to make a delete link that sits up near the
resolve/open/take links?

This would be handy rather than having to go to the basics then select
deleted.

I know we can use multiple ticket update, but some of them cant be
identified as spam until we view it.

Thanks

Andrew

Andrew Xenides wrote:

Has anyone been able to make a delete link that sits up near the
resolve/open/take links?

The following patch will do it for you… but remember that you don’t
get a confirmation at all … once the link is clicked on, the ticket it
deleted (though the resulting page would let you re-instate it!)

Cheers!
Rick Measham

— /opt/rt3/share/html/Ticket/Elements/Tabs 2005-02-11
08:25:22.000000000 +1100
+++ /opt/rt3/local/html/Ticket/Elements/Tabs 2005-11-11
13:02:42.000000000 +1100
@@ -160,6 +160,13 @@
}
}

+if ( $Ticket->CurrentUserHasRight(‘DeleteTicket’) ) {

  •   $actions->{'G'} = {
    
  •           title => loc('Delete'),
    
  •           path  => "Ticket/Modify.html?id=$id&Status=deleted"
    
  •   }
    

+}
if ( $Ticket->CurrentUserHasRight(‘OwnTicket’) ) {
if ( $Ticket->OwnerObj->id == $RT::Nobody->id ) {
$actions->{‘D’} = { path =>
“Ticket/Display.html?Action=Take&id=” . $id,

Rick Measham rickm@mailguard.com.au
MailGuard Pty. Limited
Email anti-virus, anti-spam and content filtering

Melbourne 68-72 York St South Melbourne VIC 3205 P +61 3 9694 4444
Sydney Level 20, Tower 2 Darling Park,
201 Sussex Street, Sydney NSW 2000 P +61 2 9004 7889

http://www.mailguard.com.au/mg

smime.p7s (3.12 KB)