Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

Problem Setting Up ptkdb For mod_perl

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


yccheok at yahoo

Nov 6, 2008, 2:00 AM

Post #1 of 4 (686 views)
Permalink
Problem Setting Up ptkdb For mod_perl

Hi, I wish to setup a GUI debugging environment for my CGI, which is running
using apache mod_perl

I update the following file (/usr/local/apache_modperl/conf/httpd.conf) to
the below content :-

### Start to hack by Cheok
<Perl>
use Apache::DB();
Apache::DB->init;
</Perl>
<Location />
PerlFixupHandler Apache::DB
</Location>
### End to hack by Cheok

and the following file (/usr/local/lib/perl/5.8.8/Apache/DB.pm)

if (!$loaded_db) {
# Fallback
# require 'Apache/perl5db.pl';
# Hacked by Cheok
require Devel::ptkdb;
}

When I launch a web site, I get the following error log :-

[yanchengdev] [modperl] Prototype mismatch: sub CORE::GLOBAL::exit: none vs
(;$) at /usr/local/lib/perl/5.8.8/Tk.pm line 414. [failed] [Connection
refused]
[yanchengdev] [modperl] [Wed Nov 5 10:48:53 2008] [notice] child pid 15698
exit signal Segmentation fault (11) [success]
[yanchengdev] [modperl] Prototype mismatch: sub CORE::GLOBAL::exit: none vs
(;$) at /usr/local/lib/perl/5.8.8/Tk.pm line 414. [failed] [Connection
refused]
[yanchengdev] [modperl] [Wed Nov 5 10:48:54 2008] [notice] child pid 15699
exit signal Segmentation fault (11) [success]

OK. I temporary solve the problem by comment out the line

## *CORE::GLOBAL::exit = \&exit;

I try to test whether TK/Perl debugging tool still work by

(1) ssh -X root [at] remotemachin
(2) cat cheok.cgi

#!/usr/bin/perl5 -Twd:ptkdb

print "Hello World From Cheok.\n";
print "Good Bye World.\n";

(3) /usr/bin/perl5 -T cheok.cgi

OK. The GUI windows shown up, and I can perform step debugging.

Now, I try to test on the web site. I want to start my apache in single
process mode. Hence, I edit the following files

/usr/local/apache_modperl/bin/apachectl
/etc/init.d/apache

to content (I just add -X flag)

case "$1" in
start)
log_begin_msg "Starting $NAME 1.3 web server..."
if $ENV $SSD --start --pidfile $PIDFILE --make-pidfile $PIDFILE --exec
$DAEMON --oknodo --verbose -- -X -f $CONF; then

Then I run

yanchengdev:/$ /usr/local/apache_modperl/bin/apachectl stop
Stopping apache 1.3 web server....
yanchengdev:/$ /usr/local/apache_modperl/bin/apachectl start
Starting apache 1.3 web server...GnuPlot already exists in [/tmp/]. Skipping
copy.
PRELOADING SCRIPTS...
Regenerating autold...done.
[notice] Apache::DB initialized in child 17975
GnuPlot already exists in [/tmp/]. Skipping copy.
PRELOADING SCRIPTS...
Regenerating autold...done.

I use my browser to request cheok.cgi

The web page is displayed at browser. But there are no GUI debugger windows
at all.

I check the error log file in apache, there isn't any error :(

Any hint? I am lost...

Cheok
--
View this message in context: http://www.nabble.com/Problem-Setting-Up-ptkdb-For-mod_perl-tp20358148p20358148.html
Sent from the mod_perl - General mailing list archive at Nabble.com.


pgollucci at p6m7g8

Nov 6, 2008, 11:27 AM

Post #2 of 4 (655 views)
Permalink
Re: Problem Setting Up ptkdb For mod_perl [In reply to]

yccheok wrote:
> Now, I try to test on the web site. I want to start my apache in single
> process mode. Hence, I edit the following files
>
> /usr/local/apache_modperl/bin/apachectl
> /etc/init.d/apache
>
> to content (I just add -X flag)
>
> case "$1" in
> start)
> log_begin_msg "Starting $NAME 1.3 web server..."
> if $ENV $SSD --start --pidfile $PIDFILE --make-pidfile $PIDFILE --exec
> $DAEMON --oknodo --verbose -- -X -f $CONF; then
Rather then -X just set all the MPM values to 1 and MaxRequestsPerChild
to 0.

Its roughly equivalent. Also, you might look at -DONE_PROCESS where
unlike -X it should still do a dettach().



--
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci [at] p6m7g8) c: 703.336.9354
Consultant - P6M7G8 Inc. http://p6m7g8.net
Senior System Admin - RideCharge, Inc. http://ridecharge.com
1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70 3F8C 75B8 8FFB DB9B 8C1C

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.


yccheok at yahoo

Nov 6, 2008, 4:59 PM

Post #3 of 4 (637 views)
Permalink
Re: Problem Setting Up ptkdb For mod_perl [In reply to]

Thanks!

I can see MaxRequestsPerChild field under
/usr/local/apache_modperl/conf/httpd.conf

How about -DONE_PROCESS and MPM? Where I can set them?

Thanks!

Cheok


Philip M. Gollucci wrote:
>
> yccheok wrote:
>> Now, I try to test on the web site. I want to start my apache in single
>> process mode. Hence, I edit the following files
>>
>> /usr/local/apache_modperl/bin/apachectl
>> /etc/init.d/apache
>>
>> to content (I just add -X flag)
>>
>> case "$1" in
>> start)
>> log_begin_msg "Starting $NAME 1.3 web server..."
>> if $ENV $SSD --start --pidfile $PIDFILE --make-pidfile $PIDFILE --exec
>> $DAEMON --oknodo --verbose -- -X -f $CONF; then
> Rather then -X just set all the MPM values to 1 and MaxRequestsPerChild
> to 0.
>
> Its roughly equivalent. Also, you might look at -DONE_PROCESS where
> unlike -X it should still do a dettach().
>
>
>
> --
> ------------------------------------------------------------------------
> Philip M. Gollucci (pgollucci [at] p6m7g8) c: 703.336.9354
> Consultant - P6M7G8 Inc. http://p6m7g8.net
> Senior System Admin - RideCharge, Inc. http://ridecharge.com
> 1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70 3F8C 75B8 8FFB DB9B 8C1C
>
> Work like you don't need the money,
> love like you'll never get hurt,
> and dance like nobody's watching.
>
>

--
View this message in context: http://www.nabble.com/Problem-Setting-Up-ptkdb-For-mod_perl-tp20358148p20372873.html
Sent from the mod_perl - General mailing list archive at Nabble.com.


yccheok at yahoo

Nov 6, 2008, 5:21 PM

Post #4 of 4 (644 views)
Permalink
Problem Setting Up ptkdb For mod_perl [In reply to]

Hi, I wish to setup a GUI debugging environment for my CGI, which is running using apache mod_perl

I update the following file (/usr/local/apache_modperl/conf/httpd.conf) to the below content :-

### Start to hack by Cheok
<Perl>
use Apache::DB();
Apache::DB->init;
</Perl>
<Location />
PerlFixupHandler Apache::DB
</Location>
### End to hack by Cheok

and the following file (/usr/local/lib/perl/5.8.8/Apache/DB.pm)

if (!$loaded_db) {
# Fallback
# require 'Apache/perl5db.pl';
# Hacked by Cheok
require Devel::ptkdb;
}

When I launch a web site, I get the following error log :-

[yanchengdev] [modperl] Prototype mismatch: sub CORE::GLOBAL::exit: none vs (;$) at /usr/local/lib/perl/5.8.8/Tk.pm line 414. [failed] [Connection refused]
[yanchengdev] [modperl] [Wed Nov 5 10:48:53 2008] [notice] child pid 15698 exit signal Segmentation fault (11) [success]
[yanchengdev] [modperl] Prototype mismatch: sub CORE::GLOBAL::exit: none vs (;$) at /usr/local/lib/perl/5.8.8/Tk.pm line 414. [failed] [Connection refused]
[yanchengdev] [modperl] [Wed Nov 5 10:48:54 2008] [notice] child pid 15699 exit signal Segmentation fault (11) [success]

OK. I temporary solve the problem by comment out the line

## *CORE::GLOBAL::exit = \&exit;

I try to test whether TK/Perl debugging tool still work by

(1) ssh -X root [at] remotemachin
(2) cat cheok.cgi

#!/usr/bin/perl5 -Twd:ptkdb

print "Hello World From Cheok.\n";
print "Good Bye World.\n";

(3) /usr/bin/perl5 -T cheok.cgi

OK. The GUI windows shown up, and I can perform step debugging.

Now, I try to test on the web site. I want to start my apache in single process mode. Hence, I edit the following files

/usr/local/apache_modperl/bin/apachectl
/etc/init.d/apache

to content (I just add -X flag)

case "$1" in
start)
log_begin_msg "Starting $NAME 1.3 web server..."
if $ENV $SSD --start --pidfile $PIDFILE --make-pidfile $PIDFILE --exec $DAEMON --oknodo --verbose -- -X -f $CONF; then

Then I run

yanchengdev:/$ /usr/local/apache_modperl/bin/apachectl stop
Stopping apache 1.3 web server....
yanchengdev:/$ /usr/local/apache_modperl/bin/apachectl start
Starting apache 1.3 web server...GnuPlot already exists in [/tmp/]. Skipping copy.
PRELOADING SCRIPTS...
Regenerating autold...done.
[notice] Apache::DB initialized in child 17975
GnuPlot already exists in [/tmp/]. Skipping copy.
PRELOADING SCRIPTS...
Regenerating autold...done.

I use my browser to request cheok.cgi

The web page is displayed at browser. But there are no GUI debugger windows at all.

I check the error log file in apache, there isn't any error :(

Any hint? I am lost...

Cheok

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.