[Fwd: PAUSE indexer report PGOLLUCCI/Apache-Peek-1.05.tar.gz]
Horray, Its finally successfully indexed. There is no functinal change in this version from 1.03 other then I've fixed the CPAN/Pause indexing. Thanks Andreas! Original Message Subject: PAUSE indexer report PGOLLUCCI/Apache-Peek-1.05.tar.gz Date: Tue, 9 Aug 2005 06:54:33 +0200 From: PAUSE <[EMAIL PROTECTED]> To: [EMAIL PROTECTED], [EMAIL PROTECTED] The following report has been written by the PAUSE namespace indexer. Please contact modules@perl.org if there are any open questions. Id: mldistwatch 631 2005-08-03 06:30:00Z k User: PGOLLUCCI (Philip M. Gollucci) Distribution file: Apache-Peek-1.05.tar.gz Number of files: 21 *.pm files: 2 README: Apache-Peek-1.05/README META.yml: Apache-Peek-1.05/META.yml Timestamp of file: Tue Aug 9 03:54:31 2005 UTC Time of this run: Tue Aug 9 04:54:32 2005 UTC The following packages (grouped by status) have been found in the distro: Status: Successfully indexed module: Apache::Peek version: 1.05 in file: Apache-Peek-1.05/Peek.pm status: indexed __END__ -- END What doesn't kill us can only make us stronger. Nothing is impossible. Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198 Consultant / http://p6m7g8.net/Resume/ Senior Developer / Liquidity Services, Inc. http://www.liquidityservicesinc.com http://www.liquidation.com http://www.uksurplus.com http://www.govliquidation.com http://www.gowholesale.com
Re: mod_perl2 and PHP
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Geoffrey Young wrote: > > Dominique Quatravaux wrote: > >> $r->subprocess_env() (undocumented but present in mod_perl 1.3 >> >> $r->internal_redirect() (again undocumented but present in >> mod_perl 1.3 > > > unless you mean strictly in terms of what you're doing with php, > this is certainly FUD Sorry, my mistake. - -- Dominique QUATRAVAUX Ingénieur senior 01 44 42 00 08 IDEALX -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFC+GD4MJAKAU3mjcsRAvk0AJ0dZ3yI8BrXpgV6bO4P72zg30yFvQCfaAMR xb6HSwtl4YNQNx1+H+OtRrc= =REY9 -END PGP SIGNATURE-
[MP2] mod_perl 1.0 -> mod_perl 2.0 conversion woes.
I realise there's a good chance my issue is my own stupidity, but I'm hoping someone else can help out -- I've searched this mailing list and google, all to no avail. I am in the midst of trying to convert my software from mod_perl 1 to mod_perl 2 without the use of Apache2::Compat. I have imported (I think) all of the necessary modules, and changed the constants to read Apache2::Const::OK|DECLINED|etc. I have made the necessary conversions in the code, etc. My Apache config simply reads: PerlResponseHandler deBiz::Main So when I fetch a URL, it calls deBiz::Main::handler just fine. My code works by doing what it must do, and then doing a push_handlers to move onto the next function, that way, any given part of the module can return something other than DECLINED and it will quit at that point. It all worked just fine in mod_perl 1.0 The functions it calls in order are: handler -> dbconnect -> session_check -> prepare_data -> sendpage And it works by calling: Apache2::ServerUtil->server->push_handlers('PerlResponseHandler' => \&functionname); So, the program runs on index.html, and works just fine.. it calls each function perfectly in order as it's supposed to. Then, when anything referenced by the page (ie an image, or favicon.ico) is requested in the same HTTP session by the browser, mod_perl tries to parse it by starting over at &dbconnect() instead of going back to the original &handler(). Even if I set a variable and look for its value in dbconnect and reset handler and return DECLINED, it just ends and refuses to run &handler(). As I said before, it works just fine in mod_perl 1.0, and only broke as of mod_perl 2.0. Thoughts/ideas? Justin
Re: [MP2] mod_perl 1.0 -> mod_perl 2.0 conversion woes.
Yup. As it turns out, it was my own stupidity. It was calling handler again, but handler was returning DECLINED due to a mismatched content_type, and mod_perl had simply remembered the next handler was dbconnect and went about its day. Problem was fixed by having handler() clear out any other PerlResponseHandlers before starting over again. Justin Justin Wheeler wrote: > I realise there's a good chance my issue is my own stupidity, but I'm > hoping someone else can help out -- I've searched this mailing list and > google, all to no avail. > > I am in the midst of trying to convert my software from mod_perl 1 to > mod_perl 2 without the use of Apache2::Compat. > > I have imported (I think) all of the necessary modules, and changed the > constants to read Apache2::Const::OK|DECLINED|etc. > > I have made the necessary conversions in the code, etc. > > My Apache config simply reads: > > PerlResponseHandler deBiz::Main > > So when I fetch a URL, it calls deBiz::Main::handler just fine. > > My code works by doing what it must do, and then doing a push_handlers > to move onto the next function, that way, any given part of the module > can return something other than DECLINED and it will quit at that point. > > It all worked just fine in mod_perl 1.0 > > The functions it calls in order are: > > handler -> dbconnect -> session_check -> prepare_data -> sendpage > > And it works by calling: > > Apache2::ServerUtil->server->push_handlers('PerlResponseHandler' => > \&functionname); > > So, the program runs on index.html, and works just fine.. it calls each > function perfectly in order as it's supposed to. > > Then, when anything referenced by the page (ie an image, or favicon.ico) > is requested in the same HTTP session by the browser, mod_perl tries to > parse it by starting over at &dbconnect() instead of going back to the > original &handler(). > > Even if I set a variable and look for its value in dbconnect and reset > handler and return DECLINED, it just ends and refuses to run &handler(). > > As I said before, it works just fine in mod_perl 1.0, and only broke as > of mod_perl 2.0. > > Thoughts/ideas? > Justin
Re: Apache::DBI patches
Joe Thomas wrote: Hi Philip, I notice that you're maintaining a new version of Apache::DBI. About a year ago, I posted a couple of patches to the mod_perl list, and sent them to Ask, but never received any response. My patch fixes a problem with database rollback/cleanup when more than one database handle is used. It fit well with another (similarly ignored) patch posted by Patrick Mulvany in 2003. His patch caches many of the database state attributes (AutoCommit, PrintError, RaiseError, etc.), and restores them to their initial values when a handle is reused. The attached patch applies to Apache-DBI-0.99 from your site, and includes both changes. Can you take a look and let me know if you'd consider including them? I'll attempt take a look at this sometime this week. At first glance I think I have some questions about it. I'll get back to you after more thorough investigation. Please CC the modperl@perl.apache.org list as I'm not technically the maintainer, Ask still is, and its supposed to a community maintained module. Thanks for the work and repeated effort. P.S. I CC'ed the list. -- END - What doesn't kill us can only make us stronger. Nothing is impossible. Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198 Consultant / http://p6m7g8.net/Resume/resume.shtml Senior Developer / Liquidity Services, Inc. http://www.liquidityservicesinc.com http://www.liquidation.com http://www.uksurplus.com http://www.govliquidation.com http://www.gowholesale.com diff -u Apache-DBI-0.99/Changes DBI/Changes --- Apache-DBI-0.99/Changes Thu Aug 4 08:58:48 2005 +++ DBI/Changes Tue Aug 9 11:23:08 2005 @@ -1,5 +1,17 @@ Revision history for ApacheDBI. +patch from Joe Thomas September 2, 2004 + - Move $Idx from a file-scoped variable to a connect() scoped + variable, which gets passed to other subroutines as needed. + This will ensure that the cleanup/rollback feature will work + properly when a script uses more than one database handle. + +patch from Patrick Mulvany July 21, 2003 +- Fixed issues relating to chanding handle state post connection. + Handles now returned in same state as original and incomplete + transactions rolled back before re-issuing handle so begin_work + should now be safe. "Patrick Mulvany" <[EMAIL PROTECTED]> + 0.99 08/03/2005 - Turn off Debugging by default. Reported by <[EMAIL PROTECTED]> diff -u Apache-DBI-0.99/DBI.pm DBI/DBI.pm --- Apache-DBI-0.99/DBI.pm Thu Aug 4 08:57:06 2005 +++ DBI/DBI.pm Tue Aug 9 11:23:08 2005 @@ -22,8 +22,9 @@ my %Rollback; # keeps track of pushed PerlCleanupHandler which can do a rollback after the request has finished my %PingTimeOut; # stores the timeout values per data_source, a negative value de-activates ping, default = 0 my %LastPingTime; # keeps track of last ping per data_source -my $Idx; # key of %Connected and %Rollback. +# Check to see if we need to reset TaintIn and TaintOut +my $TaintInOut = ($DBI::VERSION>=1.31)?1:0; # supposed to be called in a startup script. # stores the data_source of all connections, which are supposed to be created upon @@ -76,7 +77,7 @@ my $dsn= "dbi:$drh->{Name}:$args[0]"; my $prefix = "$$ Apache::DBI"; -$Idx = join $;, $args[0], $args[1], $args[2]; +my $Idx = join $;, $args[0], $args[1], $args[2]; # key of %Connected and %Rollback. # the hash-reference differs between calls even in the same # process, so de-reference the hash-reference @@ -110,18 +111,22 @@ } } -# this PerlCleanupHandler is supposed to initiate a rollback after the script has finished if AutoCommit is off. -my $needCleanup = ($Idx =~ /AutoCommit[^\d]+0/) ? 1 : 0; -if(!$Rollback{$Idx} and $needCleanup and Apache->can('push_handlers')) { -print STDERR "$prefix push PerlCleanupHandler \n" if $Apache::DBI::DEBUG > 1; - if ($ENV{MOD_PERL_API_VERSION} == 2) { - require Apache2::ServerUtil; - my $s = Apache2::ServerUtil->server; - $s->push_handlers("PerlCleanupHandler", \&cleanup); - } - else { - Apache->push_handlers("PerlCleanupHandler", \&cleanup); - } +# this PerlCleanupHandler is supposed to initiate a rollback after the +# script has finished if AutoCommit is off. however, cleanup can only +# be determined at end of handle life as begin_work may have been called +# to temporarily turn off AutoCommit. +if (!$Rollback{$Idx} and $ENV{MOD_PERL_API_VERSION} == 2) { +require Apache2::ServerUtil; +my $s = Apache2::ServerUtil->se
[MP2] mod_perl 2.0 seg faulting..
Oh, wait .. it gets better. I fixed my previous problem, but have a new one. If I put my system under heavy load, I start seeing these in my log files: [Tue Aug 09 15:46:05 2005] [error] lookup of 'Main::session_check' failed session_check is sometimes another handler in the list of handlers (dbconnect, sendpage, etc.) Followed up by: [Tue Aug 09 15:46:06 2005] [notice] child pid 3044 exit signal Segmentation fault (11) A backtrace returns: #0 0x08078432 in modperl_handler_perl_get_handlers () #1 0xb7a4b58a in XS_Apache2__RequestRec_get_handlers () from /usr/local/lib/perl/5.8.4/auto/Apache2/RequestUtil/RequestUtil.so #2 0xb7e0ceba in Perl_pp_entersub () from /usr/lib/libperl.so.5.8 #3 0xb7e0527a in Perl_runops_standard () from /usr/lib/libperl.so.5.8 #4 0xb7da7038 in Perl_get_cv () from /usr/lib/libperl.so.5.8 #5 0xb7daabea in Perl_call_sv () from /usr/lib/libperl.so.5.8 #6 0x08076dd8 in modperl_callback () #7 0x0807716e in modperl_callback_run_handlers () #8 0x080775f7 in modperl_callback_per_dir () #9 0x08072540 in modperl_response_handler_run () #10 0x08072795 in modperl_response_handler_cgi () #11 0x080ce92f in ap_run_handler () #12 0x080cf0be in ap_invoke_handler () #13 0x080b7ea9 in ap_process_request () #14 0x080b1d06 in ap_process_http_connection () #15 0x080dc518 in ap_run_process_connection () #16 0x080dc911 in ap_process_connection () #17 0x080ccef0 in child_main () #18 0x080cd0b8 in make_child () #19 0x080cd340 in perform_idle_server_maintenance () #20 0x080cd833 in ap_mpm_run () #21 0x080d5098 in main () Server ID: Apache/2.0.54 (Unix) mod_ssl/2.0.54 OpenSSL/0.9.7e mod_perl/2.0.1 Perl/v5.8.7
Re: [MP2] mod_perl 2.0 seg faulting..
Justin Wheeler wrote: > Oh, wait .. it gets better. > > I fixed my previous problem, but have a new one. Sorry to hear that. > If I put my system under heavy load, I start seeing these in my log files: > > [Tue Aug 09 15:46:05 2005] [error] lookup of 'Main::session_check' failed > > session_check is sometimes another handler in the list of handlers > (dbconnect, sendpage, etc.) > > Followed up by: > > [Tue Aug 09 15:46:06 2005] [notice] child pid 3044 exit signal > Segmentation fault (11) > > A backtrace returns: Could possibly try and rebuild with debugging and post a more detailled backtrace ? http://perl.apache.org/docs/2.0/devel/debug/c.html#Analyzing_Dumped_Core_Files Also, it would be usefull if you used the instructions found here: http://perl.apache.org/docs/2.0/user/help/help.html#Problem_Description To submit a more complete bugreport that includes more information about the configuration you are runnign under. > #0 0x08078432 in modperl_handler_perl_get_handlers () > #1 0xb7a4b58a in XS_Apache2__RequestRec_get_handlers () from > /usr/local/lib/perl/5.8.4/auto/Apache2/RequestUtil/RequestUtil.so Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5 http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5 signature.asc Description: OpenPGP digital signature
RE: Apache::DBI patches
> I'll attempt take a look at this sometime this week. At first glance I > think I have some questions about it. I'll get back to you after more > thorough investigation. > > Please CC the modperl@perl.apache.org list as I'm not technically the > maintainer, Ask still is, and its supposed to a community maintained module. > > Thanks for the work and repeated effort. > > P.S. >I CC'ed the list. > Thanks, Philip. I think I mangled the patch a bit around line 110 ("if(!$Rollback{$Idx} and $needCleanup and Apache->can('push_handlers'))"). I'll post a fixed version to the list. Joe
Re: Apache::DBI patches
Joe Thomas wrote: I'll attempt take a look at this sometime this week. At first glance I think I have some questions about it. I'll get back to you after more thorough investigation. Please CC the modperl@perl.apache.org list as I'm not technically the maintainer, Ask still is, and its supposed to a community maintained module. Thanks for the work and repeated effort. P.S. I CC'ed the list. Thanks, Philip. I think I mangled the patch a bit around line 110 ("if(!$Rollback{$Idx} and $needCleanup and Apache->can('push_handlers'))"). I'll post a fixed version to the list. While you're at it, can you post 2 separate ones instead of 1. Thanks. -- END - What doesn't kill us can only make us stronger. Nothing is impossible. Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198 Consultant / http://p6m7g8.net/Resume/resume.shtml Senior Developer / Liquidity Services, Inc. http://www.liquidityservicesinc.com http://www.liquidation.com http://www.uksurplus.com http://www.govliquidation.com http://www.gowholesale.com
RE: Apache::DBI patches
> While you're at it, can you post 2 separate ones instead of 1. Here's the first patch. It moves $Idx from being a file-scoped variable to connect() scope. The cleanup handler is then passed a closure containing $Idx: $s->push_handlers("PerlCleanupHandler", sub { cleanup($Idx) }); or Apache->push_handlers("PerlCleanupHandler", sub { cleanup($Idx) }); This makes the cleanup handler work correctly with scripts that use more than one database handle. Without it, the second DBI->connect call will overwrite the initial value of $Idx, so the first handle will never get properly cleaned up. Joe 0.99-joet.patch Description: 0.99-joet.patch
[Fwd: ApacheCon US 2005 CFP slightly extended]
You've got an extra couple of days to put in a talk, so let's get some more mod_perl talks in there! ApacheCon is a great conference to speak at and I know that many of you have stories worth telling but haven't stepped up yet. This is your chance. - Perrin --- Begin Message --- Since folks are always rushing to get their talks in at the last minute, we've extended the CFP just slightly to allow you to get in under the wire. The new deadline is THURSDAY, AUGUST 11th, 23:59 PACIFIC TIME (USA). Talks received after this time *cannot* be considered, since we will be starting our meeting Friday morning to choose the talks which will be scheduled. Thanks -- Rich, for the ApacheCon Planners http://apachecon.com/ --- End Message ---
RE: Apache::DBI patches
These patches were originally by Patrick Mulvany, and posted to mod_perl in 2003. I've made sure they apply to Apache-DBI-0.99, and are compatible with my re-scoping of $Idx. The ping patch looks obviously correct to me. It makes sure that the database is always pinged on connect() if PingTimeOut is set to 0. Here's the original description of the "reset" patch: patch from Patrick Mulvany July 21, 2003 - Fixed issues relating to changing handle state post connection. Handles now returned in same state as original and incomplete transactions rolled back before re-issuing handle so begin_work should now be safe. "Patrick Mulvany" <[EMAIL PROTECTED]> Joe 0.99-patrick-reset.patch Description: 0.99-patrick-reset.patch 0.99-patrick-ping.patch Description: 0.99-patrick-ping.patch
Re: [MP2] mod_perl 2.0 seg faulting..
Here is the backtrace with debugging enabled: #0 0x0807be3f in modperl_handler_perl_get_handlers (my_perl=0x834edb0, handp=0x8137370, p=0x837f3d8) at modperl_handler.c:579 #1 0xb7a4658a in XS_Apache2__RequestRec_get_handlers () from /opt/lib/perl/5.8.4//auto/Apache2/RequestUtil/RequestUtil.so #2 0xb7e0ceba in Perl_pp_entersub () from /usr/lib/libperl.so.5.8 #3 0xb7e0527a in Perl_runops_standard () from /usr/lib/libperl.so.5.8 #4 0xb7da7038 in Perl_get_cv () from /usr/lib/libperl.so.5.8 #5 0xb7daabea in Perl_call_sv () from /usr/lib/libperl.so.5.8 #6 0x08079b34 in modperl_callback (my_perl=0x834edb0, handler=0x81a8a90, p=0x837f3d8, r=0x837f410, s=0x816ea20, args=0x85995a0) at modperl_callback.c:100 #7 0x0807a392 in modperl_callback_run_handlers (idx=6, type=4, r=0x837f410, c=0x0, s=0x816ea20, pconf=0x0, plog=0x0, ptemp=0x0, run_mode=MP_HOOK_RUN_FIRST) at modperl_callback.c:261 #8 0x0807a7ea in modperl_callback_per_dir (idx=6, r=0x837f410, run_mode=MP_HOOK_RUN_FIRST) at modperl_callback.c:368 #9 0x080734f2 in modperl_response_handler_run (r=0x837f410, finish=0) at mod_perl.c:979 #10 0x08073852 in modperl_response_handler_cgi (r=0x837f410) at mod_perl.c:1074 #11 0x080d8583 in ap_run_handler () #12 0x080d8cbc in ap_invoke_handler () #13 0x080c2a67 in ap_process_request () #14 0x080bc89e in ap_process_http_connection () #15 0x080e54fd in ap_run_process_connection () #16 0x080e58c8 in ap_process_connection () #17 0x080d6e8c in child_main () #18 0x080d6f67 in make_child () #19 0x080d7079 in startup_children () #20 0x080d7477 in ap_mpm_run () #21 0x080de169 in main () Justin Philippe M. Chiasson wrote: Justin Wheeler wrote: Oh, wait .. it gets better. I fixed my previous problem, but have a new one. Sorry to hear that. If I put my system under heavy load, I start seeing these in my log files: [Tue Aug 09 15:46:05 2005] [error] lookup of 'Main::session_check' failed session_check is sometimes another handler in the list of handlers (dbconnect, sendpage, etc.) Followed up by: [Tue Aug 09 15:46:06 2005] [notice] child pid 3044 exit signal Segmentation fault (11) A backtrace returns: Could possibly try and rebuild with debugging and post a more detailled backtrace ? http://perl.apache.org/docs/2.0/devel/debug/c.html#Analyzing_Dumped_Core_Files Also, it would be usefull if you used the instructions found here: http://perl.apache.org/docs/2.0/user/help/help.html#Problem_Description To submit a more complete bugreport that includes more information about the configuration you are runnign under. #0 0x08078432 in modperl_handler_perl_get_handlers () #1 0xb7a4b58a in XS_Apache2__RequestRec_get_handlers () from /usr/local/lib/perl/5.8.4/auto/Apache2/RequestUtil/RequestUtil.so Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5 http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
Re: Apache::DBI patches
Hi, I agree with all 3 patches. Thanks for splitting them out. That made my life so much easier. HTH -- The URL http://people.apache.org/~pgollucci/CPAN/Apache-DBI/Apache-DBI-0.100.tar.gz has entered CPAN as file: $CPAN/authors/id/P/PG/PGOLLUCCI/Apache-DBI-0.100.tar.gz size: 31562 bytes md5: dc271d79f7d82508b1232eaac6a1fa53 No action is required on your part Request entered by: PGOLLUCCI (Philip M. Gollucci) Request entered on: Wed, 10 Aug 2005 05:07:30 GMT Request completed: Wed, 10 Aug 2005 05:08:47 GMT Thanks, -- Changes: 0.100 08/10/2005 - Move $Idx from a file-scoped variable to a connect() scoped variable, which gets passed to other subroutines as needed. This will ensure that the cleanup/rollback feature will work properly when a script uses more than one database handle to the same database. [Joe Thomas <[EMAIL PROTECTED]>] - Fixed issues relating to changing handle state post connection. Handles now returned in same state as original and incomplete transactions rolled back before re-issuing handle so. Submited by: [Joe Thomas <[EMAIL PROTECTED]>] Contributed by: [Patrick Mulvany <[EMAIL PROTECTED]>] - Fix a () bug in the connect() determining whether we must ping the database. PingTimeOut = 0 now works as documented. Submited by: [Joe Thomas <[EMAIL PROTECTED]>] Contributed by: [Patrick Mulvany <[EMAIL PROTECTED]>] -- END What doesn't kill us can only make us stronger. Nothing is impossible. Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198 Consultant / http://p6m7g8.net/Resume/ Senior Developer / Liquidity Services, Inc. http://www.liquidityservicesinc.com http://www.liquidation.com http://www.uksurplus.com http://www.govliquidation.com http://www.gowholesale.com