Hi adam,
 
I got that mod_perl works on my server.
 
But how to setup Komodo 3.1 to debug mod_perl?
 
It seems like Komodo can only debug mod_cgi.
 
My httpd.conf setting:
 
<Perl>
  use lib qw("C:/Program Files/ActiveState Komodo 3.1/dbgp/perllib");
  $ENV{PERLDB_OPTS} = "RemotePort=127.0.0.1:1417 LogFile=stderr";
  use Apache::DB ();
  Apache::DB->init;
</Perl>
 
Alias /perl/ "C:/Apache2.2/htdocs/perl/"
<Location /perl/>
  SetHandler perl-script
  PerlHandler ModPerl::Registry
  Options +ExecCGI
  PerlOptions +ParseHeaders
  PerlFixupHandler Apache::DB
  Order allow,deny
  Allow from all 
</Location>

Below is Apache error logs:
 
Thu Jul 17 12:50:21 2008] [error] Unable to get Terminal Size. The Win32 
GetConsoleScreenBufferInfo call didn't work. The COLUMNS and LINES environment 
variables didn't work. The resize program didn't work. at 
C:/Perl/lib/Term/ReadKey.pm line 362.\nCompilation failed in require at 
C:/Perl/lib/Term/ReadLine/Perl.pm line 64.\n at 
C:/Perl/lib/Term/ReadLine/Perl.pm line 64\n\teval {...} called at 
C:/Perl/lib/Term/ReadLine/Perl.pm line 
64\n\tTerm::ReadLine::Perl::new('Term::ReadLine', 'perldb', 
'IO::Socket::INET=GLOB(0xa4f9cbc)', 'IO::Socket::INET=GLOB(0xa4f9cbc)') called 
at C:/Perl/site/lib/Apache/perl5db.pl line 2226\n\tDB::setterm called at 
C:/Perl/site/lib/Apache/perl5db.pl line 773\n\tDB::DB called at 
C:/Apache2.2/htdocs/perl/foo2.cgi line 
2\n\tModPerl::ROOT::ModPerl::Registry::C_3a_Apache2_2e2_htdocs_perl_foo2_2ecgi::BEGIN()
 called at C:/Perl/lib/Term/ReadLine/readline.pm line 2\n\teval {...} called at 
C:/Perl/lib/Term/ReadLine/readline.pm line
 2\n\teval 'package 
ModPerl::ROOT::ModPerl::Registry::C_3a_Apache2_2e2_htdocs_perl_foo2_2ecgi;sub 
handler {local $0 = \\'C:/Apache2.2/htdocs/perl/foo2.cgi\\';\n#line 1 
C:/Apache2.2/htdocs/perl/foo2.cgi\n#!c:/perl/bin/perl.exe\r\n  use strict;\r\n  
print "Content-type: text/html\\\\n\\\\n";\r\n  print 
"<HTML><BODY><H3>Environment variables</H3><UL>";\r\n  foreach (sort keys %ENV) 
{\r\n    my $val = $ENV{$_};\r\n    $val =~ s|\\\\n|\\\\\\\\n|g;\r\n    $val =~ 
s|"|\\\\\\\\"|g;\r\n    print "<LI>$_ = \\\\"${val}\\\\"</LI>\\\\n";\r\n  
}\r\n  #sleep(10);\r\n  print "</UL></BODY></HTML>";\n}\n;' called at 
C:/Perl/site/lib/ModPerl/RegistryCooker.pm line 
677\n\tModPerl::RegistryCooker::compile('ModPerl::Registry=HASH(0x280c1ac)', 
'SCALAR(0x1c615f0)') called at C:/Perl/site/lib/ModPerl/RegistryCooker.pm line 
406\n\tModPerl::RegistryCooker::convert_script_to_compiled_handler('ModPerl::Registry=HASH(0x280c1ac)')
 called at
 C:/Perl/site/lib/ModPerl/RegistryCooker.pm line 
163\n\tModPerl::RegistryCooker::default_handler('ModPerl::Registry=HASH(0x280c1ac)')
 called at C:/Perl/site/lib/ModPerl/Registry.pm line 
31\n\tModPerl::Registry::handler('ModPerl::Registry', 
'Apache2::RequestRec=SCALAR(0x280c284)') called at 
C:/Perl/lib/Term/ReadLine/readline.pm line 2\n\teval {...} called at 
C:/Perl/lib/Term/ReadLine/readline.pm line 2\n at 
C:/Perl/lib/Term/ReadLine/Perl.pm line 
64\n\tTerm::ReadLine::Perl::new('Term::ReadLine', 'perldb', 
'IO::Socket::INET=GLOB(0xa4f9cbc)', 'IO::Socket::INET=GLOB(0xa4f9cbc)') called 
at C:/Perl/site/lib/Apache/perl5db.pl line 2226\n\tDB::setterm called at 
C:/Perl/site/lib/Apache/perl5db.pl line 773\n\tDB::DB called at 
C:/Apache2.2/htdocs/perl/foo2.cgi line 
2\n\tModPerl::ROOT::ModPerl::Registry::C_3a_Apache2_2e2_htdocs_perl_foo2_2ecgi::BEGIN()
 called at C:/Apache2.2/htdocs/perl/foo2.cgi line 2\n\teval {...} called at 
C:/Apache2.2/htdocs/perl/foo2.cgi line
 2\n\teval 'package 
ModPerl::ROOT::ModPerl::Registry::C_3a_Apache2_2e2_htdocs_perl_foo2_2ecgi;sub 
handler {local $0 = \\'C:/Apache2.2/htdocs/perl/foo2.cgi\\';\n#line 1 
C:/Apache2.2/htdocs/perl/foo2.cgi\n#!c:/perl/bin/perl.exe\r\n  use strict;\r\n  
print "Content-type: text/html\\\\n\\\\n";\r\n  print 
"<HTML><BODY><H3>Environment variables</H3><UL>";\r\n  foreach (sort keys %ENV) 
{\r\n    my $val = $ENV{$_};\r\n    $val =~ s|\\\\n|\\\\\\\\n|g;\r\n    $val =~ 
s|"|\\\\\\\\"|g;\r\n    print "<LI>$_ = \\\\"${val}\\\\"</LI>\\\\n";\r\n  
}\r\n  #sleep(10);\r\n  print "</UL></BODY></HTML>";\n}\n;' called at 
C:/Perl/site/lib/ModPerl/RegistryCooker.pm line 
677\n\tModPerl::RegistryCooker::compile('ModPerl::Registry=HASH(0x280c1ac)', 
'SCALAR(0x1c615f0)') called at C:/Perl/site/lib/ModPerl/RegistryCooker.pm line 
406\n\tModPerl::RegistryCooker::convert_script_to_compiled_handler('ModPerl::Registry=HASH(0x280c1ac)')
 called at
 C:/Perl/site/lib/ModPerl/RegistryCooker.pm line 
163\n\tModPerl::RegistryCooker::default_handler('ModPerl::Registry=HASH(0x280c1ac)')
 called at C:/Perl/site/lib/ModPerl/Registry.pm line 
31\n\tModPerl::Registry::handler('ModPerl::Registry', 
'Apache2::RequestRec=SCALAR(0x280c284)') called at 
C:/Apache2.2/htdocs/perl/foo2.cgi line 2\n\teval {...} called at 
C:/Apache2.2/htdocs/perl/foo2.cgi line 2\nBEGIN failed--compilation aborted at 
C:/Apache2.2/htdocs/perl/foo2.cgi line 2.\n at 
C:/Apache2.2/htdocs/perl/foo2.cgi line 2\n\teval 'package 
ModPerl::ROOT::ModPerl::Registry::C_3a_Apache2_2e2_htdocs_perl_foo2_2ecgi;sub 
handler {local $0 = \\'C:/Apache2.2/htdocs/perl/foo2.cgi\\';\n#line 1 
C:/Apache2.2/htdocs/perl/foo2.cgi\n#!c:/perl/bin/perl.exe\r\n  use strict;\r\n  
print "Content-type: text/html\\\\n\\\\n";\r\n  print 
"<HTML><BODY><H3>Environment variables</H3><UL>";\r\n  foreach (sort keys %ENV) 
{\r\n    my $val = $ENV{$_};\r\n    $val =~
 s|\\\\n|\\\\\\\\n|g;\r\n    $val =~ s|"|\\\\\\\\"|g;\r\n    print "<LI>$_ = 
\\\\"${val}\\\\"</LI>\\\\n";\r\n  }\r\n  #sleep(10);\r\n  print 
"</UL></BODY></HTML>";\n}\n;' called at 
C:/Perl/site/lib/ModPerl/RegistryCooker.pm line 
677\n\tModPerl::RegistryCooker::compile('ModPerl::Registry=HASH(0x280c1ac)', 
'SCALAR(0x1c615f0)') called at C:/Perl/site/lib/ModPerl/RegistryCooker.pm line 
406\n\tModPerl::RegistryCooker::convert_script_to_compiled_handler('ModPerl::Registry=HASH(0x280c1ac)')
 called at C:/Perl/site/lib/ModPerl/RegistryCooker.pm line 
163\n\tModPerl::RegistryCooker::default_handler('ModPerl::Registry=HASH(0x280c1ac)')
 called at C:/Perl/site/lib/ModPerl/Registry.pm line 
31\n\tModPerl::Registry::handler('ModPerl::Registry', 
'Apache2::RequestRec=SCALAR(0x280c284)') called at 
C:/Apache2.2/htdocs/perl/foo2.cgi line 2\n\teval {...} 
 
I did a lot online search as well, but still cann't find a solution.
 
http://osdir.com/ml/ide.komodo.general/2005-07/msg00008.html
 
Regards
 
Chris Z

--- On Thu, 17/7/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Subject: Re: persistent database connection - Apache::DBI with mod_perl
To: modperl@perl.apache.org
Received: Thursday, 17 July, 2008, 12:33 AM

Quoting Chris Zhuang <[EMAIL PROTECTED]>:

> Hi,
>  However, when I run an CGI script on the IE 6, it cannot find   
> $ENV{MOD_PERL} and start new DBI connection.
>  --------foo.cgi--------------------
> #!c:/perl/bin/perl.exe -d
> use DBI;
> use CGI qw(:standard);
>
> my $dbh = DBI->connect("dbi:Oracle:host=xxx;sid=xxx",
>                              "xxx", "xxx",
>                              {PrintError => 1, RaiseError => 0,   
> AutoCommit => 1,}
>                              );
> --------END--------------------
>

It looks like your CGI's are are running under CGI, not  
ModPerl::PerlRun, or ModPerl::Registry.

see:
http://perl.apache.org/docs/2.0/user/intro/start_fast.html#Registry_Scripts


      Start at the new Yahoo!7 for a better online experience. www.yahoo7.com.au

Reply via email to