Re: mod_perl interactive debugging
On 5/29/08, william [EMAIL PROTECTED] wrote: On 5/29/08, Fred Moyer [EMAIL PROTECTED] wrote: william wrote: On 5/29/08, Perrin Harkins [EMAIL PROTECTED] wrote: On Wed, May 28, 2008 at 3:33 AM, william [EMAIL PROTECTED] wrote: I put the following lines at the top of my startup.pl script use APR::Pool (); #specific for mod_perl 2 use Apache::DB (); Apache::DB-init(); Can you show us the part of httpd.conf where you call startup.pl? I always place my debugger calls before any other modules load, usually right after mod_perl.so is loaded. Thanks for the prompt reply, here it is. /etc/apache2/httpd.conf Directory /var/www/cgi-bin Options +ExecCGI AddHandler cgi-script cgi pl /Directory ServerName localhost # Alias /modperl/ /var/www/modperl/ # IfDefine PERLDB # Perl # use APR::Pool (); # use Apache::DB (); # Apache::DB-init; # warn PERLDB executed; # /Perl # Location /modperl/ # PerlFixupHandler Apache::DB # /Location # /IfDefine #The startup script PerlRequire '/var/www/modperl/Apache2/startup.pl' -- /etc/apache2/sites-enabled/000-default NameVirtualHost * VirtualHost * ServerAdmin [EMAIL PROTECTED] ServerName localhost DocumentRoot /var/www/ Directory /var/www/ Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all /Directory Alias /modperl/ /var/www/modperl/ PerlModule ModPerl::RegistryPrefork Location /modperl/ PerlFixupHandler Apache::DB SetHandler perl-script PerlResponseHandler ModPerl::RegistryPrefork PerlOptions +ParseHeaders Options +ExecCGI Order allow,deny Allow from all /Location ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined ServerSignature On Alias /doc/ /usr/share/doc/ Directory /usr/share/doc/ Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 /Directory /VirtualHost /VirtualHost hello, I am still looking for solution. When command sudo apache2 -X -k restart The debugger would immediately startup at this shell ? Thanks
Re: mod_perl interactive debugging
william wrote: On 5/29/08, william [EMAIL PROTECTED] wrote: On 5/29/08, Fred Moyer [EMAIL PROTECTED] wrote: william wrote: On 5/29/08, Perrin Harkins [EMAIL PROTECTED] wrote: On Wed, May 28, 2008 at 3:33 AM, william [EMAIL PROTECTED] wrote: I put the following lines at the top of my startup.pl script use APR::Pool (); #specific for mod_perl 2 use Apache::DB (); Apache::DB-init(); Can you show us the part of httpd.conf where you call startup.pl? I always place my debugger calls before any other modules load, usually right after mod_perl.so is loaded. Thanks for the prompt reply, here it is. /etc/apache2/httpd.conf Directory /var/www/cgi-bin Options +ExecCGI AddHandler cgi-script cgi pl /Directory ServerName localhost # Alias /modperl/ /var/www/modperl/ # IfDefine PERLDB # Perl # use APR::Pool (); # use Apache::DB (); # Apache::DB-init; # warn PERLDB executed; # /Perl # Location /modperl/ # PerlFixupHandler Apache::DB # /Location # /IfDefine #The startup script PerlRequire '/var/www/modperl/Apache2/startup.pl' I didn't see a LodModule directive in there anywhere - do you have a line like 'LoadModule perl_module modules/mod_perl.so'? It looked like you were using mod_perl2, so it is very likely that you have that line in there somewhere (I don't know of anyone who has done a static build with mp2. hello, I am still looking for solution. When command sudo apache2 -X -k restart The debugger would immediately startup at this shell ? The debugger will start once the first request to the server is made.
Re: mod_perl interactive debugging
On 6/1/08, Fred Moyer [EMAIL PROTECTED] wrote: william wrote: On 5/29/08, william [EMAIL PROTECTED] wrote: On 5/29/08, Fred Moyer [EMAIL PROTECTED] wrote: william wrote: On 5/29/08, Perrin Harkins [EMAIL PROTECTED] wrote: On Wed, May 28, 2008 at 3:33 AM, william [EMAIL PROTECTED] wrote: I put the following lines at the top of my startup.pl script use APR::Pool (); #specific for mod_perl 2 use Apache::DB (); Apache::DB-init(); Can you show us the part of httpd.conf where you call startup.pl? I always place my debugger calls before any other modules load, usually right after mod_perl.so is loaded. Thanks for the prompt reply, here it is. /etc/apache2/httpd.conf Directory /var/www/cgi-bin Options +ExecCGI AddHandler cgi-script cgi pl /Directory ServerName localhost # Alias /modperl/ /var/www/modperl/ # IfDefine PERLDB # Perl # use APR::Pool (); # use Apache::DB (); # Apache::DB-init; # warn PERLDB executed; # /Perl # Location /modperl/ # PerlFixupHandler Apache::DB # /Location # /IfDefine #The startup script PerlRequire '/var/www/modperl/Apache2/startup.pl' I didn't see a LodModule directive in there anywhere - do you have a line like 'LoadModule perl_module modules/mod_perl.so'? It looked like you were using mod_perl2, so it is very likely that you have that line in there somewhere (I don't know of anyone who has done a static build with mp2. hello, I am still looking for solution. When command sudo apache2 -X -k restart The debugger would immediately startup at this shell ? The debugger will start once the first request to the server is made. My apache configuration file is not just at the httpd.conf , I also have the apache2.conf I have this line in /etc/apache2/mods-enabled/perl.load LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so Yes, I am using mod_perl/2.0.4 Perl/v5.10.0 I am able to run my perl script under mod_perl, without any problem. The debugger will start once the first request to the server is made. So the debugger would appear in which shell ? I only get to see the debugging process in /var/log/apache2/error.log , but not able to have interactive debugging feature. Thanks. apache2.conf # # Based upon the NCSA server configuration files originally by Rob McCool. # # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions. # See http://httpd.apache.org/docs/2.2/ for detailed information about # the directives. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # The configuration directives are grouped into three basic sections: # 1. Directives that control the operation of the Apache server process as a # whole (the 'global environment'). # 2. Directives that define the parameters of the 'main' or 'default' server, # which responds to requests that aren't handled by a virtual host. # These directives also provide default values for the settings # of all virtual hosts. # 3. Settings for virtual hosts, which allow Web requests to be sent to # different IP addresses or hostnames and have them handled by the # same Apache server process. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with / (or drive:/ for Win32), the # server will use that explicit path. If the filenames do *not* begin # with /, the value of ServerRoot is prepended -- so /var/log/apache2/foo.log # with ServerRoot set to will be interpreted by the # server as //var/log/apache2/foo.log. # ### Section 1: Global Environment # # The directives in this section affect the overall operation of Apache, # such as the number of concurrent requests it can handle or where it # can find its configuration files. # # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # NOTE! If you intend to place this on an NFS (or otherwise network) # mounted filesystem then please read the LockFile documentation (available # at URL:http://httpd.apache.org/docs-2.1/mod/mpm_common.html#lockfile); # you will save yourself a lot of trouble. # # Do NOT add a slash at the end of the directory path. # ServerRoot /etc/apache2 # # The accept serialization lock file MUST BE STORED ON A LOCAL DISK. # #IfModule !mpm_winnt.c #IfModule !mpm_netware.c LockFile /var/lock/apache2/accept.lock #/IfModule #/IfModule # # PidFile: The file in which the server should record its process # identification number when it starts. # This needs to be set in
Re: mod_perl interactive debugging
On 6/1/08, william [EMAIL PROTECTED] wrote: On 6/1/08, Fred Moyer [EMAIL PROTECTED] wrote: william wrote: On 5/29/08, william [EMAIL PROTECTED] wrote: On 5/29/08, Fred Moyer [EMAIL PROTECTED] wrote: william wrote: On 5/29/08, Perrin Harkins [EMAIL PROTECTED] wrote: On Wed, May 28, 2008 at 3:33 AM, william [EMAIL PROTECTED] wrote: I put the following lines at the top of my startup.pl script use APR::Pool (); #specific for mod_perl 2 use Apache::DB (); Apache::DB-init(); Can you show us the part of httpd.conf where you call startup.pl? I always place my debugger calls before any other modules load, usually right after mod_perl.so is loaded. Thanks for the prompt reply, here it is. /etc/apache2/httpd.conf Directory /var/www/cgi-bin Options +ExecCGI AddHandler cgi-script cgi pl /Directory ServerName localhost # Alias /modperl/ /var/www/modperl/ # IfDefine PERLDB # Perl # use APR::Pool (); # use Apache::DB (); # Apache::DB-init; # warn PERLDB executed; # /Perl # Location /modperl/ # PerlFixupHandler Apache::DB # /Location # /IfDefine #The startup script PerlRequire '/var/www/modperl/Apache2/startup.pl' I didn't see a LodModule directive in there anywhere - do you have a line like 'LoadModule perl_module modules/mod_perl.so'? It looked like you were using mod_perl2, so it is very likely that you have that line in there somewhere (I don't know of anyone who has done a static build with mp2. hello, I am still looking for solution. When command sudo apache2 -X -k restart The debugger would immediately startup at this shell ? The debugger will start once the first request to the server is made. My apache configuration file is not just at the httpd.conf , I also have the apache2.conf I have this line in /etc/apache2/mods-enabled/perl.load LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so Yes, I am using mod_perl/2.0.4 Perl/v5.10.0 I am able to run my perl script under mod_perl, without any problem. The debugger will start once the first request to the server is made. So the debugger would appear in which shell ? I only get to see the debugging process in /var/log/apache2/error.log , but not able to have interactive debugging feature. Thanks. apache2.conf # # Based upon the NCSA server configuration files originally by Rob McCool. # # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions. # See http://httpd.apache.org/docs/2.2/ for detailed information about # the directives. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # The configuration directives are grouped into three basic sections: # 1. Directives that control the operation of the Apache server process as a # whole (the 'global environment'). # 2. Directives that define the parameters of the 'main' or 'default' server, # which responds to requests that aren't handled by a virtual host. # These directives also provide default values for the settings # of all virtual hosts. # 3. Settings for virtual hosts, which allow Web requests to be sent to # different IP addresses or hostnames and have them handled by the # same Apache server process. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with / (or drive:/ for Win32), the # server will use that explicit path. If the filenames do *not* begin # with /, the value of ServerRoot is prepended -- so /var/log/apache2/foo.log # with ServerRoot set to will be interpreted by the # server as //var/log/apache2/foo.log. # ### Section 1: Global Environment # # The directives in this section affect the overall operation of Apache, # such as the number of concurrent requests it can handle or where it # can find its configuration files. # # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # NOTE! If you intend to place this on an NFS (or otherwise network) # mounted filesystem then please read the LockFile documentation (available # at URL:http://httpd.apache.org/docs-2.1/mod/mpm_common.html#lockfile); # you will save yourself a lot of trouble. # # Do NOT add a slash at the end of the directory path. # ServerRoot /etc/apache2 # #
mod_perl BOF at YAPC::NA
YAPC::NA is only a few weeks away, and I stumbled upon the beginning of plans for a BOF there. There's not a whole lot on the signup page yet, but if you're interested (and going), you should signup. The wiki page for the BOF is here: http://conferences.mongueurs.net/yn2008/wiki?node=mod_perl%20BOF Adam