Errors Output
  1. errors compiling global.asa: Can't locate LRytas.pm in @INC (@INC contains: /data/www/modeliai /usr/lib/perl5/site_perl/5.8.8/ /mnt/perl5lib /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 . /opt/apache) at /data/www/modeliai/global.asa line 9. at /data/www/modeliai/global.asa line 9 Apache::ASP::Compiles::__ASP__data_www_modeliaix::BEGIN() called at LRytas.pm line 9 eval {...} called at LRytas.pm line 9 eval ' #line 1 /data/www/modeliai/global.asa package Apache::ASP::Compiles::__ASP__data_www_modeliaix; ;; use strict ;; use vars qw($Application $Session $Response $Server $Request); ;; use lib qw(/data/www/modeliai); ;; use DBI; use DBD::Proxy; use File::Basename; use Time::Local; #use Cache::Memcached::XS; #use Cache::Memcached; use Cache::Memcached::Fast; #use Apache::Session::Memcached; use LRytas; use Unicode::Map; use Unicode::String; use vars qw($UNICODE_MAP); $UNICODE_MAP = new Unicode::Map("CP1257"); use vars qw($Form $dbh $dbh_forum $dbh_tv $db_error $NEWS_FILE $DATA_FILE $SKILTYS_PATH $DATA_PATH $SIANDIEN $NUMERIS $VISOS_DATOS $SUPER); use vars qw(%SKILTYS %SKILTYS_NEWS @SKILTYS_NEWS %SKILTYS_SUTR $OK @DIENOS_SKILTYS @month @day $dbh_utf $memd); use vars qw($NEWS_SKILTIS $FOTO_STRAIPSNIS_ID $MODELIAI_FOTO_URL); $NEWS_SKILTIS = 101; $FOTO_STRAIPSNIS_ID = \'12862825331283959793\'; $MODELIAI_FOTO_URL = \'http://modeliaifoto.lrytas.lt\'; use vars qw($LR $PLOTIS $STULP1 $STULP2 $STULP3 $STULP4); $LR = new LRytas(); $PLOTIS = 1000; # Puslapio plotis $STULP1 = 120; # Pirmos celes plotis $STULP2 = 295; # Antros celes plotis, kur pirmas newso straipsnis top1 $STULP3 = 450; # Trecia cele, su top1, top2 ir top3 newsais $STULP4 = 292; # Lryto vedamojo skiltis # $ENV{\'NLS_LANG\'} = \'american_america.BLT8MSWIN1257\'; $ENV{\'NLS_LANG\'} = \'American_America.UTF8\'; $ENV{\'LC_ALL\'} = \'UTF-8\'; use vars qw($memory_cache %session); use Text::Iconv; use vars qw($TO_UNICODE $FROM_UNICODE); $TO_UNICODE = Text::Iconv->new("CP1257", "UTF-8"); $FROM_UNICODE = Text::Iconv->new("UTF-8", "CP1257"); sub UNIKODAS { my $str = shift; my $from = shift; if (ref($str)) { if (ref($$str) =~ /^HASH/) { foreach my $x (keys %$str) { unless ($from) { $$str->{$x} = $TO_UNICODE->convert($$str->{$x}); } else { $$str->{$x} = $FROM_UNICODE->convert($$str->{$x}); } } return; } unless ($from) { $$str = $TO_UNICODE->convert($$str); return; } else { $$str = $FROM_UNICODE->convert($$str); return; } } else { unless ($from) { return $TO_UNICODE->convert($str); } else { return $FROM_UNICODE->convert($str); } } }; sub Session_OnStart { } sub Session_OnEnd { } sub Application_OnStart { } sub Application_OnEnd { } sub Script_OnEnd { untie(%session); if (defined ($dbh)) { $dbh->disconnect; undef $dbh; } if (defined ($dbh_utf)) { $dbh_utf->disconnect; undef $dbh_utf; } if (defined ($dbh_tv)) { $dbh_tv->disconnect; undef $dbh_tv; } } sub Script_OnFlush { if ($Response->{Charset} !~ /utf/i) { my $ref = $Response->{BinaryRef}; unless ($Form->{\'isUTF8\'} == 1) { UNIKODAS($ref); } else { my @arr = split(/\\<\\!\\-\\-UTF8\\-\\-\\>/, $$ref); for (my $i = 0; $i < scalar @arr; $i++) { next if ($i % 2 == 1); $arr[$i] = UNIKODAS($arr[$i]); } $$ref = join(\'\', @arr); } } } sub Script_OnStart { $memory_cache = new Cache::Memcached::Fast({ servers => [ "10.0.0.29:11211", "10.0.0.29:11311", "10.0.0.29:11411" ], compress_threshold => 999, nowait => 1, namespace => $Request->ServerVariables("HTTP_HOST") =~ /modeliai/ ? "mod3:" : "mod4:", max_failures => 3, failure_timeout => 30 }); # ideta EB require Super2; $SUPER = undef; $SUPER = Super->new({ db_connect => \\&connect_db, dbvar => \\$dbh, SITE_ID => 1, any_str => 1, url_root => \'/\' }); if (0) { my $session_cookie_name = \'lr_session\'; my $sid = $Request->Cookies($session_cookie_name); my $session_opts = { Servers => \'10.0.0.29:11211 10.0.0.29:11311 10.0.0.29:11411\', NoRehash => 1, Readonly => 0, Expires => 60*60, Debug => 0, CompressThreshold => 10_000 }; if ($sid) { eval q{ tie %session, \'Apache::Session::Memcached\', $sid, $session_opts; }; if ($@) { tie %session, \'Apache::Session::Memcached\', undef, $session_opts; } } else { tie %session, \'Apache::Session::Memcached\', undef, $session_opts; } $Response->Cookies($session_cookie_name, $session{\'_session_id\'}); $Response->Cookies($session_cookie_name, "Path", "/"); $Response->Cookies($session_cookie_name, "Domain", "lrytas.lt"); $session{\'ticker\'}++; } $Form = $Request->Params; $dbh = undef; $db_error = 0; foreach my $k (keys %{$Form}) { alltrim(\\$Form->{$k}); } $Server->RegisterCleanup(sub { undef $dbh; } ); } # you can share globals between scripts as of v.10, as all scripts, including # the global.asa are compiled into the same module sub alltrim { my $a = shift; if (ref($a)) { $$a =~ s/^\\s*//gi; $$a =~ s/\\s*$//gi; # $$a =~ $Server->HTMLEncode; return; } else { $a =~ s/^\\s*//gi; $a =~ s/\\s*$//gi; # $a =~ $Server->HTMLEncode; return $a; } 1; } sub connect_db { my $compression = \'compression=gzip\'; return 1 if (defined($dbh)); my $dsn2 = "DBI:Proxy:hostname=dbiproxy.lrytas.lt;port=81;dsn=DBI:Oracle:ORCL"; # my $dsn2 = "dbi:Oracle:host=oracle.lrytas.lt;sid=ORCL"; unless ($dbh = DBI->connect($dsn2, "lr", "lr1")) { $db_error = 1; return 0; } else { $dbh->{LongReadLen} = (1<<31) - 1; $dbh->{AutoCommit} = 1; $dbh->{RaiseError} = 0; if ($Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.3$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.11$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.2$/) { $dbh->{RaiseError} = 1; $dbh->{PrintError} = 1; } return 1; } } sub connect_db_forum { return 1 if (defined($dbh_forum)); my $database = \'diskusijos\'; my $hostname = \'mysql.lrytas.lt\'; my $user = \'bacila\'; my $password = \'bacila\'; my $dsn = "DBI:mysql:database=$database;host=$hostname;mysql_connect_timeout=1"; unless ( $dbh_forum = DBI->connect($dsn, $user, $password)) { return 0; } else { $dbh_forum->do(q{SET NAMES cp1257;}); $dbh_forum->{LongReadLen} = (1<<31) - 1; $dbh_forum->{AutoCommit} = 1; $dbh_forum->{RaiseError} = 0; if ($Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.3$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.11$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.2$/) { $dbh_forum->{RaiseError} = 1; $dbh_forum->{PrintError} = 1; } return 1; } } sub disconnect_db_forum { if (defined($dbh_forum)) { $dbh_forum->{RaiseError} = 0; $dbh_forum->{PrintError} = 0; $dbh_forum->disconnect; } $dbh_forum = undef; } sub connect_db_tv { return 1 if (defined($dbh_forum)); my $database = \'tv\'; my $hostname = \'bc.lrytas.lt\'; my $user = \'tv\'; my $password = \'tv\'; my $dsn = "DBI:mysql:database=$database;host=$hostname"; unless ( $dbh_tv = DBI->connect($dsn, $user, $password)) { return 0; } else { $dbh_tv->do(q{SET NAMES latin1}); # $dbh_tv->do(q{SET NAMES cp1257;}); $dbh_tv->{LongReadLen} = (1<<31) - 1; $dbh_tv->{AutoCommit} = 1; $dbh_tv->{RaiseError} = 0; if ($Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.3$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.11$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.2$/) { $dbh_tv->{RaiseError} = 1; $dbh_tv->{PrintError} = 1; } return 1; } } sub disconnect_db_tv { if (defined($dbh_tv)) { $dbh_tv->{RaiseError} = 0; $dbh_tv->{PrintError} = 0; $dbh_tv->disconnect; } $dbh_tv = undef; } sub connect_db_utf { my $compression = \'compression=gzip\'; return 1 if (defined($dbh_utf)); my $dsn2 = "DBI:Proxy:hostname=dbiproxy.lrytas.lt;port=82;dsn=DBI:Oracle:ORCL"; # my $dsn2 = "dbi:Oracle:host=oracle.lrytas.lt;sid=ORCL"; unless ($dbh_utf = DBI->connect($dsn2, "lr", "lr1")) { $db_error = 1; return 0; } else { $dbh_utf->{LongReadLen} = (1<<31) - 1; $dbh_utf->{AutoCommit} = 1; $dbh_utf->{RaiseError} = 1; if ($Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.3$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.11$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.2$/) { $dbh_utf->{RaiseError} = 1; $dbh_utf->{PrintError} = 1; } return 1; } } sub Script_OnParse { # my $code = $Server->{ScriptRef}; # $$code = \'<% $Session = \\%session; %>\' . $$code; } ;; sub exit { $main::Response->End(); } ;; no lib qw(/data/www/modeliai); ;; 1;' called at /usr/lib/perl5/site_perl/5.8.8/Apache/ASP/GlobalASA.pm line 122 Apache::ASP::GlobalASA::new('Apache::ASP=HASH(0x1c284c00)') called at /usr/lib/perl5/site_perl/5.8.8/Apache/ASP.pm line 389 Apache::ASP::new('Apache::ASP', 'Apache2::RequestRec=SCALAR(0x1c13b330)', '/data/www/modeliai/index.asp') called at /usr/lib/perl5/site_perl/5.8.8/Apache/ASP.pm line 184 Apache::ASP::handler('Apache2::RequestRec=SCALAR(0x1c13b330)') called at LRytas.pm line 9 eval {...} called at LRytas.pm line 9 BEGIN failed--compilation aborted at /data/www/modeliai/global.asa line 9. at /data/www/modeliai/global.asa line 9 eval ' #line 1 /data/www/modeliai/global.asa package Apache::ASP::Compiles::__ASP__data_www_modeliaix; ;; use strict ;; use vars qw($Application $Session $Response $Server $Request); ;; use lib qw(/data/www/modeliai); ;; use DBI; use DBD::Proxy; use File::Basename; use Time::Local; #use Cache::Memcached::XS; #use Cache::Memcached; use Cache::Memcached::Fast; #use Apache::Session::Memcached; use LRytas; use Unicode::Map; use Unicode::String; use vars qw($UNICODE_MAP); $UNICODE_MAP = new Unicode::Map("CP1257"); use vars qw($Form $dbh $dbh_forum $dbh_tv $db_error $NEWS_FILE $DATA_FILE $SKILTYS_PATH $DATA_PATH $SIANDIEN $NUMERIS $VISOS_DATOS $SUPER); use vars qw(%SKILTYS %SKILTYS_NEWS @SKILTYS_NEWS %SKILTYS_SUTR $OK @DIENOS_SKILTYS @month @day $dbh_utf $memd); use vars qw($NEWS_SKILTIS $FOTO_STRAIPSNIS_ID $MODELIAI_FOTO_URL); $NEWS_SKILTIS = 101; $FOTO_STRAIPSNIS_ID = \'12862825331283959793\'; $MODELIAI_FOTO_URL = \'http://modeliaifoto.lrytas.lt\'; use vars qw($LR $PLOTIS $STULP1 $STULP2 $STULP3 $STULP4); $LR = new LRytas(); $PLOTIS = 1000; # Puslapio plotis $STULP1 = 120; # Pirmos celes plotis $STULP2 = 295; # Antros celes plotis, kur pirmas newso straipsnis top1 $STULP3 = 450; # Trecia cele, su top1, top2 ir top3 newsais $STULP4 = 292; # Lryto vedamojo skiltis # $ENV{\'NLS_LANG\'} = \'american_america.BLT8MSWIN1257\'; $ENV{\'NLS_LANG\'} = \'American_America.UTF8\'; $ENV{\'LC_ALL\'} = \'UTF-8\'; use vars qw($memory_cache %session); use Text::Iconv; use vars qw($TO_UNICODE $FROM_UNICODE); $TO_UNICODE = Text::Iconv->new("CP1257", "UTF-8"); $FROM_UNICODE = Text::Iconv->new("UTF-8", "CP1257"); sub UNIKODAS { my $str = shift; my $from = shift; if (ref($str)) { if (ref($$str) =~ /^HASH/) { foreach my $x (keys %$str) { unless ($from) { $$str->{$x} = $TO_UNICODE->convert($$str->{$x}); } else { $$str->{$x} = $FROM_UNICODE->convert($$str->{$x}); } } return; } unless ($from) { $$str = $TO_UNICODE->convert($$str); return; } else { $$str = $FROM_UNICODE->convert($$str); return; } } else { unless ($from) { return $TO_UNICODE->convert($str); } else { return $FROM_UNICODE->convert($str); } } }; sub Session_OnStart { } sub Session_OnEnd { } sub Application_OnStart { } sub Application_OnEnd { } sub Script_OnEnd { untie(%session); if (defined ($dbh)) { $dbh->disconnect; undef $dbh; } if (defined ($dbh_utf)) { $dbh_utf->disconnect; undef $dbh_utf; } if (defined ($dbh_tv)) { $dbh_tv->disconnect; undef $dbh_tv; } } sub Script_OnFlush { if ($Response->{Charset} !~ /utf/i) { my $ref = $Response->{BinaryRef}; unless ($Form->{\'isUTF8\'} == 1) { UNIKODAS($ref); } else { my @arr = split(/\\<\\!\\-\\-UTF8\\-\\-\\>/, $$ref); for (my $i = 0; $i < scalar @arr; $i++) { next if ($i % 2 == 1); $arr[$i] = UNIKODAS($arr[$i]); } $$ref = join(\'\', @arr); } } } sub Script_OnStart { $memory_cache = new Cache::Memcached::Fast({ servers => [ "10.0.0.29:11211", "10.0.0.29:11311", "10.0.0.29:11411" ], compress_threshold => 999, nowait => 1, namespace => $Request->ServerVariables("HTTP_HOST") =~ /modeliai/ ? "mod3:" : "mod4:", max_failures => 3, failure_timeout => 30 }); # ideta EB require Super2; $SUPER = undef; $SUPER = Super->new({ db_connect => \\&connect_db, dbvar => \\$dbh, SITE_ID => 1, any_str => 1, url_root => \'/\' }); if (0) { my $session_cookie_name = \'lr_session\'; my $sid = $Request->Cookies($session_cookie_name); my $session_opts = { Servers => \'10.0.0.29:11211 10.0.0.29:11311 10.0.0.29:11411\', NoRehash => 1, Readonly => 0, Expires => 60*60, Debug => 0, CompressThreshold => 10_000 }; if ($sid) { eval q{ tie %session, \'Apache::Session::Memcached\', $sid, $session_opts; }; if ($@) { tie %session, \'Apache::Session::Memcached\', undef, $session_opts; } } else { tie %session, \'Apache::Session::Memcached\', undef, $session_opts; } $Response->Cookies($session_cookie_name, $session{\'_session_id\'}); $Response->Cookies($session_cookie_name, "Path", "/"); $Response->Cookies($session_cookie_name, "Domain", "lrytas.lt"); $session{\'ticker\'}++; } $Form = $Request->Params; $dbh = undef; $db_error = 0; foreach my $k (keys %{$Form}) { alltrim(\\$Form->{$k}); } $Server->RegisterCleanup(sub { undef $dbh; } ); } # you can share globals between scripts as of v.10, as all scripts, including # the global.asa are compiled into the same module sub alltrim { my $a = shift; if (ref($a)) { $$a =~ s/^\\s*//gi; $$a =~ s/\\s*$//gi; # $$a =~ $Server->HTMLEncode; return; } else { $a =~ s/^\\s*//gi; $a =~ s/\\s*$//gi; # $a =~ $Server->HTMLEncode; return $a; } 1; } sub connect_db { my $compression = \'compression=gzip\'; return 1 if (defined($dbh)); my $dsn2 = "DBI:Proxy:hostname=dbiproxy.lrytas.lt;port=81;dsn=DBI:Oracle:ORCL"; # my $dsn2 = "dbi:Oracle:host=oracle.lrytas.lt;sid=ORCL"; unless ($dbh = DBI->connect($dsn2, "lr", "lr1")) { $db_error = 1; return 0; } else { $dbh->{LongReadLen} = (1<<31) - 1; $dbh->{AutoCommit} = 1; $dbh->{RaiseError} = 0; if ($Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.3$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.11$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.2$/) { $dbh->{RaiseError} = 1; $dbh->{PrintError} = 1; } return 1; } } sub connect_db_forum { return 1 if (defined($dbh_forum)); my $database = \'diskusijos\'; my $hostname = \'mysql.lrytas.lt\'; my $user = \'bacila\'; my $password = \'bacila\'; my $dsn = "DBI:mysql:database=$database;host=$hostname;mysql_connect_timeout=1"; unless ( $dbh_forum = DBI->connect($dsn, $user, $password)) { return 0; } else { $dbh_forum->do(q{SET NAMES cp1257;}); $dbh_forum->{LongReadLen} = (1<<31) - 1; $dbh_forum->{AutoCommit} = 1; $dbh_forum->{RaiseError} = 0; if ($Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.3$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.11$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.2$/) { $dbh_forum->{RaiseError} = 1; $dbh_forum->{PrintError} = 1; } return 1; } } sub disconnect_db_forum { if (defined($dbh_forum)) { $dbh_forum->{RaiseError} = 0; $dbh_forum->{PrintError} = 0; $dbh_forum->disconnect; } $dbh_forum = undef; } sub connect_db_tv { return 1 if (defined($dbh_forum)); my $database = \'tv\'; my $hostname = \'bc.lrytas.lt\'; my $user = \'tv\'; my $password = \'tv\'; my $dsn = "DBI:mysql:database=$database;host=$hostname"; unless ( $dbh_tv = DBI->connect($dsn, $user, $password)) { return 0; } else { $dbh_tv->do(q{SET NAMES latin1}); # $dbh_tv->do(q{SET NAMES cp1257;}); $dbh_tv->{LongReadLen} = (1<<31) - 1; $dbh_tv->{AutoCommit} = 1; $dbh_tv->{RaiseError} = 0; if ($Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.3$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.11$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.2$/) { $dbh_tv->{RaiseError} = 1; $dbh_tv->{PrintError} = 1; } return 1; } } sub disconnect_db_tv { if (defined($dbh_tv)) { $dbh_tv->{RaiseError} = 0; $dbh_tv->{PrintError} = 0; $dbh_tv->disconnect; } $dbh_tv = undef; } sub connect_db_utf { my $compression = \'compression=gzip\'; return 1 if (defined($dbh_utf)); my $dsn2 = "DBI:Proxy:hostname=dbiproxy.lrytas.lt;port=82;dsn=DBI:Oracle:ORCL"; # my $dsn2 = "dbi:Oracle:host=oracle.lrytas.lt;sid=ORCL"; unless ($dbh_utf = DBI->connect($dsn2, "lr", "lr1")) { $db_error = 1; return 0; } else { $dbh_utf->{LongReadLen} = (1<<31) - 1; $dbh_utf->{AutoCommit} = 1; $dbh_utf->{RaiseError} = 1; if ($Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.3$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.11$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.2$/) { $dbh_utf->{RaiseError} = 1; $dbh_utf->{PrintError} = 1; } return 1; } } sub Script_OnParse { # my $code = $Server->{ScriptRef}; # $$code = \'<% $Session = \\%session; %>\' . $$code; } ;; sub exit { $main::Response->End(); } ;; no lib qw(/data/www/modeliai); ;; 1;' called at /usr/lib/perl5/site_perl/5.8.8/Apache/ASP/GlobalASA.pm line 122 Apache::ASP::GlobalASA::new('Apache::ASP=HASH(0x1c284c00)') called at /usr/lib/perl5/site_perl/5.8.8/Apache/ASP.pm line 389 Apache::ASP::new('Apache::ASP', 'Apache2::RequestRec=SCALAR(0x1c13b330)', '/data/www/modeliai/index.asp') called at /usr/lib/perl5/site_perl/5.8.8/Apache/ASP.pm line 184 Apache::ASP::handler('Apache2::RequestRec=SCALAR(0x1c13b330)') called at /data/www/modeliai/global.asa line 9 eval {...} called at /data/www/modeliai/global.asa line 9 , /usr/lib/perl5/site_perl/5.8.8/Apache/ASP.pm line 1722
Debug Output
  1. errors compiling global.asa: Can't locate LRytas.pm in @INC (@INC contains: /data/www/modeliai /usr/lib/perl5/site_perl/5.8.8/ /mnt/perl5lib /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 . /opt/apache) at /data/www/modeliai/global.asa line 9. at /data/www/modeliai/global.asa line 9 Apache::ASP::Compiles::__ASP__data_www_modeliaix::BEGIN() called at LRytas.pm line 9 eval {...} called at LRytas.pm line 9 eval ' #line 1 /data/www/modeliai/global.asa package Apache::ASP::Compiles::__ASP__data_www_modeliaix; ;; use strict ;; use vars qw($Application $Session $Response $Server $Request); ;; use lib qw(/data/www/modeliai); ;; use DBI; use DBD::Proxy; use File::Basename; use Time::Local; #use Cache::Memcached::XS; #use Cache::Memcached; use Cache::Memcached::Fast; #use Apache::Session::Memcached; use LRytas; use Unicode::Map; use Unicode::String; use vars qw($UNICODE_MAP); $UNICODE_MAP = new Unicode::Map("CP1257"); use vars qw($Form $dbh $dbh_forum $dbh_tv $db_error $NEWS_FILE $DATA_FILE $SKILTYS_PATH $DATA_PATH $SIANDIEN $NUMERIS $VISOS_DATOS $SUPER); use vars qw(%SKILTYS %SKILTYS_NEWS @SKILTYS_NEWS %SKILTYS_SUTR $OK @DIENOS_SKILTYS @month @day $dbh_utf $memd); use vars qw($NEWS_SKILTIS $FOTO_STRAIPSNIS_ID $MODELIAI_FOTO_URL); $NEWS_SKILTIS = 101; $FOTO_STRAIPSNIS_ID = \'12862825331283959793\'; $MODELIAI_FOTO_URL = \'http://modeliaifoto.lrytas.lt\'; use vars qw($LR $PLOTIS $STULP1 $STULP2 $STULP3 $STULP4); $LR = new LRytas(); $PLOTIS = 1000; # Puslapio plotis $STULP1 = 120; # Pirmos celes plotis $STULP2 = 295; # Antros celes plotis, kur pirmas newso straipsnis top1 $STULP3 = 450; # Trecia cele, su top1, top2 ir top3 newsais $STULP4 = 292; # Lryto vedamojo skiltis # $ENV{\'NLS_LANG\'} = \'american_america.BLT8MSWIN1257\'; $ENV{\'NLS_LANG\'} = \'American_America.UTF8\'; $ENV{\'LC_ALL\'} = \'UTF-8\'; use vars qw($memory_cache %session); use Text::Iconv; use vars qw($TO_UNICODE $FROM_UNICODE); $TO_UNICODE = Text::Iconv->new("CP1257", "UTF-8"); $FROM_UNICODE = Text::Iconv->new("UTF-8", "CP1257"); sub UNIKODAS { my $str = shift; my $from = shift; if (ref($str)) { if (ref($$str) =~ /^HASH/) { foreach my $x (keys %$str) { unless ($from) { $$str->{$x} = $TO_UNICODE->convert($$str->{$x}); } else { $$str->{$x} = $FROM_UNICODE->convert($$str->{$x}); } } return; } unless ($from) { $$str = $TO_UNICODE->convert($$str); return; } else { $$str = $FROM_UNICODE->convert($$str); return; } } else { unless ($from) { return $TO_UNICODE->convert($str); } else { return $FROM_UNICODE->convert($str); } } }; sub Session_OnStart { } sub Session_OnEnd { } sub Application_OnStart { } sub Application_OnEnd { } sub Script_OnEnd { untie(%session); if (defined ($dbh)) { $dbh->disconnect; undef $dbh; } if (defined ($dbh_utf)) { $dbh_utf->disconnect; undef $dbh_utf; } if (defined ($dbh_tv)) { $dbh_tv->disconnect; undef $dbh_tv; } } sub Script_OnFlush { if ($Response->{Charset} !~ /utf/i) { my $ref = $Response->{BinaryRef}; unless ($Form->{\'isUTF8\'} == 1) { UNIKODAS($ref); } else { my @arr = split(/\\<\\!\\-\\-UTF8\\-\\-\\>/, $$ref); for (my $i = 0; $i < scalar @arr; $i++) { next if ($i % 2 == 1); $arr[$i] = UNIKODAS($arr[$i]); } $$ref = join(\'\', @arr); } } } sub Script_OnStart { $memory_cache = new Cache::Memcached::Fast({ servers => [ "10.0.0.29:11211", "10.0.0.29:11311", "10.0.0.29:11411" ], compress_threshold => 999, nowait => 1, namespace => $Request->ServerVariables("HTTP_HOST") =~ /modeliai/ ? "mod3:" : "mod4:", max_failures => 3, failure_timeout => 30 }); # ideta EB require Super2; $SUPER = undef; $SUPER = Super->new({ db_connect => \\&connect_db, dbvar => \\$dbh, SITE_ID => 1, any_str => 1, url_root => \'/\' }); if (0) { my $session_cookie_name = \'lr_session\'; my $sid = $Request->Cookies($session_cookie_name); my $session_opts = { Servers => \'10.0.0.29:11211 10.0.0.29:11311 10.0.0.29:11411\', NoRehash => 1, Readonly => 0, Expires => 60*60, Debug => 0, CompressThreshold => 10_000 }; if ($sid) { eval q{ tie %session, \'Apache::Session::Memcached\', $sid, $session_opts; }; if ($@) { tie %session, \'Apache::Session::Memcached\', undef, $session_opts; } } else { tie %session, \'Apache::Session::Memcached\', undef, $session_opts; } $Response->Cookies($session_cookie_name, $session{\'_session_id\'}); $Response->Cookies($session_cookie_name, "Path", "/"); $Response->Cookies($session_cookie_name, "Domain", "lrytas.lt"); $session{\'ticker\'}++; } $Form = $Request->Params; $dbh = undef; $db_error = 0; foreach my $k (keys %{$Form}) { alltrim(\\$Form->{$k}); } $Server->RegisterCleanup(sub { undef $dbh; } ); } # you can share globals between scripts as of v.10, as all scripts, including # the global.asa are compiled into the same module sub alltrim { my $a = shift; if (ref($a)) { $$a =~ s/^\\s*//gi; $$a =~ s/\\s*$//gi; # $$a =~ $Server->HTMLEncode; return; } else { $a =~ s/^\\s*//gi; $a =~ s/\\s*$//gi; # $a =~ $Server->HTMLEncode; return $a; } 1; } sub connect_db { my $compression = \'compression=gzip\'; return 1 if (defined($dbh)); my $dsn2 = "DBI:Proxy:hostname=dbiproxy.lrytas.lt;port=81;dsn=DBI:Oracle:ORCL"; # my $dsn2 = "dbi:Oracle:host=oracle.lrytas.lt;sid=ORCL"; unless ($dbh = DBI->connect($dsn2, "lr", "lr1")) { $db_error = 1; return 0; } else { $dbh->{LongReadLen} = (1<<31) - 1; $dbh->{AutoCommit} = 1; $dbh->{RaiseError} = 0; if ($Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.3$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.11$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.2$/) { $dbh->{RaiseError} = 1; $dbh->{PrintError} = 1; } return 1; } } sub connect_db_forum { return 1 if (defined($dbh_forum)); my $database = \'diskusijos\'; my $hostname = \'mysql.lrytas.lt\'; my $user = \'bacila\'; my $password = \'bacila\'; my $dsn = "DBI:mysql:database=$database;host=$hostname;mysql_connect_timeout=1"; unless ( $dbh_forum = DBI->connect($dsn, $user, $password)) { return 0; } else { $dbh_forum->do(q{SET NAMES cp1257;}); $dbh_forum->{LongReadLen} = (1<<31) - 1; $dbh_forum->{AutoCommit} = 1; $dbh_forum->{RaiseError} = 0; if ($Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.3$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.11$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.2$/) { $dbh_forum->{RaiseError} = 1; $dbh_forum->{PrintError} = 1; } return 1; } } sub disconnect_db_forum { if (defined($dbh_forum)) { $dbh_forum->{RaiseError} = 0; $dbh_forum->{PrintError} = 0; $dbh_forum->disconnect; } $dbh_forum = undef; } sub connect_db_tv { return 1 if (defined($dbh_forum)); my $database = \'tv\'; my $hostname = \'bc.lrytas.lt\'; my $user = \'tv\'; my $password = \'tv\'; my $dsn = "DBI:mysql:database=$database;host=$hostname"; unless ( $dbh_tv = DBI->connect($dsn, $user, $password)) { return 0; } else { $dbh_tv->do(q{SET NAMES latin1}); # $dbh_tv->do(q{SET NAMES cp1257;}); $dbh_tv->{LongReadLen} = (1<<31) - 1; $dbh_tv->{AutoCommit} = 1; $dbh_tv->{RaiseError} = 0; if ($Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.3$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.11$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.2$/) { $dbh_tv->{RaiseError} = 1; $dbh_tv->{PrintError} = 1; } return 1; } } sub disconnect_db_tv { if (defined($dbh_tv)) { $dbh_tv->{RaiseError} = 0; $dbh_tv->{PrintError} = 0; $dbh_tv->disconnect; } $dbh_tv = undef; } sub connect_db_utf { my $compression = \'compression=gzip\'; return 1 if (defined($dbh_utf)); my $dsn2 = "DBI:Proxy:hostname=dbiproxy.lrytas.lt;port=82;dsn=DBI:Oracle:ORCL"; # my $dsn2 = "dbi:Oracle:host=oracle.lrytas.lt;sid=ORCL"; unless ($dbh_utf = DBI->connect($dsn2, "lr", "lr1")) { $db_error = 1; return 0; } else { $dbh_utf->{LongReadLen} = (1<<31) - 1; $dbh_utf->{AutoCommit} = 1; $dbh_utf->{RaiseError} = 1; if ($Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.3$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.11$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.2$/) { $dbh_utf->{RaiseError} = 1; $dbh_utf->{PrintError} = 1; } return 1; } } sub Script_OnParse { # my $code = $Server->{ScriptRef}; # $$code = \'<% $Session = \\%session; %>\' . $$code; } ;; sub exit { $main::Response->End(); } ;; no lib qw(/data/www/modeliai); ;; 1;' called at /usr/lib/perl5/site_perl/5.8.8/Apache/ASP/GlobalASA.pm line 122 Apache::ASP::GlobalASA::new('Apache::ASP=HASH(0x1c284c00)') called at /usr/lib/perl5/site_perl/5.8.8/Apache/ASP.pm line 389 Apache::ASP::new('Apache::ASP', 'Apache2::RequestRec=SCALAR(0x1c13b330)', '/data/www/modeliai/index.asp') called at /usr/lib/perl5/site_perl/5.8.8/Apache/ASP.pm line 184 Apache::ASP::handler('Apache2::RequestRec=SCALAR(0x1c13b330)') called at LRytas.pm line 9 eval {...} called at LRytas.pm line 9 BEGIN failed--compilation aborted at /data/www/modeliai/global.asa line 9. at /data/www/modeliai/global.asa line 9 eval ' #line 1 /data/www/modeliai/global.asa package Apache::ASP::Compiles::__ASP__data_www_modeliaix; ;; use strict ;; use vars qw($Application $Session $Response $Server $Request); ;; use lib qw(/data/www/modeliai); ;; use DBI; use DBD::Proxy; use File::Basename; use Time::Local; #use Cache::Memcached::XS; #use Cache::Memcached; use Cache::Memcached::Fast; #use Apache::Session::Memcached; use LRytas; use Unicode::Map; use Unicode::String; use vars qw($UNICODE_MAP); $UNICODE_MAP = new Unicode::Map("CP1257"); use vars qw($Form $dbh $dbh_forum $dbh_tv $db_error $NEWS_FILE $DATA_FILE $SKILTYS_PATH $DATA_PATH $SIANDIEN $NUMERIS $VISOS_DATOS $SUPER); use vars qw(%SKILTYS %SKILTYS_NEWS @SKILTYS_NEWS %SKILTYS_SUTR $OK @DIENOS_SKILTYS @month @day $dbh_utf $memd); use vars qw($NEWS_SKILTIS $FOTO_STRAIPSNIS_ID $MODELIAI_FOTO_URL); $NEWS_SKILTIS = 101; $FOTO_STRAIPSNIS_ID = \'12862825331283959793\'; $MODELIAI_FOTO_URL = \'http://modeliaifoto.lrytas.lt\'; use vars qw($LR $PLOTIS $STULP1 $STULP2 $STULP3 $STULP4); $LR = new LRytas(); $PLOTIS = 1000; # Puslapio plotis $STULP1 = 120; # Pirmos celes plotis $STULP2 = 295; # Antros celes plotis, kur pirmas newso straipsnis top1 $STULP3 = 450; # Trecia cele, su top1, top2 ir top3 newsais $STULP4 = 292; # Lryto vedamojo skiltis # $ENV{\'NLS_LANG\'} = \'american_america.BLT8MSWIN1257\'; $ENV{\'NLS_LANG\'} = \'American_America.UTF8\'; $ENV{\'LC_ALL\'} = \'UTF-8\'; use vars qw($memory_cache %session); use Text::Iconv; use vars qw($TO_UNICODE $FROM_UNICODE); $TO_UNICODE = Text::Iconv->new("CP1257", "UTF-8"); $FROM_UNICODE = Text::Iconv->new("UTF-8", "CP1257"); sub UNIKODAS { my $str = shift; my $from = shift; if (ref($str)) { if (ref($$str) =~ /^HASH/) { foreach my $x (keys %$str) { unless ($from) { $$str->{$x} = $TO_UNICODE->convert($$str->{$x}); } else { $$str->{$x} = $FROM_UNICODE->convert($$str->{$x}); } } return; } unless ($from) { $$str = $TO_UNICODE->convert($$str); return; } else { $$str = $FROM_UNICODE->convert($$str); return; } } else { unless ($from) { return $TO_UNICODE->convert($str); } else { return $FROM_UNICODE->convert($str); } } }; sub Session_OnStart { } sub Session_OnEnd { } sub Application_OnStart { } sub Application_OnEnd { } sub Script_OnEnd { untie(%session); if (defined ($dbh)) { $dbh->disconnect; undef $dbh; } if (defined ($dbh_utf)) { $dbh_utf->disconnect; undef $dbh_utf; } if (defined ($dbh_tv)) { $dbh_tv->disconnect; undef $dbh_tv; } } sub Script_OnFlush { if ($Response->{Charset} !~ /utf/i) { my $ref = $Response->{BinaryRef}; unless ($Form->{\'isUTF8\'} == 1) { UNIKODAS($ref); } else { my @arr = split(/\\<\\!\\-\\-UTF8\\-\\-\\>/, $$ref); for (my $i = 0; $i < scalar @arr; $i++) { next if ($i % 2 == 1); $arr[$i] = UNIKODAS($arr[$i]); } $$ref = join(\'\', @arr); } } } sub Script_OnStart { $memory_cache = new Cache::Memcached::Fast({ servers => [ "10.0.0.29:11211", "10.0.0.29:11311", "10.0.0.29:11411" ], compress_threshold => 999, nowait => 1, namespace => $Request->ServerVariables("HTTP_HOST") =~ /modeliai/ ? "mod3:" : "mod4:", max_failures => 3, failure_timeout => 30 }); # ideta EB require Super2; $SUPER = undef; $SUPER = Super->new({ db_connect => \\&connect_db, dbvar => \\$dbh, SITE_ID => 1, any_str => 1, url_root => \'/\' }); if (0) { my $session_cookie_name = \'lr_session\'; my $sid = $Request->Cookies($session_cookie_name); my $session_opts = { Servers => \'10.0.0.29:11211 10.0.0.29:11311 10.0.0.29:11411\', NoRehash => 1, Readonly => 0, Expires => 60*60, Debug => 0, CompressThreshold => 10_000 }; if ($sid) { eval q{ tie %session, \'Apache::Session::Memcached\', $sid, $session_opts; }; if ($@) { tie %session, \'Apache::Session::Memcached\', undef, $session_opts; } } else { tie %session, \'Apache::Session::Memcached\', undef, $session_opts; } $Response->Cookies($session_cookie_name, $session{\'_session_id\'}); $Response->Cookies($session_cookie_name, "Path", "/"); $Response->Cookies($session_cookie_name, "Domain", "lrytas.lt"); $session{\'ticker\'}++; } $Form = $Request->Params; $dbh = undef; $db_error = 0; foreach my $k (keys %{$Form}) { alltrim(\\$Form->{$k}); } $Server->RegisterCleanup(sub { undef $dbh; } ); } # you can share globals between scripts as of v.10, as all scripts, including # the global.asa are compiled into the same module sub alltrim { my $a = shift; if (ref($a)) { $$a =~ s/^\\s*//gi; $$a =~ s/\\s*$//gi; # $$a =~ $Server->HTMLEncode; return; } else { $a =~ s/^\\s*//gi; $a =~ s/\\s*$//gi; # $a =~ $Server->HTMLEncode; return $a; } 1; } sub connect_db { my $compression = \'compression=gzip\'; return 1 if (defined($dbh)); my $dsn2 = "DBI:Proxy:hostname=dbiproxy.lrytas.lt;port=81;dsn=DBI:Oracle:ORCL"; # my $dsn2 = "dbi:Oracle:host=oracle.lrytas.lt;sid=ORCL"; unless ($dbh = DBI->connect($dsn2, "lr", "lr1")) { $db_error = 1; return 0; } else { $dbh->{LongReadLen} = (1<<31) - 1; $dbh->{AutoCommit} = 1; $dbh->{RaiseError} = 0; if ($Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.3$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.11$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.2$/) { $dbh->{RaiseError} = 1; $dbh->{PrintError} = 1; } return 1; } } sub connect_db_forum { return 1 if (defined($dbh_forum)); my $database = \'diskusijos\'; my $hostname = \'mysql.lrytas.lt\'; my $user = \'bacila\'; my $password = \'bacila\'; my $dsn = "DBI:mysql:database=$database;host=$hostname;mysql_connect_timeout=1"; unless ( $dbh_forum = DBI->connect($dsn, $user, $password)) { return 0; } else { $dbh_forum->do(q{SET NAMES cp1257;}); $dbh_forum->{LongReadLen} = (1<<31) - 1; $dbh_forum->{AutoCommit} = 1; $dbh_forum->{RaiseError} = 0; if ($Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.3$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.11$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.2$/) { $dbh_forum->{RaiseError} = 1; $dbh_forum->{PrintError} = 1; } return 1; } } sub disconnect_db_forum { if (defined($dbh_forum)) { $dbh_forum->{RaiseError} = 0; $dbh_forum->{PrintError} = 0; $dbh_forum->disconnect; } $dbh_forum = undef; } sub connect_db_tv { return 1 if (defined($dbh_forum)); my $database = \'tv\'; my $hostname = \'bc.lrytas.lt\'; my $user = \'tv\'; my $password = \'tv\'; my $dsn = "DBI:mysql:database=$database;host=$hostname"; unless ( $dbh_tv = DBI->connect($dsn, $user, $password)) { return 0; } else { $dbh_tv->do(q{SET NAMES latin1}); # $dbh_tv->do(q{SET NAMES cp1257;}); $dbh_tv->{LongReadLen} = (1<<31) - 1; $dbh_tv->{AutoCommit} = 1; $dbh_tv->{RaiseError} = 0; if ($Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.3$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.11$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.2$/) { $dbh_tv->{RaiseError} = 1; $dbh_tv->{PrintError} = 1; } return 1; } } sub disconnect_db_tv { if (defined($dbh_tv)) { $dbh_tv->{RaiseError} = 0; $dbh_tv->{PrintError} = 0; $dbh_tv->disconnect; } $dbh_tv = undef; } sub connect_db_utf { my $compression = \'compression=gzip\'; return 1 if (defined($dbh_utf)); my $dsn2 = "DBI:Proxy:hostname=dbiproxy.lrytas.lt;port=82;dsn=DBI:Oracle:ORCL"; # my $dsn2 = "dbi:Oracle:host=oracle.lrytas.lt;sid=ORCL"; unless ($dbh_utf = DBI->connect($dsn2, "lr", "lr1")) { $db_error = 1; return 0; } else { $dbh_utf->{LongReadLen} = (1<<31) - 1; $dbh_utf->{AutoCommit} = 1; $dbh_utf->{RaiseError} = 1; if ($Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.3$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.11$/ || $Request->ServerVariables(\'REMOTE_ADDR\') =~ /^192\\.168\\.22\\.2$/) { $dbh_utf->{RaiseError} = 1; $dbh_utf->{PrintError} = 1; } return 1; } } sub Script_OnParse { # my $code = $Server->{ScriptRef}; # $$code = \'<% $Session = \\%session; %>\' . $$code; } ;; sub exit { $main::Response->End(); } ;; no lib qw(/data/www/modeliai); ;; 1;' called at /usr/lib/perl5/site_perl/5.8.8/Apache/ASP/GlobalASA.pm line 122 Apache::ASP::GlobalASA::new('Apache::ASP=HASH(0x1c284c00)') called at /usr/lib/perl5/site_perl/5.8.8/Apache/ASP.pm line 389 Apache::ASP::new('Apache::ASP', 'Apache2::RequestRec=SCALAR(0x1c13b330)', '/data/www/modeliai/index.asp') called at /usr/lib/perl5/site_perl/5.8.8/Apache/ASP.pm line 184 Apache::ASP::handler('Apache2::RequestRec=SCALAR(0x1c13b330)') called at /data/www/modeliai/global.asa line 9 eval {...} called at /data/www/modeliai/global.asa line 9 , /usr/lib/perl5/site_perl/5.8.8/Apache/ASP.pm line 1722
Compiled Data with Error 

  -: 
  -: #line 1 /data/www/modeliai/global.asa
  1: package Apache::ASP::Compiles::__ASP__data_www_modeliaix; ;; use strict ;; use vars qw($Application $Session $Response $Server $Request); ;; use lib qw(/data/www/modeliai); ;; use DBI;
  2: use DBD::Proxy;
  3: use File::Basename;
  4: use Time::Local;
  5: #use Cache::Memcached::XS;
  6: #use Cache::Memcached;
  7: use Cache::Memcached::Fast;
  8: #use Apache::Session::Memcached;
  9: use LRytas;
 10: use Unicode::Map;
 11: use Unicode::String;
 12: use vars qw($UNICODE_MAP);
 13: $UNICODE_MAP = new Unicode::Map("CP1257");
 14: 
 15: 
 16: use vars qw($Form $dbh $dbh_forum $dbh_tv $db_error $NEWS_FILE $DATA_FILE $SKILTYS_PATH $DATA_PATH $SIANDIEN $NUMERIS $VISOS_DATOS $SUPER);
 17: use vars qw(%SKILTYS %SKILTYS_NEWS @SKILTYS_NEWS %SKILTYS_SUTR $OK @DIENOS_SKILTYS @month @day $dbh_utf $memd);
 18: use vars qw($NEWS_SKILTIS $FOTO_STRAIPSNIS_ID $MODELIAI_FOTO_URL);
 19: $NEWS_SKILTIS = 101;
 20: $FOTO_STRAIPSNIS_ID = '12862825331283959793';
 21: $MODELIAI_FOTO_URL = 'http://modeliaifoto.lrytas.lt';
 22: use vars qw($LR $PLOTIS $STULP1 $STULP2 $STULP3 $STULP4);
 23: $LR = new LRytas();
 24: $PLOTIS = 1000; # Puslapio plotis
 25: $STULP1 = 120; # Pirmos celes plotis
 26: $STULP2 = 295; # Antros celes plotis, kur pirmas newso straipsnis top1
 27: $STULP3 = 450; # Trecia cele, su top1, top2 ir top3 newsais
 28: $STULP4 = 292; # Lryto vedamojo skiltis
 29: 
 30: # $ENV{'NLS_LANG'} = 'american_america.BLT8MSWIN1257';
 31: $ENV{'NLS_LANG'} = 'American_America.UTF8';
 32: $ENV{'LC_ALL'} = 'UTF-8';
 33: 
 34: use vars qw($memory_cache %session); 
 35: 
 36: use Text::Iconv;
 37: use vars qw($TO_UNICODE $FROM_UNICODE);
 38: $TO_UNICODE = Text::Iconv->new("CP1257", "UTF-8");
 39: $FROM_UNICODE = Text::Iconv->new("UTF-8", "CP1257");
 40: sub UNIKODAS
 41: { my $str = shift;
 42:   my $from = shift;
 43:    if (ref($str))
 44:     { 
 45:        if (ref($$str) =~ /^HASH/)
 46:         { foreach my $x (keys %$str)
 47:             { unless ($from)
 48:                {
 49:                $$str->{$x} = $TO_UNICODE->convert($$str->{$x});
 50:                }
 51:                else
 52:                {
 53:                  $$str->{$x} = $FROM_UNICODE->convert($$str->{$x});
 54:                }
 55:             }
 56:             return;
 57:         }
 58:       unless ($from)
 59:       {
 60:       $$str = $TO_UNICODE->convert($$str);
 61:       return;
 62:       }
 63:       else
 64:       { $$str = $FROM_UNICODE->convert($$str);
 65:         return;
 66:       }
 67:       }
 68:   else
 69:     { unless ($from)
 70:       { return $TO_UNICODE->convert($str); }
 71:       else
 72:       { return $FROM_UNICODE->convert($str); }
 73:     }
 74: };
 75: 
 76: 
 77: sub Session_OnStart {
 78:   }
 79: 
 80: sub Session_OnEnd {
 81: }
 82: 
 83: sub Application_OnStart {
 84: }
 85: 
 86: sub Application_OnEnd {
 87: }
 88: 
 89: sub Script_OnEnd {
 90:  untie(%session); 
 91:   if (defined ($dbh))
 92:     { $dbh->disconnect;
 93:     undef $dbh;
 94:     }
 95:   if (defined ($dbh_utf))
 96:     { $dbh_utf->disconnect; 
 97:       undef $dbh_utf; }
 98:   if (defined ($dbh_tv))
 99:     { $dbh_tv->disconnect; 
100:       undef $dbh_tv; }
101: }
102: 
103: sub Script_OnFlush {
104:    if ($Response->{Charset} !~ /utf/i)
105:    {
106:    my $ref = $Response->{BinaryRef};
107:    unless ($Form->{'isUTF8'} == 1)
108:    {
109:       UNIKODAS($ref);
110:    }
111:    else
112:    {
113:       my @arr = split(/\<\!\-\-UTF8\-\-\>/, $$ref);
114:       for (my $i = 0; $i < scalar @arr; $i++)
115:       {
116:          next if ($i % 2 == 1);
117: 	 $arr[$i] = UNIKODAS($arr[$i]);
118:       }
119:       $$ref = join('', @arr);
120:    }
121:    }
122:  }
123: 
124: sub Script_OnStart {
125: 
126: $memory_cache = new Cache::Memcached::Fast({
127:     servers => [ "10.0.0.29:11211", "10.0.0.29:11311", "10.0.0.29:11411" ],
128:     compress_threshold => 999,
129:     nowait => 1,
130:     namespace => $Request->ServerVariables("HTTP_HOST") =~ /modeliai/ ? "mod3:" : "mod4:",
131:     max_failures => 3,
132:     failure_timeout => 30
133:   });
134: 
135: # ideta EB
136:   require Super2;
137:   $SUPER = undef;
138:   $SUPER = Super->new({ db_connect => \&connect_db,
139: dbvar => \$dbh, SITE_ID => 1, any_str => 1,
140: url_root => '/'
141: });    
142: 
143:   
144:   
145:   
146: if (0)
147: {
148: my $session_cookie_name = 'lr_session';
149: my $sid = $Request->Cookies($session_cookie_name);
150: 
151: my $session_opts = {
152: Servers => '10.0.0.29:11211 10.0.0.29:11311 10.0.0.29:11411',
153:       NoRehash => 1,
154:       Readonly => 0,
155:       Expires => 60*60,
156:       Debug => 0,
157:       CompressThreshold => 10_000 };
158: 
159: if ($sid)
160: { 
161:   eval q{ tie %session, 'Apache::Session::Memcached', $sid, $session_opts; };
162:    if ($@)
163:     { tie %session, 'Apache::Session::Memcached', undef, $session_opts;
164:     }
165: }
166: else
167: { tie %session, 'Apache::Session::Memcached', undef, $session_opts;
168:     }
169: $Response->Cookies($session_cookie_name, $session{'_session_id'});
170: $Response->Cookies($session_cookie_name, "Path", "/");
171: $Response->Cookies($session_cookie_name, "Domain", "lrytas.lt");
172: $session{'ticker'}++;
173: }
174: 
175:   $Form = $Request->Params; 
176:   $dbh = undef; $db_error = 0;
177:   foreach my $k (keys %{$Form}) { alltrim(\$Form->{$k}); }
178:        $Server->RegisterCleanup(sub { 
179:           undef $dbh; 
180: 	   }
181:                 );
182: 		
183:   }
184: 
185: 
186: # you can share globals between scripts as of v.10, as all scripts, including 
187: # the global.asa are compiled into the same module
188: 
189: sub alltrim
190: { my $a = shift;
191:   if (ref($a))
192:    { $$a =~ s/^\s*//gi;
193:      $$a =~ s/\s*$//gi;
194: #     $$a =~ $Server->HTMLEncode;
195:      return; }
196:   else
197:    { $a =~ s/^\s*//gi;
198:      $a =~ s/\s*$//gi;
199: #     $a =~ $Server->HTMLEncode;
200:      return $a; }
201:  1;
202: }
203: 
204: sub connect_db
205: {   
206:   my $compression = 'compression=gzip';
207:     return 1 if (defined($dbh));
208:     my $dsn2 = "DBI:Proxy:hostname=dbiproxy.lrytas.lt;port=81;dsn=DBI:Oracle:ORCL";
209: #    my $dsn2 = "dbi:Oracle:host=oracle.lrytas.lt;sid=ORCL";
210:     unless ($dbh = DBI->connect($dsn2, "lr", "lr1"))
211:       { $db_error = 1; return 0; }
212:     else
213:       {
214:        $dbh->{LongReadLen} = (1<<31) - 1;
215:        $dbh->{AutoCommit} = 1;
216:        $dbh->{RaiseError} = 0;
217:        if ($Request->ServerVariables('REMOTE_ADDR') =~ /^192\.168\.22\.3$/ || $Request->ServerVariables('REMOTE_ADDR') =~ /^192\.168\.22\.11$/ ||
218:        $Request->ServerVariables('REMOTE_ADDR') =~ /^192\.168\.22\.2$/)
219:          { $dbh->{RaiseError} = 1;
220:            $dbh->{PrintError} = 1;
221:          }
222:        return 1;
223:     }
224: }
225: 
226: sub connect_db_forum
227: {
228:   return 1 if (defined($dbh_forum));
229:   my $database = 'diskusijos';
230:   my $hostname = 'mysql.lrytas.lt';
231:   my $user = 'bacila';
232:   my $password = 'bacila';
233:   
234:   my $dsn = "DBI:mysql:database=$database;host=$hostname;mysql_connect_timeout=1";
235: 
236:   unless ( $dbh_forum = DBI->connect($dsn, $user, $password))
237:     { return 0; }
238:     else
239:       {
240:        $dbh_forum->do(q{SET NAMES cp1257;});
241:        $dbh_forum->{LongReadLen} = (1<<31) - 1;
242:        $dbh_forum->{AutoCommit} = 1;
243:        $dbh_forum->{RaiseError} = 0;
244:         if ($Request->ServerVariables('REMOTE_ADDR') =~ /^192\.168\.22\.3$/ || $Request->ServerVariables('REMOTE_ADDR') =~ /^192\.168\.22\.11$/ ||
245:        $Request->ServerVariables('REMOTE_ADDR') =~ /^192\.168\.22\.2$/)
246:          { $dbh_forum->{RaiseError} = 1;
247:            $dbh_forum->{PrintError} = 1;
248:          }
249:        return 1;
250:     }
251: }
252: 
253: sub disconnect_db_forum
254: {
255:   if (defined($dbh_forum))
256:     { $dbh_forum->{RaiseError} = 0;
257:       $dbh_forum->{PrintError} = 0;
258:       $dbh_forum->disconnect;
259:     }
260:   $dbh_forum = undef;
261: }
262: 
263: sub connect_db_tv
264: {
265:   return 1 if (defined($dbh_forum));
266:   my $database = 'tv';
267:   my $hostname = 'bc.lrytas.lt';
268:   my $user = 'tv';
269:   my $password = 'tv';
270:   
271:   my $dsn = "DBI:mysql:database=$database;host=$hostname";
272: 
273:   unless ( $dbh_tv = DBI->connect($dsn, $user, $password))
274:     { return 0; }
275:     else
276:       {
277:        $dbh_tv->do(q{SET NAMES latin1});
278:    #    $dbh_tv->do(q{SET NAMES cp1257;});
279:        $dbh_tv->{LongReadLen} = (1<<31) - 1;
280:        $dbh_tv->{AutoCommit} = 1;
281:        $dbh_tv->{RaiseError} = 0;
282:        if ($Request->ServerVariables('REMOTE_ADDR') =~ /^192\.168\.22\.3$/ || $Request->ServerVariables('REMOTE_ADDR') =~ /^192\.168\.22\.11$/ ||
283:        $Request->ServerVariables('REMOTE_ADDR') =~ /^192\.168\.22\.2$/)
284:          { $dbh_tv->{RaiseError} = 1;
285:            $dbh_tv->{PrintError} = 1;
286:          }
287:        return 1;
288:     }
289: }
290: 
291: sub disconnect_db_tv
292: {
293:   if (defined($dbh_tv))
294:     { $dbh_tv->{RaiseError} = 0;
295:       $dbh_tv->{PrintError} = 0;
296:       $dbh_tv->disconnect;
297:     }
298:   $dbh_tv = undef;
299: }
300: 
301: sub connect_db_utf
302: {   
303:   my $compression = 'compression=gzip';
304:     return 1 if (defined($dbh_utf));
305:     my $dsn2 = "DBI:Proxy:hostname=dbiproxy.lrytas.lt;port=82;dsn=DBI:Oracle:ORCL";
306: #    my $dsn2 = "dbi:Oracle:host=oracle.lrytas.lt;sid=ORCL";
307:     unless ($dbh_utf = DBI->connect($dsn2, "lr", "lr1"))
308:       { $db_error = 1; return 0; }
309:     else
310:       {
311:        $dbh_utf->{LongReadLen} = (1<<31) - 1;
312:        $dbh_utf->{AutoCommit} = 1;
313:        $dbh_utf->{RaiseError} = 1;
314:        if ($Request->ServerVariables('REMOTE_ADDR') =~ /^192\.168\.22\.3$/ || $Request->ServerVariables('REMOTE_ADDR') =~ /^192\.168\.22\.11$/ ||
315:        $Request->ServerVariables('REMOTE_ADDR') =~ /^192\.168\.22\.2$/)
316:          { $dbh_utf->{RaiseError} = 1;
317:            $dbh_utf->{PrintError} = 1;
318:          }
319:        return 1;
320:     }
321: }
322: 
323: sub Script_OnParse {
324: #   my $code = $Server->{ScriptRef};
325: #   $$code = '<% $Session = \%session; %>' . $$code;
326:  }
327: 
328:  ;; sub exit { $main::Response->End(); }  ;; no lib qw(/data/www/modeliai); ;; 1;


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.