Hello,

I have two CGI::Application apps running on the same server under
mod_perl. The first app does not need any authentication and has been
working just fine until I started development of the second application
which uses CAP::Authentication and CAP::Session to login users. Now on
the first application I get a login screen. I thought that maybe I
wasn't destroying the session correctly on application two so I added:

$self->session->flush;

To the teardown subroutine, but that didn't resolve the problem. There
is nothing in the Apache logs to indicate the problem. *AND* I have
restarted apache every time I made a change to make sure that I had a
clean environment.

In my httpd.conf I have the following:

Alias /ConLog/ /usr/local/apache2/perl/ConLog/
PerlModule ConLog::Application
<Location /ConLog>
        SetHandler perl-script
        PerlHandler ConLog::Application
</Location>

Alias /VHANPI/ /usr/local/apache2/perl/VHANPI/
PerlModule VHANPI::Application
<Location /VHANPI>
        SetHandler perl-script
        PerlHandler VHANPI::Application
</Location>

Here is the ConLog::Application code:

# Generate Console Log Documents from a database.

package ConLog::Application;

use lib '../', '/usr/local/apache2/perl/ConLog';

use strict;
use warnings;
use ConLog::Appl;

use Apache2::RequestRec ();
use Apache2::RequestIO ();

use Apache2::Const -compile => qw(OK);

sub handler {
        my $r = shift;

        my $app = Appl->new();

        $app->run();

        return Apache2::Const::OK;
}
1;

Here is the top of ConLog::Appl.pm

#
package Appl;
use base 'CGI::Application';
use strict;

# Needed for the database
use DBI qw(:sql_types);

# Needed to use Templates
use HTML::Template;

# Need Date/Time Formatting and Parsing
use Date::Format;
use Date::Parse;


And now the VHANPI::Application code:

package VHANPI::Application;

use lib '../', '/usr/local/apache2/perl/VHANPI';

use strict;
use warnings;
use VHANPI::Appl;

use Apache2::RequestRec ();
use Apache2::RequestIO ();

use Apache2::Const -compile => qw(OK);

sub handler {
        my $r = shift;

        my $app = Appl->new();

        $app->run();

        return Apache2::Const::OK;
}
1;

Here is the top section of VHANPI::Appl.pm

#
package Appl;
use base 'CGI::Application';
use CGI::Application::Plugin::Session;
use CGI::Application::Plugin::Authentication;
use strict;



# Needed for the database
use DBI qw(:sql_types);

# Needed to use Templates
use HTML::Template;

# Used to debug HTML pages
use HTML::Lint;

# Need Date/Time Formatting and Parsing
use Date::Format;
use Date::Parse;

Any advice would be appreciated.

Thank you,

Tom.
----
Thomas Boyda
Consultant
Proxicom, Inc.
276-739-2314 (Desk)
http://www.proxicom.com 


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to