Re: Problem installing Apache::Request
Corey Holzer wrote: I got this email address from the README file in libapreq-1.0.tar.gz and I desperately need help to fix a problem that I am having when I try to install Apache::Request. I have sucessfully installed all the mod_perl components, but, every time I try to install Apache::Request I get the following error: apache_request.h:5:19: httpd.h: No such file or directory apache_request.h:6:25: http_config.h: No such file or directory apache_request.h:7:23: http_core.h: No such file or directory apache_request.h:8:22: http_log.h: No such file or directory apache_request.h:8:22: http_log.h: No such file or directory apache_request.h:9:23: http_main.h: No such file or directory apache_request.h:10:27: http_protocol.h: No such file or directory apache_request.h:11:25: util_script.h: No such file or directory apache_request.h:9:23: http_main.h: No such file or directory apache_request.h:10:27: http_protocol.h: No such file or directory apache_request.h:11:25: util_script.h: No such file or directory Reading docs usually helps: % more INSTALL -- To install the Perl and C libraries, simply run: perl Makefile.PL make install The libapreq.a and header files will be installed in the Perl architecture dependent library. See the Apache::libapreq module for routines that can be called by your application Makefile to find the include and linker arguments. To build libapreq without the Makefile.PL, run: ./configure [--with-apache-includes=DIR] make -- so did you try: ./configure --with-apache-includes=/wherever/your/apache/include/dir is make I apologize if you did read the doc ;). In that case you should have told us what have you done and not just post the errors without any context. And the Module will not install. Any help that you may provide would be greatly appreciated. If you are not the correct person to contact can you let me know who I would need to speak with to get this resolved. Thanks. _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Apache::DB patch
On Tue, 05 Mar 2002 10:00:56 +0800 Stas Bekman [EMAIL PROTECTED] wrote: Enrico Sorcinelli wrote: On Fri, 01 Mar 2002 11:16:15 +0800 Stas Bekman [EMAIL PROTECTED] wrote: Enrico Sorcinelli wrote: Hi all, I started to use Apache::DB (0.06) to interactively debug under mod_perl using ptkdb. I see that is necessary to modify Apache/DB.pm but, after this, the debugger will be run always under ptkdb. The little patch I propose to Apache/DB.pm is to improve Apache to dinamically switch from command line to GUI (ptkdb) interface by configuring this in httpd.conf. Hi Enrico, Does it actually work for you? My previous experience with it wasn't so good. I was manually loading Devel/ptkdb.pm instead of Apache/perl5db.pl and it'll work for the first request, but then will hang. I see that ptkdb hasn't changed since the last time I've tried it. May be it's a newer perlTk that works better now? Dear Stas, I know the hang problem (I've started to hack the ptkdb code but it is enough complex...) However I find the GUI debugger useful. My TEMPORARY workaround is: 1) Initially (and if possible) I've used a brutal 'kill 9 $$' code in cleanup handler if (ref $r) { $SIG{INT} = \DB::catch; $r-register_cleanup(sub { $SIG{INT} = \DB::ApacheSIGINT(); kill 9, $$ if $ptkdb; }); } Yup, tried that, but I didn't like that approach. I agree with you, was only a drastic and immediate solution! then now 2) I use the ptkdb 'File' menu command Close Window and Run (but I've added this in the button bar) instead of Run. In this case at the end of code, the debugger won't hang and the window will closed. Note that if there are breakpoint, the window will be closed and re-opened and all breakpoint are maintained (it is more convenient to use 'Close Window and Run' only after last breakpoint). Cool! Any chance you can submit a patch to the author of ptkdb so we can all benefit from this trick? CC'ing mod_perl list will be useful too. I've attached the patch to this e-mail. Also I will submit to the author asap. Note: the patch only add a short cut for Close Window and Run as Run and Exit in main button bar (type 'patch -p0 Devel-ptkdb-1.1074-patch' in the same dir of Devel/ptkdb.pm) I wish someone with perl/Tk knowledge could solve the hanging problem. I wish me too! After a brief ptkdb.pm code analysis, I've seen that the debugger seems to hang, after last 'Run' command, in Tk::DoOneEvent(0) call (main_loop sub, line 2922). Yours Enrico = Enrico Sorcinelli - Gruppo E-Comm - Italia On Line S.p.a. E-Mail: [EMAIL PROTECTED] - [EMAIL PROTECTED] = Devel-ptkdb-1.1074-patch Description: Binary data
Apache-AuthenNTLM-0.14 for ssl VirtualHost
hi we are using AuthenNTLM from G. Richter to authenticate our intranet users ... works fine for http-server. unfortunately it doesnt work with ssl aware virtual hosts. Server Version: Apache/1.3.23 (Unix) mod_perl/1.26 mod_ssl/2.8.7 OpenSSL/0.9.6c client hangs :-( last entries in error.log AuthenNTLM: nonce=0Dvg'î AuthenNTLM: Send header: NTLM TlRMTVNTUAACACgBggAAMER2ImcPke4AAA== httpd.conf Directory /webdata/apache/server-443/ PerlSetVar defaultdomain PerlSetVar basicauthoritative on PerlSetVar ntlmdebug 1 PerlAddVar ntdomain pp bb PerlAuthenHandler Apache::AuthenNTLM AuthName Private Domain AuthType ntlm,basic # require user \x /Directory something wrong with our config? works somewhere with ssl servers ? kind regards juerg umhang o | /\_| Juerg UmhangWebergutstrasse 12 / | Informatik Post CH-3030 Bern /\ | IT2 IE-NAS Switzerland /_/_ | Tel: ++41 31 338 1473 | Mailto:[EMAIL PROTECTED] Fax: ++41 31 338 7492
Re: Apache-AuthenNTLM-0.14 for ssl VirtualHost
Hi, NTLM needs KeepAlives turned on, because the handshake must take place on the same connection, I guess you have turned KeepAlive off for your ssl connection Gerald - Gerald Richterecos electronic communication services gmbh Internetconnect * Webserver/-design/-datenbanken * Consulting Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131 WWW:http://www.ecos.de Fax: +49 6133 925152 - - Original Message - From: Umhang Juerg, IT2 [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 05, 2002 12:46 PM Subject: Apache-AuthenNTLM-0.14 for ssl VirtualHost hi we are using AuthenNTLM from G. Richter to authenticate our intranet users ... works fine for http-server. unfortunately it doesnt work with ssl aware virtual hosts. Server Version: Apache/1.3.23 (Unix) mod_perl/1.26 mod_ssl/2.8.7 OpenSSL/0.9.6c client hangs :-( last entries in error.log AuthenNTLM: nonce=0Dvg'î AuthenNTLM: Send header: NTLM TlRMTVNTUAACACgBggAAMER2ImcPke4AAA== httpd.conf Directory /webdata/apache/server-443/ PerlSetVar defaultdomain PerlSetVar basicauthoritative on PerlSetVar ntlmdebug 1 PerlAddVar ntdomain pp bb PerlAuthenHandler Apache::AuthenNTLM AuthName Private Domain AuthType ntlm,basic # require user \x /Directory something wrong with our config? works somewhere with ssl servers ? kind regards juerg umhang o | /\_| Juerg UmhangWebergutstrasse 12 / | Informatik Post CH-3030 Bern /\ | IT2 IE-NAS Switzerland /_/_ | Tel: ++41 31 338 1473 | Mailto:[EMAIL PROTECTED] Fax: ++41 31 338 7492
Re: Apache::MP3 requires PerlSetupEnv on, patch to convert toApache::Request
On Mon, 4 Mar 2002, Stas Bekman wrote: [] Can CGIpm detect that 'PerlSetupEnv Off' is in effect and die if that's the case? for example by testing some env var that most likely should be set with 'PerlSetupEnv On'? eg: For now I have added that check to Apache::MP3 (with warn instead of die If it goes into CGIpm it shouldn't be with die, you might want to use CGIpm but not any of the functions that are using %ENV) - ask -- ask bjoern hansen, http://asknetceteradk/ !try; do(); more than a billion impressions per week, http://valueclickcom
RE: Apache-AuthenNTLM-0.14 for ssl VirtualHost
hi it works !! best service both east and west of redmond :-)) merci juerg umhang o | /\_| Juerg UmhangWebergutstrasse 12 / | Informatik Post CH-3030 Bern /\ | IT2 IE-NAS Switzerland /_/_ | Tel: ++41 31 338 1473 | Mailto:[EMAIL PROTECTED] Fax: ++41 31 338 7492 -Original Message- From: Gerald Richter [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 1:56 PM To: Umhang Juerg, IT2; [EMAIL PROTECTED] Subject: Re: Apache-AuthenNTLM-0.14 for ssl VirtualHost Hi, NTLM needs KeepAlives turned on, because the handshake must take place on the same connection, I guess you have turned KeepAlive off for your ssl connection Gerald - Gerald Richterecos electronic communication services gmbh Internetconnect * Webserver/-design/-datenbanken * Consulting Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131 WWW:http://www.ecos.de Fax: +49 6133 925152 - - Original Message - From: Umhang Juerg, IT2 [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 05, 2002 12:46 PM Subject: Apache-AuthenNTLM-0.14 for ssl VirtualHost hi we are using AuthenNTLM from G. Richter to authenticate our intranet users ... works fine for http-server. unfortunately it doesnt work with ssl aware virtual hosts. Server Version: Apache/1.3.23 (Unix) mod_perl/1.26 mod_ssl/2.8.7 OpenSSL/0.9.6c client hangs :-( last entries in error.log AuthenNTLM: nonce=0Dvg'î AuthenNTLM: Send header: NTLM TlRMTVNTUAACACgBggAAMER2ImcPke4AAA== httpd.conf Directory /webdata/apache/server-443/ PerlSetVar defaultdomain PerlSetVar basicauthoritative on PerlSetVar ntlmdebug 1 PerlAddVar ntdomain pp bb PerlAuthenHandler Apache::AuthenNTLM AuthName Private Domain AuthType ntlm,basic # require user \x /Directory something wrong with our config? works somewhere with ssl servers ? kind regards juerg umhang o | /\_| Juerg UmhangWebergutstrasse 12 / | Informatik Post CH-3030 Bern /\ | IT2 IE-NAS Switzerland /_/_ | Tel: ++41 31 338 1473 | Mailto:[EMAIL PROTECTED] Fax: ++41 31 338 7492
Re: problems with $r-status('OK')
You don't want to do that... You want to do this: use Apache::Constants qw(:common); and then $r-status(OK); # (no quotes) Issac - Original Message - From: clayton cottingham [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 04, 2002 6:47 PM Subject: problems with $r-status('OK') hello: im using Apache/1.3.12 and mod_perl/1.24 every time i use the $r-status('OK'); it gives me this error Argument OK isn't numeric in subroutine entry has anyone come accross this before? thanks
Re: RegistryLoader Segmentation fault
Fran Fabrizio wrote: Hello, I'm trying to follow the script in section 214 of the book mod_perl Developer's Cookbook in order to pre-load my Apache::registry scripts using Apache::RegistryLoader I'm getting a seg fault when I attempt to start apache This was the problem I was having last Friday Just wanted to post the results - the upgrade to Perl 561 solved the problem PERL_DEBUG=1 on mod_perl compilation was also very helpful Thanks to everyone for their help! -Fran
Fwd: Re: Problem installing Apache::Request
Here is what I did after reading your email: 1. Redownloaded the source tar ball for the version of Apache that I am running on my Linux RH 7.2 box. 2. untar'ed the source tar ball for apache. 3. Executed ./configure --with-apache-includes=the /src/includes directory under the source dir for apache. Now I get the following error: Making all in c make[1]: Entering directory `/home/user/libapreq-1.0/c' /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -I/home/user/apache_1.3.22/src/include/-g -O2 -c apache_cookie.c mkdir .libs gcc -DHAVE_CONFIG_H -I. -I. -I. -I/home/user/apache_1.3.22/src/include/ -g -O2 -Wp,-MD,.deps/apache_cookie.pp -c -fPIC -DPIC apache_cookie.c -o .libs/apache_cookie.lo In file included from /home/user/apache_1.3.22/src/include/httpd.h:72, from apache_request.h:5, from apache_cookie.h:4, from apache_cookie.c:59: /home/user/apache_1.3.22/src/include/ap_config.h:77:28: ap_config_auto.h: No such file or directory In file included from /home/user/apache_1.3.22/src/include/httpd.h:72, from apache_request.h:5, from apache_cookie.h:4, from apache_cookie.c:59: /home/user/apache_1.3.22/src/include/ap_config.h:114:16: os.h: No such file or directory make[1]: *** [apache_cookie.lo] Error 1 make[1]: Leaving directory `/home/user/libapreq-1.0/c' make: *** [all-recursive] Error 1 4. Make install fail as well. Any suggestions? Original Message Follows From: Stas Bekman [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: Problem installing Apache::Request Date: Tue, 05 Mar 2002 18:14:55 +0800 Corey Holzer wrote: I got this email address from the README file in libapreq-1.0.tar.gz and I desperately need help to fix a problem that I am having when I try to install Apache::Request. I have sucessfully installed all the mod_perl components, but, every time I try to install Apache::Request I get the following error: apache_request.h:5:19: httpd.h: No such file or directory apache_request.h:6:25: http_config.h: No such file or directory apache_request.h:7:23: http_core.h: No such file or directory apache_request.h:8:22: http_log.h: No such file or directory apache_request.h:8:22: http_log.h: No such file or directory apache_request.h:9:23: http_main.h: No such file or directory apache_request.h:10:27: http_protocol.h: No such file or directory apache_request.h:11:25: util_script.h: No such file or directory apache_request.h:9:23: http_main.h: No such file or directory apache_request.h:10:27: http_protocol.h: No such file or directory apache_request.h:11:25: util_script.h: No such file or directory Reading docs usually helps: % more INSTALL -- To install the Perl and C libraries, simply run: perl Makefile.PL make install The libapreq.a and header files will be installed in the Perl architecture dependent library. See the Apache::libapreq module for routines that can be called by your application Makefile to find the include and linker arguments. To build libapreq without the Makefile.PL, run: ./configure [--with-apache-includes=DIR] make -- so did you try: ./configure --with-apache-includes=/wherever/your/apache/include/dir is make I apologize if you did read the doc ;). In that case you should have told us what have you done and not just post the errors without any context. And the Module will not install. Any help that you may provide would be greatly appreciated. If you are not the correct person to contact can you let me know who I would need to speak with to get this resolved. Thanks. _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/ _ Send and receive Hotmail on your mobile device: http://mobile.msn.com _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp;
Re: Fwd: Re: Problem installing Apache::Request
Corey Holzer wrote: 1 Redownloaded the source tar ball for the version of Apache that I am running on my Linux RH 72 box 2 untar'ed the source tar ball for apache 3 Executed /configure --with-apache-includes=the /src/includes directory under the source dir for apache Between 2 and 3 you might have to actually build apache, or at least run its configuration scipt It probably needs to set up OS-dependent files - Perrin
Multiple Location directives question
I have something like: Location /foo SetHandler perl-script PerlHandler My::Foo /Location Location / SetHandler perl-script PerlHandler My::Bar AuthName Bar AuthType Basic PerlAuthenHandler My::Auth::Bar PerlAuthzHandler My::Authz::Bar require valid-user /Location What I want is for My::Foo to handle all URLs that start with /foo, without any authentication of any kind Then I want the remaining URLs to be handled by My::Bar using its authentication handlers What I get is that My::Bar handles everything Changing the order of the Location directives doesn't seem to help The Apache docs say that Location directives are done simultaneously, whatever that means So, any pointers? -John
Re: Multiple Location directives question
John Siracusa wrote: I have something like: Location /foo SetHandler perl-script PerlHandler My::Foo /Location Location / SetHandler perl-script PerlHandler My::Bar AuthName Bar AuthType Basic PerlAuthenHandler My::Auth::Bar PerlAuthzHandler My::Authz::Bar require valid-user /Location What I want is for My::Foo to handle all URLs that start with /foo, without any authentication of any kind Then I want the remaining URLs to be handled by My::Bar using its authentication handlers What I get is that My::Bar handles everything Changing the order of the Location directives doesn't seem to help The Apache docs say that Location directives are done simultaneously, whatever that means this may be one of those cases where / is handled as a special case as I've said before, it seems people who set up / seem to get into trouble, but I never have a clear picture as to why (other than this nagging feeling, like a splinter in my mind) you might want to set up /foo and /bar then use mod_rewrite or something to map !/foo to /bar HTH --Geoff
Re: Apache::DB patch
Enrico Sorcinelli wrote: 2) I use the ptkdb 'File' menu command Close Window and Run (but I've added this in the button bar) instead of Run. In this case at the end of code, the debugger won't hang and the window will closed. Note that if there are breakpoint, the window will be closed and re-opened and all breakpoint are maintained (it is more convenient to use 'Close Window and Run' only after last breakpoint). Cool! Any chance you can submit a patch to the author of ptkdb so we can all benefit from this trick? CC'ing mod_perl list will be useful too. I've attached the patch to this e-mail. Also I will submit to the author asap. Note: the patch only add a short cut for Close Window and Run as Run and Exit in main button bar (type 'patch -p0 Devel-ptkdb-1.1074-patch' in the same dir of Devel/ptkdb.pm) Thanks Enrico! Can you please email me/list the outcome of this submission to the author of ptkdb. If nothing happens I'll simply include the patch in the guide, but I really hope that the module gets fixed. I wish someone with perl/Tk knowledge could solve the hanging problem. I wish me too! After a brief ptkdb.pm code analysis, I've seen that the debugger seems to hang, after last 'Run' command, in Tk::DoOneEvent(0) call (main_loop sub, line 2922). Any mod_perl/Tk gurus to look at the problem? _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Multiple Location directives question
On 3/5/02 11:58 AM, Geoffrey Young wrote: you might want to set up /foo and /bar then use mod_rewrite or something to map !/foo to /bar Ug, there has to be another way :-/ -John
Re: Multiple Location directives question
Geoffrey Young wrote: John Siracusa wrote: I have something like: Location /foo SetHandler perl-script PerlHandler My::Foo /Location Location / SetHandler perl-script PerlHandler My::Bar AuthName Bar AuthType Basic PerlAuthenHandler My::Auth::Bar PerlAuthzHandler My::Authz::Bar require valid-user /Location What I want is for My::Foo to handle all URLs that start with /foo, without any authentication of any kind Then I want the remaining URLs to be handled by My::Bar using its authentication handlers Seems like it should work to me this may be one of those cases where / is handled as a special case Or maybe it's because there is no actual document there? Maybe installing a transhandler would help PerlTransHandler Apache::OK But this is just a stab in the dark really - Perrin
RE: Multiple Location directives question
Answering my own question, I stupidly forgot that I had a TransHandler up above mucking my URLs before the Location directives got a chance to try to match So my /foo location block was never seeing a /foo URL Still, I'm glad to see that the old system of post to a public list and then immediately find your dumb error still works like a charm :) Well, my response has just left the building, and the only thing I can think of right now (about my hasty response) is something I once saw on FidoNet: Open mouth, insert foot, echo internationally sigh L8r, Rob #!/usr/bin/perl -w use Disclaimer qw/:standard/;
Re: documentation for mod_auth_mysql
GB == Grant Babb [EMAIL PROTECTED] writes: GB i am having no luck locating the documentation for GB mod_auth_mysql. any help would be greatly appreciated. thanks in GB advance- grant mod_auth_mysql is not implemented in mod_perl, so I'm not sure why you ask here. anyway, my version of mod_auth_mysql is self-documented within the source file. there are some more instructions at ftp://ftp.kcilink.com/pub -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Vivek Khera, Ph.D.Khera Communications, Inc. Internet: [EMAIL PROTECTED] Rockville, MD +1-240-453-8497 AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/
here is a good modperl question on perlmonk
thought someone might like to have a gander at this: http://perlmonksorg/?node_id=146303 look forward to seeing your replies!!
Breaks in mod_perl, works in Perl
I am hoping there is a someone brilliant on this list that can help me. A little while ago, I posted to clp.perl asking how I can capture the trace output from DBI into a variable. Since DBI is an external process, I couldn't do it just by piping STDERR. Benjamin Goldberg came up with a module called IO::Capture (see below). It works amazingly well in standard Perl. Here is a sample script: use IO::Capture; $capturer = IO::Capture-new(\*STDERR); use DBI; $dbh = DBI-connect (DBI:mysql:test:localhost, username, password, { RaiseError = 0, PrintError = 0 }); DBI-trace( 1 ); $sth = $dbh-prepare (qq{ CREATE TABLE IF NOT EXISTS test_table ( a CHAR(15) NOT NULL, b INT UNSIGNED NOT NULL ) }); $sth-execute (); $sth-finish (); $dbh-disconnect (); $text = $capturer-capture; print qq{ Output is: $text }; The problem is that once I try this script through mod_perl, it hangs the child process infinitely. And then on subsequent requests, it has to create a new process. This eventually results in the whole machine spiraling down because hundreds of Apache children are hung. What I am hoping is that someone will spot something that neither Ben nor I have been able to spot. The module appears after my name. Thanks for any help you can provide. Mark package IO::Capture; use strict; use warnings; use Symbol qw(gensym); sub new { (my ($class, $filehandle) = _) == 2 or croak(Usage: IO::Capture-new(\$filehandle)); if( ref $filehandle or ref \$filehandle eq GLOB ) { $filehandle = \*$filehandle; # this is a sort of typecast. } else { $filehandle = caller() . :: . $filehandle unless $filehandle =~ /::/ or $filehandle =~ /^STD(?:IN|OUT|ERR)\z/; no strict 'refs'; $filehandle = \*$filehandle; } defined(fileno $filehandle) or croak(Argument to IO::Capture-new has no fileno()); my $save = gensym; open $save, .fileno($filehandle) or die sprintf(Couldn't dup2(%s,%s): $!\n, fileno($save),fileno($filehandle)); my ($getresponse, $sendresponse) = (gensym, gensym); pipe($getresponse, $sendresponse) or die pipe: $!; my ($readnew, $writenew) = (gensym, gensym); pipe($readnew, $writenew) or die pipe: $!; open( $filehandle, . fileno($writenew) ) or die sprintf(Couldn't dup2(%s,%s): $!\n, fileno($filehandle),fileno($writenew)); close($writenew); defined( my $pid = fork ) or do { my $err = $!; unless( open $filehandle, .fileno $save ) { my $err2 = $!; open STDERR, $^O =~ /win/i ? con : /dev/tty if $filehandle == \*STDERR; die fork: $err, dup2: $err2; } die fork: $err; }; # readnew, writenew, and sendresponse are automatically closed # when we return here in the parent because they go out of scope, # resulting in their their refcounts going to 0. return bless [$filehandle, $save, $getresponse, $pid], $class if $pid; close($getresponse); # not used, so close it. close($writenew); # MUST close this, or deadlock will occur! # MUST close or re-open $filehandle, or deadlock will occur! $filehandle == \*STDERR and ( open STDERR, .fileno $save or open STDERR, $^O =~ /win/i ? con : /dev/tty ) or close $filehandle; close $save; # not used from here on, so close it. my ($got, $n) = ; 1 while $n = sysread $readnew, $got, 4096, length $got; die sysread: $! unless defined $n; print $sendresponse $got or die print: $!; exit; } sub capture { my $self = shift; my ($fh, $saved, $get, $pid) = splice $self, 0; unless( open $fh, . fileno $saved ) { open $fh, $^O =~ /win/i ? con : /dev/tty if $fh == \*STDERR; die Couldn't restore filehandle: $!; } else { close $saved } my ($got, $n) = ; while($n = sysread $get, $got, 4096, length $got) {} defined($n) or die sysread: $!; if( waitpid $pid, 0 ) { warn sprintf Child exited with code 0x%04X, $? if $?; } else { warn waitpid: $! } return $got; } # like using autouse.pm but even more lightweight. sub croak { undef croak; require Carp; *croak = \Carp::croak; goto croak; } 1; __END__ perl -MIO::Capture $x = IO::Capture-new(\*STDERR); print now capturing\n; warn qq[captured ok\n]; print captured text 'captured ok' shouldn't have appeard\n; $y = $x-capture; print capture didn't block\n; print $y; warn Restored ok\n; __END__ now capturing captured text 'captured ok' shouldn't have appeard capture didn't block captured ok Restored ok perl -MIO::Capture $x = IO::Capture-new(\*STDERR); print now capturing\n; system(q[perl -e print STDERR qq[captured ok\n]]); print captured text 'captured ok' shouldn't have appeard\n; $y = $x-capture; print capture didn't block\n; print $y; warn Restored ok\n; __END__ now capturing captured text 'captured ok' shouldn't have appeard capture didn't block captured ok Restored ok
Re: Breaks in mod_perl, works in Perl
At 1:14 PM -0700 3/5/02, Mark Hazen wrote: I am hoping there is a someone brilliant on this list that can help me A little while ago, I posted to clpperl asking how I can capture the trace output from DBI into a variable Since DBI is an external process, I couldn't do it just by piping STDERR Benjamin Goldberg came up with a module called IO::Capture (see below) It works amazingly well in standard Perl Here is a sample script: Maybe I'm just crazy but wouldn't this be simpler? use DBI; $dbh = DBI-connect (DBI:mysql:test:localhost, username, password, { RaiseError = 0, PrintError = 0 }); $filename = /tmp/dbi_$$time()rand(1)trace; DBI-trace( 1, $filename ); $sth = $dbh-prepare (qq{ CREATE TABLE IF NOT EXISTS test_table ( a CHAR(15) NOT NULL, b INT UNSIGNED NOT NULL ) }); $sth-execute (); $sth-finish (); $dbh-disconnect (); print qq{ Output is: }; open(FILE,$filename); print while(FILE); close(FILE); The problem with the module listed is that it does some filehandle munging on what is already a munged filehandler Meaning, it looks like a filehandle, but it's really just a hook into something apache is going to use to output stuff to the error log Hope that helps Rob -- When I used a Mac, they laughed because I had no command prompt When I used Linux, they laughed because I had no GUI
RE: Breaks in mod_perl, works in Perl
I'm sorry I didn't explain an important component. Since I am dealing with a few hundred requests per minute (this was got me onto mod_perl to begin with), then using DBI's ability to write to a file would vastly overwhelm my system. Thanks Mark -Original Message- From: Robert Landrum [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 1:25 PM To: Mark Hazen; [EMAIL PROTECTED] Subject: Re: Breaks in mod_perl, works in Perl At 1:14 PM -0700 3/5/02, Mark Hazen wrote: I am hoping there is a someone brilliant on this list that can help me. A little while ago, I posted to clp.perl asking how I can capture the trace output from DBI into a variable. Since DBI is an external process, I couldn't do it just by piping STDERR. Benjamin Goldberg came up with a module called IO::Capture (see below). It works amazingly well in standard Perl. Here is a sample script: Maybe I'm just crazy but wouldn't this be simpler? use DBI; $dbh = DBI-connect (DBI:mysql:test:localhost, username, password, { RaiseError = 0, PrintError = 0 }); $filename = /tmp/dbi_.$$.time().rand(1)..trace; DBI-trace( 1, $filename ); $sth = $dbh-prepare (qq{ CREATE TABLE IF NOT EXISTS test_table ( a CHAR(15) NOT NULL, b INT UNSIGNED NOT NULL ) }); $sth-execute (); $sth-finish (); $dbh-disconnect (); print qq{ Output is: }; open(FILE,$filename); print while(FILE); close(FILE); The problem with the module listed is that it does some filehandle munging on what is already a munged filehandler. Meaning, it looks like a filehandle, but it's really just a hook into something apache is going to use to output stuff to the error log. Hope that helps... Rob -- When I used a Mac, they laughed because I had no command prompt. When I used Linux, they laughed because I had no GUI.
Re: Breaks in mod_perl, works in Perl
I'm not sure if this will work, but you might override DBI's notion of a trace function. If you look in DBI.pm you'll see this line: *trace_msg = \DBD::_::common::trace_msg; It appears that DBI uses the trace_msg function in the bowels of DBD to actually do the printing. Now, you can very likely override this with something else.. Perhaps something like this: use DBI; . my $output; my $oldhandle; sub capture { $output .= join('', @_); } *DBI::trace_msg = \capture; $dbh = . # etc... In an ideal world you could just subclass DBI and redefine the trace message, alas DBI uses this construct quite often: DBI-trace_msg(...) On Tue, Mar 05, 2002 at 01:14:11PM -0700, Mark Hazen wrote: I am hoping there is a someone brilliant on this list that can help me. A little while ago, I posted to clp.perl asking how I can capture the trace output from DBI into a variable. Since DBI is an external process, I couldn't do it just by piping STDERR. Benjamin Goldberg came up with a module called IO::Capture (see below). It works amazingly well in standard Perl. Here is a sample script: use IO::Capture; $capturer = IO::Capture-new(\*STDERR); use DBI; $dbh = DBI-connect (DBI:mysql:test:localhost, username, password, { RaiseError = 0, PrintError = 0 }); DBI-trace( 1 ); $sth = $dbh-prepare (qq{ CREATE TABLE IF NOT EXISTS test_table ( a CHAR(15) NOT NULL, b INT UNSIGNED NOT NULL ) }); $sth-execute (); $sth-finish (); $dbh-disconnect (); $text = $capturer-capture; print qq{ Output is: $text }; The problem is that once I try this script through mod_perl, it hangs the child process infinitely. And then on subsequent requests, it has to create a new process. This eventually results in the whole machine spiraling down because hundreds of Apache children are hung. What I am hoping is that someone will spot something that neither Ben nor I have been able to spot. The module appears after my name. Thanks for any help you can provide. Mark package IO::Capture; use strict; use warnings; use Symbol qw(gensym); sub new { (my ($class, $filehandle) = @_) == 2 or croak(Usage: IO::Capture-new(\$filehandle)); if( ref $filehandle or ref \$filehandle eq GLOB ) { $filehandle = \*$filehandle; # this is a sort of typecast. } else { $filehandle = caller() . :: . $filehandle unless $filehandle =~ /::/ or $filehandle =~ /^STD(?:IN|OUT|ERR)\z/; no strict 'refs'; $filehandle = \*$filehandle; } defined(fileno $filehandle) or croak(Argument to IO::Capture-new has no fileno()); my $save = gensym; open $save, .fileno($filehandle) or die sprintf(Couldn't dup2(%s,%s): $!\n, fileno($save),fileno($filehandle)); my ($getresponse, $sendresponse) = (gensym, gensym); pipe($getresponse, $sendresponse) or die pipe: $!; my ($readnew, $writenew) = (gensym, gensym); pipe($readnew, $writenew) or die pipe: $!; open( $filehandle, . fileno($writenew) ) or die sprintf(Couldn't dup2(%s,%s): $!\n, fileno($filehandle),fileno($writenew)); close($writenew); defined( my $pid = fork ) or do { my $err = $!; unless( open $filehandle, .fileno $save ) { my $err2 = $!; open STDERR, $^O =~ /win/i ? con : /dev/tty if $filehandle == \*STDERR; die fork: $err, dup2: $err2; } die fork: $err; }; # readnew, writenew, and sendresponse are automatically closed # when we return here in the parent because they go out of scope, # resulting in their their refcounts going to 0. return bless [$filehandle, $save, $getresponse, $pid], $class if $pid; close($getresponse); # not used, so close it. close($writenew); # MUST close this, or deadlock will occur! # MUST close or re-open $filehandle, or deadlock will occur! $filehandle == \*STDERR and ( open STDERR, .fileno $save or open STDERR, $^O =~ /win/i ? con : /dev/tty ) or close $filehandle; close $save; # not used from here on, so close it. my ($got, $n) = ; 1 while $n = sysread $readnew, $got, 4096, length $got; die sysread: $! unless defined $n; print $sendresponse $got or die print: $!; exit; } sub capture { my $self = shift; my ($fh, $saved, $get, $pid) = splice @$self, 0; unless( open $fh, . fileno $saved ) { open $fh, $^O =~ /win/i ? con : /dev/tty if $fh == \*STDERR; die Couldn't restore filehandle: $!; } else { close $saved } my ($got, $n) = ; while($n = sysread $get, $got, 4096, length $got) {} defined($n) or die sysread: $!; if( waitpid $pid, 0 ) { warn sprintf Child exited with code 0x%04X, $? if $?; } else { warn waitpid: $! } return $got; } # like using autouse.pm but even more lightweight. sub croak { undef croak; require Carp;
Re: Breaks in mod_perl, works in Perl
Mark Hazen wrote: I'm sorry I didn't explain an important component Since I am dealing with a few hundred requests per minute (this was got me onto mod_perl to begin with), then using DBI's ability to write to a file would vastly overwhelm my system Won't capturing that much data in RAM instantly send your system into swap? Anyway, you can probably get this to work if you can ask DBI to send to a filehandle and then use your magic IO::Capture on that filehandle You just can't use STDERR because it's already magic By the way, at one point we used this DBI trace stuff at eToys It was fairly light on a fast file system like ext2fs The trick to making it really light is to fix it so that only one child process per machine had tracing turned on, which you can do with a little fussing with a pid file and a ChildInitHandler and ChildExitHandler If you just need to see some trace output, you can use this technique On the other hand, your debugging may require seeing trace from every active process in which case this won't help - Perrin
RE: Breaks in mod_perl, works in Perl
At 1:32 PM -0700 3/5/02, Mark Hazen wrote: I'm sorry I didn't explain an important component Since I am dealing with a few hundred requests per minute (this was got me onto mod_perl to begin with), then using DBI's ability to write to a file would vastly overwhelm my system I don't get it You don't mind trying to create tables a few hundred times per minute, but creating a file is too much overhead? And writing to memory is going to really bog the system Maybe you shouldn't be asking why doesn't my capture work, but how can I debug some production code I have Just a thought, Rob -- When I used a Mac, they laughed because I had no command prompt When I used Linux, they laughed because I had no GUI
RE: Breaks in mod_perl, works in Perl
I am sorry for further confusion. I am not creating tables a few hundred times per minute. I simply used a create table call to get some trace output for my sample script. Thinking that users may try the sample script, there was a no way for me to know what tables might exist (that I could select from). So I used a CREATE TABLE. Writing to memory, if done right, shouldn't be a big deal. Having the disk seek that often would flood my IO. Thanks Mark -Original Message- From: Robert Landrum [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 2:14 PM To: Mark Hazen; [EMAIL PROTECTED] Subject: RE: Breaks in mod_perl, works in Perl At 1:32 PM -0700 3/5/02, Mark Hazen wrote: I'm sorry I didn't explain an important component. Since I am dealing with a few hundred requests per minute (this was got me onto mod_perl to begin with), then using DBI's ability to write to a file would vastly overwhelm my system. I don't get it You don't mind trying to create tables a few hundred times per minute, but creating a file is too much overhead? And writing to memory is going to really bog the system. Maybe you shouldn't be asking why doesn't my capture work, but how can I debug some production code I have... Just a thought, Rob -- When I used a Mac, they laughed because I had no command prompt. When I used Linux, they laughed because I had no GUI.
RE: Breaks in mod_perl, works in Perl
Paul, You are onto something here. I used your method, and was able to get the following: DBI - DBI-Apache::DBI::connect(DBI:mysql:db:localhost, username, ) DBI - connect= Apache::DBI::db=HASH(0x842d608) into the variable. But the full trace output is: - DBI-Apache::DBI::connect(DBI:mysql:db:localhost, username, ) - FETCH= 'mysql' ('Name' from cache) at DBI.pm line 64 - ping= 1 at DBI.pm line 112 - STORE('RaiseError' 0 ...)= 1 at DBI.pm line 451 - STORE('PrintError' 0 ...)= 1 at DBI.pm line 451 - STORE('AutoCommit' 1 ...)= 1 at DBI.pm line 451 It also would disappear between requests. In other words, as I reloaded the script, about half the time, the variable would be completely blank, and another half it would be what I mentioned above. Thanks Mark -Original Message- From: Paul Lindner [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 1:41 PM To: Mark Hazen Cc: [EMAIL PROTECTED] Subject: Re: Breaks in mod_perl, works in Perl I'm not sure if this will work, but you might override DBI's notion of a trace function. If you look in DBI.pm you'll see this line: *trace_msg = \DBD::_::common::trace_msg; It appears that DBI uses the trace_msg function in the bowels of DBD to actually do the printing. Now, you can very likely override this with something else.. Perhaps something like this: use DBI; . my $output; my $oldhandle; sub capture { $output .= join('', @_); } *DBI::trace_msg = \capture; $dbh = . # etc... In an ideal world you could just subclass DBI and redefine the trace message, alas DBI uses this construct quite often: DBI-trace_msg(...) On Tue, Mar 05, 2002 at 01:14:11PM -0700, Mark Hazen wrote: I am hoping there is a someone brilliant on this list that can help me. A little while ago, I posted to clp.perl asking how I can capture the trace output from DBI into a variable. Since DBI is an external process, I couldn't do it just by piping STDERR. Benjamin Goldberg came up with a module called IO::Capture (see below). It works amazingly well in standard Perl. Here is a sample script: use IO::Capture; $capturer = IO::Capture-new(\*STDERR); use DBI; $dbh = DBI-connect (DBI:mysql:test:localhost, username, password, { RaiseError = 0, PrintError = 0 }); DBI-trace( 1 ); $sth = $dbh-prepare (qq{ CREATE TABLE IF NOT EXISTS test_table ( a CHAR(15) NOT NULL, b INT UNSIGNED NOT NULL ) }); $sth-execute (); $sth-finish (); $dbh-disconnect (); $text = $capturer-capture; print qq{ Output is: $text }; The problem is that once I try this script through mod_perl, it hangs the child process infinitely. And then on subsequent requests, it has to create a new process. This eventually results in the whole machine spiraling down because hundreds of Apache children are hung. What I am hoping is that someone will spot something that neither Ben nor I have been able to spot. The module appears after my name. Thanks for any help you can provide. Mark package IO::Capture; use strict; use warnings; use Symbol qw(gensym); sub new { (my ($class, $filehandle) = @_) == 2 or croak(Usage: IO::Capture-new(\$filehandle)); if( ref $filehandle or ref \$filehandle eq GLOB ) { $filehandle = \*$filehandle; # this is a sort of typecast. } else { $filehandle = caller() . :: . $filehandle unless $filehandle =~ /::/ or $filehandle =~ /^STD(?:IN|OUT|ERR)\z/; no strict 'refs'; $filehandle = \*$filehandle; } defined(fileno $filehandle) or croak(Argument to IO::Capture-new has no fileno()); my $save = gensym; open $save, .fileno($filehandle) or die sprintf(Couldn't dup2(%s,%s): $!\n, fileno($save),fileno($filehandle)); my ($getresponse, $sendresponse) = (gensym, gensym); pipe($getresponse, $sendresponse) or die pipe: $!; my ($readnew, $writenew) = (gensym, gensym); pipe($readnew, $writenew) or die pipe: $!; open( $filehandle, . fileno($writenew) ) or die sprintf(Couldn't dup2(%s,%s): $!\n, fileno($filehandle),fileno($writenew)); close($writenew); defined( my $pid = fork ) or do { my $err = $!; unless( open $filehandle, .fileno $save ) { my $err2 = $!; open STDERR, $^O =~ /win/i ? con : /dev/tty if $filehandle == \*STDERR; die fork: $err, dup2: $err2; } die fork: $err; }; # readnew, writenew, and sendresponse are automatically closed # when we return here in the parent because they go out of scope, # resulting in their their refcounts going to 0. return bless [$filehandle, $save, $getresponse, $pid], $class if $pid; close($getresponse); # not used, so close it. close($writenew); # MUST close this, or deadlock will occur! # MUST close or re-open $filehandle, or deadlock will occur! $filehandle == \*STDERR and ( open
Re: mod_perl training companies?
On Tue, 5 Mar 2002, Stas Bekman wrote: I'm compiling a list of companies giving mod_perl training for our new mod_perl site Currently I have only: http://traininggbdirectcouk/courses/linux/customized_and_bespokehtml If you know of other companies please send me the URL of the page advertising the mod_perl courses My company, Cooper McGregor does a mod_perl training course Our training page is located at http://coopermcgregorcom/training/ The course outline for the mod_perl course should be put up there today, since, for some reason, the web site guy did not have a copy of it before -- http://wwwCooperMcGregorcom/ Apache Support and Training
Re: here is a good modperl question on perlmonk
Caller wirtes > we've just migrated our 80K line pure perl web application to mod_perl...ah... > so much aster... can anyone advise on their experiences for setting up > apache/mod_perl for team development? up till now, we've all been running > our own copy of sources out of our home directories, and running a separate > apache instance for each developer seems like overkill Source Control or Revision Control will always be there, no matter if you work out of one box or many boxes. Further I don't see anything different about mod_perl vs C++. There are all source codes. My suggestion would be to install a Linux on your developer's PC and keep with the distributed model. Now everyone can use a common web tree and at integeration, bring all of them to a staging box, QC it and ship it to production. Caller can also buy some content management software like Interwoven's TeamSite product that provides a virtual workarea, for about $300,000. Its always Make or Buy. Isn't it. clayton cottingham wrote: thought someone might like to have a gander at this: http://perlmonks.org/?node_id=146303 look forward to seeing your replies!! -- - Medi Montaseri [EMAIL PROTECTED] Unix Distributed Systems Engineer HTTP://www.CyberShell.com CyberShell Engineering -
Re: here is a good modperl question on perlmonk
On Tue, 5 Mar 2002, Medi Montaseri wrote: My suggestion would be to install a Linux on your developer's PC and keep with the distributed model Now everyone can use a common web tree and at integeration, bring all of them to a staging box, QC it and ship it to production Giving everyone their own Apache daemon, which uses their checked out tree of code, on a central dev server is really not a problem either -dave /*== wwwurthorg we await the New Sun ==*/
Re: here is a good modperl question on perlmonk
On Tue, Mar 05, 2002 at 04:53:56PM -0600, Dave Rolsky wrote: On Tue, 5 Mar 2002, Medi Montaseri wrote: My suggestion would be to install a Linux on your developer's PC and keep with the distributed model. Now everyone can use a common web tree and at integeration, bring all of them to a staging box, QC it and ship it to production. Giving everyone their own Apache daemon, which uses their checked out tree of code, on a central dev server is really not a problem either. One other tip... write a small script (or modify apachectl) to start apache with a port number matched to your unix UID. This keeps developers from using clashing port numbers. httpd -c Port $UID -c Listen $UID etc.. -- Paul Lindner[EMAIL PROTECTED] | | | | | | | | | | mod_perl Developer's Cookbook http://www.modperlcookbook.org/ Human Rights Declaration http://www.unhchr.ch/udhr/index.htm
Re: here is a good modperl question on perlmonk
Medi Montaseri wrote: Caller can also buy some content management software like Interwoven's TeamSite product that provides a virtual workarea, for about $300,000 It's so easy and effective to run mod_perl on developers' personal machines, I think there's no excuse not to do it At eToys we also set up a special server for HTML template coders to work on It had a virtual host for each coder, and each of them used their own docroot which they synched with a shared CVS repository using WinCVS They accessed files over a Samba share, so it was seamless for them This was pretty effective, and provided almost exactly the same thing that Interwoven sells Interwoven does add some workflow tools, but most people I've talked to don't seem to use them Maybe if they did get used that would provide more value - Perrin
Re: here is a good modperl question on perlmonk
On Wed, 6 Mar 2002, Gunther Birznieks wrote: Philippe Chiasson had a really nice talk on setting up developer teams on mod_perl at ApacheCon 2001. Covers everything from CVS to deployment. You may want to see if you can get the slides from him ([EMAIL PROTECTED]) if you are interested in the details. http://gozer.ectoplasm.org/Conferences/ApacheCon2001US/DevEnv/handouts/rel_html/ Bye, Valerio
Re: here is a good modperl question on perlmonk
Greetings, Depending on the number of developers and how often they change, virtual hosts are good. Set up a sub-domain for each developer, ie jim.my-company.co.nz. Then they can configure there local setup to there hearts content, seperate CVS/document tree, also get separate logs. Cheers On Wed, 2002-03-06 at 12:02, Gunther Birznieks wrote: Philippe Chiasson had a really nice talk on setting up developer teams on mod_perl at ApacheCon 2001. Covers everything from CVS to deployment. You may want to see if you can get the slides from him ([EMAIL PROTECTED]) if you are interested in the details. Later, Gunther At 07:43 AM 3/6/2002, Medi Montaseri wrote: Caller wirtes we've just migrated our 80K line pure perl web application to mod_perl...ah... so much aster... can anyone advise on their experiences for setting up apache/mod_perl for team development? up till now, we've all been running our own copy of sources out of our home directories, and running a separate apache instance for each developer seems like overkill Source Control or Revision Control will always be there, no matter if you work out of one box or many boxes. Further I don't see anything different about mod_perl vs C++. There are all source codes. My suggestion would be to install a Linux on your developer's PC and keep with the distributed model. Now everyone can use a common web tree and at integeration, bring all of them to a staging box, QC it and ship it to production. Caller can also buy some content management software like Interwoven's TeamSite product that provides a virtual workarea, for about $300,000. Its always Make or Buy. Isn't it. clayton cottingham wrote: thought someone might like to have a gander at this: http://perlmonks.org/?node_id=146303http://perlmonks.org/?node_id=146303 look forward to seeing your replies!! -- - Medi Montaseri [EMAIL PROTECTED] Unix Distributed Systems EngineerHTTP://www.CyberShell.comHTTP://www.CyberShell.com CyberShell Engineering - __ Gunther Birznieks ([EMAIL PROTECTED]) eXtropia - The Open Web Technology Company http://www.eXtropia.com/
Re: here is a good modperl question on perlmonk
True...but I'm thinking full control to the developer. Developer can now mis-configure httpd.conf as much as he/she wants and all the paths; virtual or not are consistant, instead of a dev path vs production path I had a chance to work with Interwoven TeamSite and this very issue or virtual path was a pain, I had to add aditional checks in teh code to deal with that Dave Rolsky wrote: On Tue, 5 Mar 2002, Medi Montaseri wrote: My suggestion would be to install a Linux on your developer's PC and keep with the distributed model. Now everyone can use a common web tree and at integeration, bring all of them to a staging box, QC it and ship it to production. Giving everyone their own Apache daemon, which uses their checked out tree of code, on a central dev server is really not a problem either. -dave /*== www.urth.org we await the New Sun ==*/ -- - Medi Montaseri [EMAIL PROTECTED] Unix Distributed Systems EngineerHTTP://www.CyberShell.com CyberShell Engineering -
Re: here is a good modperl question on perlmonk
I don't agree with virtual hosts setup for mod_perl folks. What if someone mess up the configuration file. If you want a central person to change them, then you are limitting the developer. The Linux-on-developers-box proposition also goes to include a database instance for the developer to crash 50 times a day It is the ultimate object oriented programmer methodology... Stuart Frew wrote: Greetings, Depending on the number of developers and how often they change, virtual hosts are good. Set up a sub-domain for each developer, ie jim.my-company.co.nz. Then they can configure there local setup to there hearts content, seperate CVS/document tree, also get separate logs. Cheers On Wed, 2002-03-06 at 12:02, Gunther Birznieks wrote: Philippe Chiasson had a really nice talk on setting up developer teams on mod_perl at ApacheCon 2001. Covers everything from CVS to deployment. You may want to see if you can get the slides from him ([EMAIL PROTECTED]) if you are interested in the details. Later, Gunther At 07:43 AM 3/6/2002, Medi Montaseri wrote: >Caller wirtes > > > we've just migrated our 80K line pure perl web application to > mod_perl...ah... > > so much aster... can anyone advise on their experiences for setting up > > apache/mod_perl for team development? up till now, we've all been running > > our own copy of sources out of our home directories, and running a > separate > > apache instance for each developer seems like overkill > >Source Control or Revision Control will always be there, no matter if you >work >out of one box or many boxes. Further I don't see anything different about >mod_perl >vs C++. There are all source codes. > >My suggestion would be to install a Linux on your developer's PC and keep >with the distributed model. Now everyone can use a common web tree and >at integeration, bring all of them to a staging box, QC it and ship it to >production. > >Caller can also buy some content management software like Interwoven's >TeamSite >product that provides a virtual workarea, for about $300,000. Its always >Make or Buy. >Isn't it. > >clayton cottingham wrote: >>thought someone might like to have a gander at this: >>http://perlmonks.org/?node_id=146303>http://perlmonks.org/?node_id=146303 >>look forward to seeing your replies!! > >-- >- >Medi Montaseri [EMAIL PROTECTED] >Unix Distributed Systems >Engineer HTTP://www.CyberShell.com>HTTP://www.CyberShell.com >CyberShell Engineering >- __ Gunther Birznieks ([EMAIL PROTECTED]) eXtropia - The Open Web Technology Company http://www.eXtropia.com/ -- - Medi Montaseri [EMAIL PROTECTED] Unix Distributed Systems Engineer HTTP://www.CyberShell.com CyberShell Engineering -
Re: here is a good modperl question on perlmonk
On Tue, 5 Mar 2002, Medi Montaseri wrote: Truebut I'm thinking full control to the developer Developer can now mis-configure httpdconf as much as he/she wants and all the paths; virtual or not are consistant, instead of a dev path vs production path Right, every developer can run their own Apache daemon, each on a different port, mess with httpdconf, etc Whether or not those Apache daemons run on individual workstations or a central dev box is not a big issue -dave /*== wwwurthorg we await the New Sun ==*/
Re: here is a good modperl question on perlmonk
Greeting, Yup, I agree but I meant virtual hosts on the development box, not production. Ideally you would have linux( or what ever) on every developers machine but sometimes you don't get the choice. Cheers On Wed, 2002-03-06 at 13:40, Medi Montaseri wrote: I don't agree with virtual hosts setup for mod_perl folks. What if someone mess up the configuration file. If you want a central person to change them, then you are limitting the developer. The Linux-on-developers-box proposition also goes to include a database instance for the developer to crash 50 times a day It is the ultimate object oriented programmer methodology... Stuart Frew wrote: Greetings, Depending on the number of developers and how often they change, virtual hosts are good. Set up a sub-domain for each developer, ie jim.my-company.co.nz. Then they can configure there local setup to there hearts content, seperate CVS/document tree, also get separate logs. Cheers On Wed, 2002-03-06 at 12:02, Gunther Birznieks wrote: Philippe Chiasson had a really nice talk on setting up developer teams on mod_perl at ApacheCon 2001. Covers everything from CVS to deployment. You may want to see if you can get the slides from him ([EMAIL PROTECTED]) if you are interested in the details. Later, Gunther At 07:43 AM 3/6/2002, Medi Montaseri wrote: Caller wirtes we've just migrated our 80K line pure perl web application to mod_perl...ah... so much aster... can anyone advise on their experiences for setting up apache/mod_perl for team development? up till now, we've all been running our own copy of sources out of our home directories, and running a separate apache instance for each developer seems like overkill Source Control or Revision Control will always be there, no matter if you work out of one box or many boxes. Further I don't see anything different about mod_perl vs C++. There are all source codes. My suggestion would be to install a Linux on your developer's PC and keep with the distributed model. Now everyone can use a common web tree and at integeration, bring all of them to a staging box, QC it and ship it to production. Caller can also buy some content management software like Interwoven's TeamSite product that provides a virtual workarea, for about $300,000. Its always Make or Buy. Isn't it. clayton cottingham wrote: thought someone might like to have a gander at this: http://perlmonks.org/?node_id=146303http://perlmonks.org/?node_id=146303 look forward to seeing your replies!! -- - Medi Montaseri [EMAIL PROTECTED] Unix Distributed Systems Engineer HTTP://www.CyberShell.comHTTP://www.CyberShell.com CyberShell Engineering - __ Gunther Birznieks ([EMAIL PROTECTED]) eXtropia - The Open Web Technology Company http://www.eXtropia.com/ -- - Medi Montaseri [EMAIL PROTECTED] Unix Distributed Systems Engineer HTTP://www.CyberShell.com CyberShell Engineering - Cheers Stuart Frew IT Manager The New Zealand Revolution [EMAIL PROTECTED] DDI +64-9-918 7664 FAX+64-9-307 7032 http://www.nzr.co.nz
Re: here is a good modperl question on perlmonk
Hello, PLOne other tip... write a small script (or modify apachectl) to start PLapache with a port number matched to your unix UID. This keeps PLdevelopers from using clashing port numbers. PL PL httpd -c Port $UID -c Listen $UID At Tellme we find it easiest to run multiple Apaches, one per developer. We share the same base Perl and Perl modules; we develop modules with Makefile.PL's and use use blib in our included personal httpd.pl's to get to our own versions of library code. We run our Apaches on a shared box, because our production infrastructure is pretty different from a userland Linux box. We just run on multiple ports, by default we use our telephone extensions for the port number--so we don't have any conflicts between users. If there are problems with load, lower MinServers/MaxServers/StartServers/MaxClients. The individual configs and logs go into our home directories, the only caveat for our setup is that our homedirs are mounted over NFS so we have to explicitly specify a Lockfile on local disk. We usually go one up on Paul's suggestion and just put a personal copy of apachectl into our personal bin directories (perhaps renamed myapache) and just change some paths and add a -f when running Apache to make it find the right config file. We find that this works great for development, and lets us still depend on the same Perl/Apache builds we use on production. Humbly, Andrew -- Andrew Ho http://www.tellme.com/ [EMAIL PROTECTED] Engineer [EMAIL PROTECTED] Voice 650-930-9062 Tellme Networks, Inc. 1-800-555-TELLFax 650-930-9101 --
Re: DBIx::Recordset and Select with $order
Gerald Richter [EMAIL PROTECTED] writes: But in perldoc DBIx::Recordset its documented that only Select works with order. It only works with Search. $order is listed below the heading Search parameters, while Select has an extra parameter (the third one) for order. Anyway it's better to use Search, because Select is very limited. In my perldoc DBIx::Recorset there is: *set = DBIx::Recordset - Select (\%params, $fields, $order) $set - Select (\%params, $fields, $order) $set - Select ($where, $fields, $order) Selects records from the recordsets table(s). [...] order: comma separated list of fieldnames to sort on *set = DBIx::Recordset - Search (\%params) [nothing with $order here] So the Documentation is *very* wrong. :) (Yes, in the Examples Part $order is only used with Search, but i dont look there very often. :) ) -- begin OjE-ist-scheisse.txt bye, Joerg Registered Linux User #97793 @ http://counter.li.org end
Re: mod_perl training companies?
Rich Bowen wrote: On Tue, 5 Mar 2002, Stas Bekman wrote: I'm compiling a list of companies giving mod_perl training for our new mod_perl site. Currently I have only: http://training.gbdirect.co.uk/courses/linux/customized_and_bespoke.html If you know of other companies please send me the URL of the page advertising the mod_perl courses. My company, Cooper McGregor does a mod_perl training course. Our training page is located at http://coopermcgregor.com/training/ The course outline for the mod_perl course should be put up there today, since, for some reason, the web site guy did not have a copy of it before. Thanks Rich! I also forgot to ask you to tell me the covered regions. e.g. London only, UK only, Europe, World Wide... to help potential customers minimize their research efforts. _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Breaks in mod_perl, works in Perl
Mark Hazen wrote: I am hoping there is a someone brilliant on this list that can help me. A little while ago, I posted to clp.perl asking how I can capture the trace output from DBI into a variable. Since DBI is an external process, I couldn't do it just by piping STDERR. Benjamin Goldberg came up with a module called IO::Capture (see below). It works amazingly well in standard Perl. Here is a sample script: use IO::Capture; $capturer = IO::Capture-new(\*STDERR); Doesn't IO::Scalar do the same? http://perl.apache.org/guide/porting.html#Redirecting_STDOUT_into_a_Scalar _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: here is a good modperl question on perlmonk
Stuart Frew wrote: Greeting, Ideally you would have linux( or what ever) on every developers machine but sometimes you don't get the choice. Oh "the choice" is easyjust come in on a weekend and install linux on your box. Don't tell IT. That's all. Cheers On Wed, 2002-03-06 at 13:40, Medi Montaseri wrote: I don't agree with virtual hosts setup for mod_perl folks. What if someone mess up the configuration file. If you want a central person to change them, then you are limitting the developer. The Linux-on-developers-box proposition also goes to include a database instance for the developer to crash 50 times a day It is the ultimate object oriented programmer methodology... Stuart Frew wrote: Greetings, Depending on the number of developers and how often they change, virtual hosts are good. Set up a sub-domain for each developer, ie jim.my-company.co.nz. Then they can configure there local setup to there hearts content, seperate CVS/document tree, also get separate logs. Cheers On Wed, 2002-03-06 at 12:02, Gunther Birznieks wrote: Philippe Chiasson had a really nice talk on setting up developer teams on mod_perl at ApacheCon 2001. Covers everything from CVS to deployment. You may want to see if you can get the slides from him ([EMAIL PROTECTED]) if you are interested in the details. Later, Gunther At 07:43 AM 3/6/2002, Medi Montaseri wrote: >Caller wirtes > > > we've just migrated our 80K line pure perl web application to > mod_perl...ah... > > so much aster... can anyone advise on their experiences for setting up > > apache/mod_perl for team development? up till now, we've all been running > > our own copy of sources out of our home directories, and running a > separate > > apache instance for each developer seems like overkill > >Source Control or Revision Control will always be there, no matter if you >work >out of one box or many boxes. Further I don't see anything different about >mod_perl >vs C++. There are all source codes. > >My suggestion would be to install a Linux on your developer's PC and keep >with the distributed model. Now everyone can use a common web tree and >at integeration, bring all of them to a staging box, QC it and ship it to >production. > >Caller can also buy some content management software like Interwoven's >TeamSite >product that provides a virtual workarea, for about $300,000. Its always >Make or Buy. >Isn't it. > >clayton cottingham wrote: >>thought someone might like to have a gander at this: >>http://perlmonks.org/?node_id=146303>http://perlmonks.org/?node_id=146303 >>look forward to seeing your replies!! > >-- >- >Medi Montaseri [EMAIL PROTECTED] >Unix Distributed Systems >Engineer HTTP://www.CyberShell.com>HTTP://www.CyberShell.com >CyberShell Engineering >- __ Gunther Birznieks ([EMAIL PROTECTED]) eXtropia - The Open Web Technology Company http://www.eXtropia.com/ -- - Medi Montaseri [EMAIL PROTECTED] Unix Distributed Systems Engineer HTTP://www.CyberShell.com CyberShell Engineering - Cheers Stuart Frew IT Manager The New Zealand Revolution [EMAIL PROTECTED] DDI +64-9-918 7664 FAX+64-9-307 7032 http://www.nzr.co.nz -- - Medi Montaseri [EMAIL PROTECTED] Unix Distributed Systems Engineer HTTP://www.CyberShell.com CyberShell Engineering -
cvs commit: modperl STATUS ToDo
geoff 02/03/02 10:09:54 Added: .STATUS Removed: .ToDo Log: exchanged the old ToDo for the new STATUS file Reviewed by: dougm Revision ChangesPath 1.1 modperl/STATUS Index: STATUS === mod_perl 1.3 STATUS: Last modified at [$Date: 2002/03/02 18:09:54 $] Release: 1.26-dev: In development. 1.25: Released July 11, 2001. Available Patches: * $r-args parsing of one=two=2 Report: http://marc.theaimsgroup.com/?l=apache-modperlm=98018719907031w=2 Status: patch available at http://marc.theaimsgroup.com/?l=apache-modperlm=98048943129379w=2 * two identical directives in Perl configuration Report: http://marc.theaimsgroup.com/?l=apache-modperlm=97449481013350w=2 Status: doc patch at http://marc.theaimsgroup.com/?l=apache-modperlm=97450363501652w=2 * PerlSetEnv scoping Report: http://marc.theaimsgroup.com/?l=apache-modperlm=99148497206388w=2 Status: may be fixed here http://marc.theaimsgroup.com/?l=apache-modperlm=99473571809129w=2 but that patch has this issue (I think) http://marc.theaimsgroup.com/?l=apache-modperlm=99565226811557w=2 --Geoff * %LocationMatch Perl bug Report: http://marc.theaimsgroup.com/?l=apache-modperlm=98260537428737w=2 Status: may be fixed here http://marc.theaimsgroup.com/?l=apache-modperlm=101366182205497w=2 * PVIV issues Report: http://marc.theaimsgroup.com/?l=apache-modperlm=99905070209305w=2 Status: patch available http://marc.theaimsgroup.com/?l=apache-modperlm=9116330145w=2 * mod_perl.h issues for Win32 Report: http://marc.theaimsgroup.com/?l=apache-modperl-devm=101253855721619w=2 Status: patch available * Apache::Utils::escape_html issues Report: http://marc.theaimsgroup.com/?l=apache-modperlm=101180404809059w=2 Status: patch available http://marc.theaimsgroup.com/?l=apache-modperl-devm=101188287032621w=2 * Apache::RegistryNG issues Report: http://marc.theaimsgroup.com/?l=apache-modperl-devm=101240123609773w=2 Status: patch available * vanishing symbol tables Report: http://marc.theaimsgroup.com/?l=apache-modperlm=100820262006934w=2 Status: patch available * $r-finfo problem with HTML::Mason::ApacheHandler Report: http://marc.theaimsgroup.com/?l=apache-modperlm=96854561311519w=2 Status: may be fixed with http://marc.theaimsgroup.com/?l=apache-modperlm=96869790426565w=2 * get/set handlers issues Report: http://marc.theaimsgroup.com/?l=apache-modperlm=95721313917562w=2 Status: patch available http://perl.apache.org/~dougm/set_handlers.pat * Apache::test Report: http://marc.theaimsgroup.com/?l=apache-modperl-devm=98278446807561w=2 Status: patch available Needs Patch or Further Investigation * readdir() broken on linux with glibc 2.2 Report: http://marc.theaimsgroup.com/?l=apache-modperlm=98824089613574w=2 Status: * SERVER_MERGE and DIR_MERGE Report: http://marc.theaimsgroup.com/?l=apache-modperlm=97351976714878w=2 Status: The require() part may be legitimate. personally, I never understood the DIR_CREATE happening before SERVER_CREATE either, but it doesn't seem to affect anything. the double DIR_MERGE is just a misunderstanding on Andy's part and is a result of how Apache handles Location before and after translation. --Geoff * warn() going to the wrong log Report: http://marc.theaimsgroup.com/?l=apache-modperlm=98190005604037w=2 Status: coincidentially, I've noticed that s-error_fname is not populated in a vhost when the vhost relies on the ErrorLog from the main server --Geoff * segfaults with DBI-connect (mysql) Report: http://marc.theaimsgroup.com/?l=apache-modperlm=96392180616185w=2 Status: * revisit send_http_header and r-status Report: http://marc.theaimsgroup.com/?l=apache-modperlm=99063926111686w=2 Status: * Apache-server-register_cleanup Report: ? Status: * bleedperl TIEHANDLE issues? Report: http://marc.theaimsgroup.com/?l=apache-modperl-devm=99909095916498w=2 Status: * bleedperl AUTOLOAD XSUB issues Report:
cvs commit: modperl-2.0 .cvsignore
stas02/03/05 21:24:57 Modified:t/apr.cvsignore ..cvsignore Log: -ignore files Submitted by: Philippe M. Chiasson [EMAIL PROTECTED] Reviewed by: stas Revision ChangesPath 1.4 +4 -1 modperl-2.0/t/apr/.cvsignore Index: .cvsignore === RCS file: /home/cvs/modperl-2.0/t/apr/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- .cvsignore18 Dec 2001 01:56:47 - 1.3 +++ .cvsignore6 Mar 2002 05:24:57 - 1.4 @@ -1,8 +1,11 @@ base64.t constants.t +date.t lib.t netlib.t +perlio.t pool.t +string.t table.t +util.t uuid.t -perlio.t 1.5 +1 -0 modperl-2.0/.cvsignore Index: .cvsignore === RCS file: /home/cvs/modperl-2.0/.cvsignore,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- .cvsignore5 Mar 2001 04:06:54 - 1.4 +++ .cvsignore6 Mar 2002 05:24:57 - 1.5 @@ -4,3 +4,4 @@ pm_to_blib scraps diff.txt +smoke-report-*.txt
cvs commit: modperl-2.0/lib/ModPerl TypeMap.pm
stas02/03/05 22:13:39 Modified:lib/ModPerl TypeMappm Log: - better diagnostics when the typemap conversion fails Revision ChangesPath 114 +5 -1 modperl-20/lib/ModPerl/TypeMappm Index: TypeMappm === RCS file: /home/cvs/modperl-20/lib/ModPerl/TypeMappm,v retrieving revision 113 retrieving revision 114 diff -u -r113 -r114 --- TypeMappm21 Feb 2002 01:40:03 - 113 +++ TypeMappm6 Mar 2002 06:13:39 - 114 -143,10 +143,14 sub map_arg { my($self, $arg) = _; + +my $map_type = $self-map_type($arg-{type}); +die unknown typemap: '$arg-{type}' unless defined $map_type; + return { name= $arg-{name}, default = $arg-{default}, - type= $self-map_type($arg-{type}), + type= $map_type, rtype = $arg-{type}, } }