Errors Output- Apache::exit at /usr/lib/perl5/site_perl/5.8.0/Apache/ASP/Response.pm line 158.
, /usr/lib/perl5/site_perl/5.8.0/Apache/ASP.pm line 1518
Debug Output- Apache::exit at /usr/lib/perl5/site_perl/5.8.0/Apache/ASP/Response.pm line 158.
, /usr/lib/perl5/site_perl/5.8.0/Apache/ASP.pm line 1518
ASP to Perl Script -: no strict;;use vars qw($Application $Session $Response $Server $Request);;
-: #line 1 /home/truck/www.truckdown.com/content/index.asp
1: ;; ; ;
2:
3: use Momex::Cache::Code;
4: use Momex::Cache::General;
5: use Momex::Site ;
6: use Momex::Database;
7: use Momex;
8: use Momex::Form;
9: use DBI;
10: use Template::Parser;
11: use Momex::Site::Context;
12: use Momex::Form;
13: use Data::Dumper;
14: use strict;
15: use Momex::Exception 'die';
16:
17: use vars qw{ $Server $Request $Response %MCGO $MCGO $MCCO %MCCO $TemplateParser $TemplateContext}; # Confused yet ;)
18: my($Config) = {INTERPOLATE=>1, PRE_CHOMP => 1, POST_CHOMP => 1, EVAL_PERL => 1, TAG_STYLE => 'asp'};
19:
20: $Response->{Clean} = 1;
21: my($Output);
22: my $MDO = Momex::Database->new('Truckdown', 'mysql', 'truck', 'thbtUmr1', '10.0.3.18');
23: my $ErrorMessage = ($MDO ? undef : "We're sorry, TruckDown! is down for maintenance! For emergency service, please call 1-866-562-4081");
24:
25: $Response->Redirect('http://www.metrex.net/wiki/') if ($ENV{'HTTP_X_HOST'} eq 'wiki.metrex.net');
26:
27: if ((-f "/tmp/truckdown-maintenance.txt") && ($ENV{'HTTP_X_FORWARDED_FOR'} !~ /209.202.54.12|205.200.3.166/)) {
28: local $/ = undef;
29: open MAINTENANCE, "/tmp/truckdown-maintenance.txt";
30: $ErrorMessage = <MAINTENANCE>;
31: close MAINTENANCE;
32: }
33: if ($ErrorMessage) {
34: print $ErrorMessage;
35: return undef;
36: }
37:
38: if (!ref $MCCO) {# If MCCO is defined then we don't want to tie.
39: $MCCO = tie %MCCO, 'Momex::Cache::Code', undef, 200, { Debug => 0 };
40: }
41:
42: if (!ref $MCGO) {# If MGCO is defined then we don't want to tie
43: $MCGO = tie %MCGO, 'Momex::Cache::General', 200, { Debug => 0 };
44: }
45:
46: $TemplateParser = Template::Parser->new($Config) unless ref $TemplateParser;
47: $TemplateContext = Momex::Site::Context->new(\%MCGO, $Config) || die $Template::Context::ERROR unless ref $TemplateContext;
48:
49: eval {
50: $Output = dispatch($MDO, \%MCCO, \%MCGO, \$Output, $Response, $Server, $Request, $TemplateParser, $TemplateContext);
51: };
52: if ($@) {
53: if ( $@->isa('Momex::Exception::RetCode') ) {
54: my $Code = $@->{code};
55: my $r = Apache->request;
56: $r->custom_response($Code, "/index.asp?NavCode=$Code");
57: if ($Code == '403') {
58: $Response->Redirect("/momex/NavCode/home".OriginalURL($Request)) ;
59: }
60: # $r->internal_redirect("/index.asp?NavCode=$Code");
61: $Response->{Status} = $Code; #$@->{code};
62: return;
63: } elsif (
64: $@->isa('Momex::Exception::CompileError') ||
65: $@->isa('Momex::Exception::AnyotherErrors')
66: ) {
67: print "<PRE>".Dumper($@)."</PRE>";
68: return;
69: } else {
70: print $@;
71: return;
72: }
73: }
74: print $Output;
75: #open TMP, ">/tmp/results.txt";
76: #print TMP $Output;
77: #close TMP;
78: $MDO->dbh->disconnect;
79:
80: sub dispatch {
81: my($MDO, $GlobalCahceREF, $GlobalGeneralREF, $Output, $Response, $Server, $Request, $TemplateParser, $TemplateContext) = @_;
82: my $MSO = Momex::Site->new(
83: -MDO => $MDO, -NavCode => GetFormValue('NavCode'), -GlobalCodeCache => $GlobalCahceREF, -Pathing => 1,
84: -GlobalGeneralCache => $GlobalGeneralREF, -Response => $Response, -Server => $Server, -Request => $Request,
85: -TemplateParser => $TemplateParser, -TemplateContext => $TemplateContext, -SessionTimeOut => 24*60*60,
86: -FixCurrent => 1, -NewSCPC => 2); # NewSCPC is New SectionContent and PageContent method.
87: $MSO->{mdo}->dbh->{RaiseError} = 1;
88:
89:
90: my $Output = '';
91: if ( $MSO->Handle304() ) {
92: $Output = '';
93: } else {
94: $MSO->Initialize();
95:
96: my $Result = $MSO->NavFunction; # Results of the page content
97: $MSO->Vars($Result) if ref $Result eq 'HASH';
98:
99: if ($MSO->NewSCPC == 2) {
100: if( defined $Result and !(ref $Result) ) {
101: $MSO->ContentAddPreProcessed('Main', $Result);
102: }
103: $MSO->Finalize();
104: my @Output = $MSO->Content('Page');
105: $Output = $Output[0];
106: } else {
107: if (defined $MSO->{current}->{Other}->{SectionContent}->{Name} and (ref $Result eq 'HASH' or !($Result))) {
108: $Output = $MSO->NavSectionContent(undef, $Result);
109: } else {
110: $Output = $Result;
111: }
112:
113: $MSO->Finalize();
114:
115: $MSO->SetCurrent('Output', $Output);
116: $Output = $MSO->PageContent;
117: }
118:
119: my $PostProcessObj = $MSO->InitVars->{PostProcessor};
120: if (ref $PostProcessObj eq "Momex::Site::DynamicModule" and $PostProcessObj->SubModule =~ /^PostProcessor/) {
121: $PostProcessObj->Process(\$Output);
122: }
123: }
124: $MSO->DESTROY;
125: return $Output;
126: }
127:
128: sub OriginalURL {
129: my $Request = shift;
130: my (@Query) = split(/&/, $Request->{ServerVariables}->{QUERY_STRING});
131: my $NavString = "";
132: foreach my $Query (@Query) {
133: my (@Vars) = split(/=/, $Query);
134: $Vars[0] = 'Redirect' if ($Vars[0] eq 'NavCode');
135: $NavString .= "/";
136: $NavString .= "$Vars[0]/$Vars[1]";
137: }
138: return $NavString;
139: }
140: ;
An error has occured with the Apache::ASP script just run.
If you are the developer working on this script, and cannot work
through this problem, please try researching it at the
Apache::ASP web site,
specifically the FAQ section.
Failing that, check out your
support options, and
if necessary include this debug output with any query.