mod_perl usage and apache2-perl-startup.pl customization

Moderator: crythias

Locked
Giulio Soleni
Znuny wizard
Posts: 392
Joined: 30 Dec 2010, 14:35
Znuny Version: 6.0.x and 5.0.x
Real Name: Giulio Soleni
Company: IKS srl

mod_perl usage and apache2-perl-startup.pl customization

Post by Giulio Soleni »

Hallo,
I would like to know if, right after a fresh installation of last version of OTRS and having installed all the required perl modules, I should edit apache2-perl-startup.pl file to have mod_perl really work.
I already asked one year ago a similar question here viewtopic.php?f=62&t=21415&p=84718 but I still have some doubts about.

Just to recap... when and how should I edit apache2-perl-startup.pl script?
And also, is there a way to check if apache2-perl-startup.pl runs as expected? (I know it cannot be triggered directly on cli)

Thank you in advance
OTRS 6.0.x on CentOS 7.x with MariaDB 10.2.x database connected to an Active Directory for Agents and Customers.
ITSM and FAQ modules installed.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: mod_perl usage and apache2-perl-startup.pl customization

Post by crythias »

Giulio Soleni wrote:I should edit apache2-perl-startup.pl file to have mod_perl really work
It would be of interest to know how you have determined that mod_perl doesn't work with stock apache2-perl-startup.pl

One of the very first operative commands is:
$ENV{MOD_PERL} =~ /mod_perl/ || die "MOD_PERL not used!";
Giulio Soleni wrote:when and how should I edit apache2-perl-startup.pl script?
I'd certainly edit apache2-perl-startup.pl script if I installed OTRS in a directory different from /opt/otrs (change use lib and $0 line)

In addition, if not configured via package, I'd consider uncommenting the DB use commands for my Database, as well as optional additional core modules.
Giulio Soleni wrote:is there a way to check if apache2-perl-startup.pl runs as expected?
If apache2's otrs.conf has an IfModule mod_perl.c and Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl then restarting apache should let you know if apache2-perl-startup.pl loads incorrectly, as long as mod_perl loads.

If you're needing to verify *apache* loads mod_perl, that is beyond the scope of this forum.
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
Giulio Soleni
Znuny wizard
Posts: 392
Joined: 30 Dec 2010, 14:35
Znuny Version: 6.0.x and 5.0.x
Real Name: Giulio Soleni
Company: IKS srl

Re: mod_perl usage and apache2-perl-startup.pl customization

Post by Giulio Soleni »

Hi crythias, thank you for your quick reply.
All my uncertainty comes from these pretty old post installation procedures: http://wiki.otterhub.org/index.php?titl ... ment_steps that are still valid for MySQL but maybe are not so updated for Apache.
crythias wrote: I'd consider uncommenting the DB use commands for my Database, as well as optional additional core modules.
Yes, I do that already.
crythias wrote: If apache2's otrs.conf has an IfModule mod_perl.c and Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl then restarting apache should let you know if apache2-perl-startup.pl loads incorrectly, as long as mod_perl loads.
Yes, I confirm that on the apache error log I see a correct info message that states mod_perl has been correctly loaded.
That's good.
So from now on I will avoid editing apache2-perl-startup.pl with these 2 lines:

Code: Select all

use Apache::DBI ();
Apache::DBI->connect_on_init('DBI:mysql:otrs', 'otrs', 'otrs_user_passcode_goes_here');
since I assume they are not needed anymore, at least not directly inside apache2-perl-startup.pl

Thank you very much!
Giulio
OTRS 6.0.x on CentOS 7.x with MariaDB 10.2.x database connected to an Active Directory for Agents and Customers.
ITSM and FAQ modules installed.
Locked