[SOLVED] Apache2::Reload Problems

Moderator: crythias

Locked
ossys
Znuny newbie
Posts: 8
Joined: 11 Dec 2014, 20:19
Znuny Version: 3.1.12
Real Name: Chad Cravens
Company: Open Source Systems, LLC

[SOLVED] Apache2::Reload Problems

Post by ossys »

Hello:

I'm working to implement a Kernel::GenericInterface::Invoker::Test::MyModule module in order to send XML request to a remote server on ticket creation. Everything is working and we are indeed sending the data to the correct server. However, when attempting to update the module perl code, it does not appear to take effect in the browser! My file is located at /opt/otrs/Kernel/GenericInterface/Invoker/Test/MyModule.pm

I have checked the Apache otrs.conf file, and it does have the Apache2::Reload

Code: Select all

# if mod_perl is used
<IfModule mod_perl.c>


    # load all otrs modules
    Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl

    # Apache::Reload - Reload Perl Modules when Changed on Disk
    PerlModule Apache2::Reload
    PerlInitHandler Apache2::Reload
    PerlModule Apache2::RequestRec

    # set mod_perl2 options
    <Location /otrs>
#        ErrorDocument 403 /otrs/customer.pl
        ErrorDocument 403 /otrs/index.pl
        SetHandler  perl-script
        PerlResponseHandler ModPerl::Registry
        Options +ExecCGI
        PerlOptions +ParseHeaders
        PerlOptions +SetupEnv
#        Order allow,deny
#        Allow from all
        Require all granted
    </Location>

    # set mod_perl2 option for generic interface
    <Location /otrs/nph-genericinterface.pl>
        PerlOptions -ParseHeaders
    </Location>

</IfModule>
I have tried several things including restarting the web server, setting the PERL5LIB environment variable to the path of the module:

Code: Select all

SetEnv PERL5LIB /opt/otrs/Kernel/GenericInterface/Invoker/Test
But nothing seems to update the web with the script updates! I assume it's because of the perl caching?

Any insight into this would be much appreciated!
Last edited by ossys on 12 Dec 2014, 19:19, edited 1 time in total.
ossys
Znuny newbie
Posts: 8
Joined: 11 Dec 2014, 20:19
Znuny Version: 3.1.12
Real Name: Chad Cravens
Company: Open Source Systems, LLC

Re: Apache2::Reload Problems

Post by ossys »

I figured it out, I needed to su as www-data and restart the OTRS scheduler in the bin/ directory:

Code: Select all

$ ./bin/otrs.Scheduler.pl -a stop
$ ./bin/otrs.Scheduler.pl -a start
And just for good measure I restart the Apache2 web server:

Code: Select all

$ sudo service apache2 restart
Locked