[DIGEST] mod_perl digest 01/28/01
-- mod_perl digest January 28, 2001 - February 3, 2001 -- Recent happenings in the mod_perl world... Features o mod_perl status o module announcements o mailing list highlights o links mod_perl status o mod_perl - stable: 1.25 (released January 29, 2001) [1] - development: 1.25_01-dev [2] o Apache - stable: 1.3.17 (released January 29, 2001) [3] - development: 1.3.18-dev [4] o Perl - stable: 5.6 (released March 23, 2000) [5] - development: 5.7 [6] module announcements o HTML::Mason 1.0 - allows web pages and sites to be constructed from shared, reusable building blocks called components, which contain a mix of Perl and HTML and can call each other and pass values back and forth like subroutines [7] o Apache::ASP 2.09 - provides an Active Server Pages port for Perl scripting only, and enables the development of dynamic web applications with session management and embedded perl code [8] o Apache-Dispatch 0.09 - call PerlHandlers with the ease of Registry scripts [9] o Apache-AuthenCache 0.04 - implements a caching mechanism in order to speed up authentication and to reduce the usage of system resources [10] mailing list highlights o There was an interesting thread on OO design, including a link (http://www.extropia.com/ExtropiaObjects/) to some noteworthy whitepapers [11] o Another OT (but interesting) thread tries to dynamically change the current package [12] o Some people are trying to put their heads together to create a mod_perl adaptor for Web Object [13] o Here is a patch to Apache::SizeLimit that allows for throttling Apache based on unshared memory used instead of process size [14] o There was an RFC for a new mod_perl module that allows granular control over file symlinks [15] o Some thoughts on handling runaway processes [16] links o The Apache/Perl Integration Project [17] o mod_perl documentation [18] o mod_perl modules on CPAN [19] o mod_perl homepage [20] o mod_perl news and advocacy [21] o mod_perl list archives [22] [23] happy mod_perling... --Geoff [EMAIL PROTECTED] -- [1] http://perl.apache.org/dist/ [2] http://perl.apache.org/from-cvs/modperl/ [3] http://www.apache.org/dist/ [4] http://dev.apache.org/from-cvs/apache-1.3/ [5] http://www.perl.com/pub/language/info/software.html#stable [6] http://www.perl.com/pub/language/info/software.html#devel [7] http://forum.swarthmore.edu/epigone/modperl/crangwhalcray [8] http://forum.swarthmore.edu/epigone/modperl/phulfringfla [9] http://forum.swarthmore.edu/epigone/modperl/phumwhensky [10] http://forum.swarthmore.edu/epigone/modperl/quendphalwand [11] http://forum.swarthmore.edu/epigone/modperl/wixjoonang [12] http://forum.swarthmore.edu/epigone/modperl/climwilblo [13] http://forum.swarthmore.edu/epigone/modperl/spulfrermquix [14] http://forum.swarthmore.edu/epigone/modperl/mermwhelzhar [15] http://forum.swarthmore.edu/epigone/modperl/kilserquen [16] http://forum.swarthmore.edu/epigone/modperl/cloxthastand [17] http://perl.apache.org [18] http://perl.apache.org/#docs [19] http://www.cpan.org/modules/by-module/Apache/ [20] http://www.modperl.com [21] http://www.take23.org [22] http://forum.swarthmore.edu/epigone/modperl/ [23] http://marc.theaimsgroup.com/?l=apache-modperlr=1w=2
Re: DBI + MSsql Server
[EMAIL PROTECTED] wrote: Does any body have an idea how to access MSsql server using DBI or other method. I've to build an application and I don't want to go to IIS so is there any way to work with Apache+Modperl in gnu-Linux and querying a NT box running MSsql. http://www.xray.mpe.mpg.de/mailing-lists/dbi/2001-01/msg00311.html
Re: modperl + FrontPage Server Extensions
Hi Jose: I don't use Apache-ASP, but we have Apache-Sandwich, SSL and FrontPage support in both a Linux and Alpha boxes, and have never seen a conflict. The only tough part was building it, as SSL and Frontpage try to patch the same source files. Hope this helps. Regards, Rafael Caceres At 09:21 PM 2/2/01 -0800, you wrote: Hi Everybody I've a Linux box already running Apache/1.3.14 compiled with mod_perl-1.24_01 running Apache-ASP-2.03. Well the question is if Installing FrontPage Server Extensions will conflict?. Thanks in advance Regards -Jose [EMAIL PROTECTED] www.datacourse.com
Re: modperl + FrontPage Server Extensions
On Mon, 5 Feb 2001, Rafael Caceres wrote: Hi Jose: I don't use Apache-ASP, but we have Apache-Sandwich, SSL and FrontPage support in both a Linux and Alpha boxes, and have never seen a conflict. The only tough part was building it, as SSL and Frontpage try to patch the same source files. Hope this helps. There is a project somewhere that implements the frontpage extensions as a Perl CGI script - how would people feel about a pure mod_perl version? Regards, Rafael Caceres At 09:21 PM 2/2/01 -0800, you wrote: Hi Everybody I've a Linux box already running Apache/1.3.14 compiled with mod_perl-1.24_01 running Apache-ASP-2.03. Well the question is if Installing FrontPage Server Extensions will conflict?. Thanks in advance Regards -Jose [EMAIL PROTECTED] www.datacourse.com -- Matt/ /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\
Re: [OT] Design Patterns in mod_perl apps?
I would like to close this thread with LOTS of THANK YOUS to Gunther who gave me tons of very valuable information on the subject. I am still in the process of digging my way through design patterns, but still at the 'huh?' stage but am optimistic that very soon will have the 'Aha!' as the intro to the book says :) hint to perl/oop gurus (Damian, if you are listening): Time is ripe for a modern design patterns in perl book /hint best, bakki Gunther Birznieks wrote: The download link may be old. You might want to go to the extropiaperl project on SourceForge and get latest code using anonymous CVS. Also, in the last 2 months we really revamped the architecture to change from a central control loop to action handlers where a stream of action objects where the application is defined by the order and process through which the action handlers get processed. This is similar to the Struts project for the Java Servlet API on java.apache.org. It turns out to be a fairly powerful model that has increased our productivity even more. In addition, Webware will give me some real world apps to look at to get a sense of how CoR, flyweight etc are implemented, especially in Perl. This is right on the money as far as what I am trying to learn. That was part of our intention. We didn't really spend a LOT of time on design patterns, but certainly they had a strong influence. There have been tons of articles and books on Design Patterns since GoF Any specific web design patterns book you would recommend? If i was back home in the USA I could probably give you quite a few. As it is, I am afraid that I've just relying on articles here and there in the last 2 years because I never took my entire library with me when I moved to London and then to Singapore... I've been traveling more lightweight. GoF did not introduce Model-View-Controller architecture. But it is discussed in Wiley's "A System of Patterns: Pattern-Oriented Software Architecture". I think Addison-Wesley has a series of books based on the Pattern Languages symposia over the last many years which gives an overview. Any article by PJ Plauger I've ever read is pretty good. You can look a lot of his stuff up by searching the web for his name plus patterns. Malveau and Mowbray's CORBA Design Patterns is a really good book for anyone doing distributed programming even if it's not CORBA. The Pattern Almanac from Addison-Wesley doesn't really describe patterns all that well but it does provide a lot of references to existing works and provides very very short but easy to read summaries of many patterns out there. The cool thing about the Pattern Almanac is that it has a lot of patterns that are not idomatic to OO but apply to many situations. For example, it even has a section on "Patterns for Designing in Teams"... which include Multiple Competing Designs, Decision Document, Creator-Reviewer, Master-Journeyman, and Ad-Hoc Corrections Thanks, Gunther -- _ _ .-. |M|S| Bakki Kudva |D|_|a|y| Navaco |o|m|n|s|\420 Pasadena Drive |c|e|a|t| \\ Erie, PA 16505-1037 |u|n|g|e| \\ http://www.navaco.com/ | |T|e|m| \ ph: 814-833-2592 "" fax:603-947-5747 e-Docs
Apache::Session::File
Hello, I ma trying to use this module to store persident data on file on win32 environment. I use the code: use Apache; use Apache::Session::File; use CGI qw/:standard/; use CGI::Carp qw(fatalsToBrowser); print header(); print start_html; my %global_data; eval { tie %global_data, 'Apache::Session::File', 1, {Directory = '/temp/sessiondata'}; }; if ($@) { die "Global data is not accessible: $@"; } print "hello"; print end_html; I get error in apache logs : Can't locate IPC/SysV.pm in @INC do I need the IPC/SysV.pm module? I have searched the documentation but i don't see a simple clear example to do this. Can you help please? Thanks
RE: Doh; StatINC can't find files?
Hi, do you have a startup.pl with something like $ENV{MOD_PERL} or die "not running under mod_perl!"; use lib qw( /your-path-to-your-libs ); which is registred in your httpd.conf with something like PerlRequire /etc/httpd/startup.pl PerlInitHandler Apache::StatINC PerlSetVar StatINC_UndefOnReload On PerlSetVar StatINC_Debug 1 or did you add your lib path directly in httpd? you have to set your (%INC) BEFORE running your scripts. regards, Harald -Original Message- From: Nick Tonkin [mailto:[EMAIL PROTECTED]] Sent: Samstag, 03. Februar 2001 04:06 To: [EMAIL PROTECTED] Subject: Doh; StatINC can't find files? Hi folks, Maybe I'm just rusty after 8 months off, but my StatINC can't find files that exist on the system: wm ~tail ~wm/wm/logs/errorlog Apache::StatINC: Can't locate /home/wm/wm/perl/WM/Class.pm wm ~perl -e '$file="/home/wm/wm/perl/WM/Class.pm"; $mtime = (stat $file)[9]; warn $mtime;' 963258607 at -e line 1. I thought it might be perms, but: wm ~ls -la /home/wm/wm/perl/WM/Class.pm -rwxrwxr-x1 wm wm 10357 Jul 20 2000 /home/wm/wm/perl/WM/Class.pm And the same thing happens with Apache::Reload ... I'm sure I'm missing something obvious; any clues? Thanks -nick
Environnement stability and maturity
Hello. I'm about to give the kick-off of a new project and we want to start with current and to-date version of software. Will it be ok for production use to go with all-fresh version of the mod_perl environnement : apache 1.3.17, mod_perl 1.25, perl 5.6 ? I'm going with the latest version of Solaris (euh... what is it? I am the programmer on that, not the sysadmins... ;o) I'm on the impression from my reading of the list that there was some problems with perl 5.6 : am I wrong? If not, what kind of problem should I expect? Thanks for any advise or experience. Benoit Caron Analyste-Programmeur Netgraphe - Webfin.com - Le Web Financier [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - "The number of Unix installations has grown to 10, with more expected." -- The Unix Programmer's Manual, 2nd edition, June '72
Re: Environnement stability and maturity
On Mon, 5 Feb 2001, Benoit Caron wrote: Hello. I'm about to give the kick-off of a new project and we want to start with current and to-date version of software. Will it be ok for production use to go with all-fresh version of the mod_perl environnement : apache 1.3.17, mod_perl 1.25, perl 5.6 ? I'm going with the latest version of Solaris (euh... what is it? I am the programmer on that, not the sysadmins... ;o) I'm on the impression from my reading of the list that there was some problems with perl 5.6 : am I wrong? If not, what kind of problem should I expect? There are some nasty bugs in 5.6 which tend to surface when you stretch perl a bit. One that AxKit brings rise to is the "Bizarre copy of ARRAY in aassign" (sic) bug. There are patches available to fix this though. I'm still waiting for 5.6.1 before upgrading. Others have bitten the bullet and been just fine with 5.6.0. -- Matt/ /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\
Extending the FancyIndexing description text ?
Hi, Could somebody give me a pointer in the right direction for manipulating the contents of index pages. I need a way to insert an href under the description column for each file in a directory, which is a link to an RDF search facility I'm creating, e.g. FileDescription --- foo.doca href='/perl/rdfsearch.pl/projects/docs/foo.doc'Resource info/a bar.html a href='/perl/rdfsearch.pl/projects/docs/bar.html'Resource info/a I need to pass in the search script the resource in question - via path_info seems easiest. I want the rest of the page to be the same as usual, with the icons mapped to file extensions/mime types etc. Before I jump in at the deep end has anybody done this kind of thing before... I took a quick look at Apache::AutoIndex but I couldn't see a way to add extra text for each entry in the directory. The alternative is to code a handler from scratch but it seems a shame when 90% of what I want is already provided. cheers Tim Fulcher
Re: Environnement stability and maturity
At 11:04 05/02/2001 -0500, Benoit Caron wrote: I'm on the impression from my reading of the list that there was some problems with perl 5.6 : am I wrong? If not, what kind of problem should I expect? I've been quite happy with 5.6 in production for quite some time. I used the source provided by activestate because it includes a number of patches but now that 5.6.1rev2 is out it might be better. There are probably bugs, but I bumped into none (except perhaps one weird behaviour of the new warnings pragma that eventually went away and which I could never track down, perhaps it was me). Apache 1.3.14 and mod_perl 1.24_01 seem to be the usual near perfectly stable. -- robin b. "Science is like sex: sometimes something useful comes out, but that is not the reason we are doing it." -- R. Feynman
Re: Environnement stability and maturity
At 16:10 05/02/2001 +, Matt Sergeant wrote: There are some nasty bugs in 5.6 which tend to surface when you stretch perl a bit. One that AxKit brings rise to is the "Bizarre copy of ARRAY in aassign" (sic) bug. There are patches available to fix this though. Yup, that was a nasty one, and it seems to surface pretty much everywhere (a pity the test suite didn't catch it). The AS source includes the patches for it and I never saw it come up again. -- robin b. "Many people would sooner die than think. In fact, they do." - Bertrand Russell
Repost with code: Newbie mysterious 500 error with PerlFixupHandlers
Sorry I forgot to include these files with the earlier message. Does anyone have any clues with this problem. I have searched the archives for internal server errors and PerlFixupHandlers and found no similar problems. Perhaps this is a mod_dir issue. Judy judy selen wrote: We are using RedHat Linux apache 1.3.14 mod_perl_1.23_01 Our site is set up to generate pages using a templating system to add custom headers footers and sidebars. As well we use .htaccess files to further customize the subprocess_env. We are using custom modules installed as PerlFixupHandlers both for template generation and multilingual negotiation Negotiation.pm handles lingual content negotiation. It determines what version of the page to present based on the users preferred variants and the available variants for that page.When the best match is found, it performs an internal redirect to that document. Template.pm is installed as a fixup handler, and is controlled through various PerlSetVar directives. Basically, it determines what to include at the beginning and end of the web page. fixup sets the content handler for the request. Also has two subroutines, handle_rec for static pages ,and handle_cgi for scripts These allow the auto-inclusion of headers and footers of web pages. In httpd.conf -- DirectoryIndex index.cgi index.html PerlRequire /www/perl/libs/WRI/Template.pm PerlRequire /www/perl/libs/WRI/Negotiation.pm PerlFixupHandler WRI::Negotiation WRI::Template::fixup --- These modules work 90% of the time The problem occurs when a directory is requested, and served as a negotiated document and is passed to our content handler. (handle_cgi) A save-as window pops up in the browser and Apache logs a 500 error. (The file it is trying to save is the standard 500 internal error message.) In the Template::fixup handler, the document is being detected as a cgi-script, not a server-parsed document. The 500 occurs because we are trying to execute a static document or directory. Template.pm In run_cgi: unless (open(CGI,'-|')) { #don't need the writing handle to the pipe anymore close(WR); #make STDIN be the read handle of the pipe (so we can get #POST information from Apache) open(STDIN,'RD'); #Run in the directory of the file $r-chdir_file($filename); ### This returns 500 when a directory or static file is negotiated ### #Run the file exec($filename) || return SERVER_ERROR; } Error Log: [Wed Jan 31 13:04:52 2001] [error] Can't use string ("500") as a symbol ref while "strict refs" in use at /www/perl/libs/WRI/Template.pm line 302. [Wed Jan 31 13:04:55 2001] [error] Usage: Apache::cgi_header_out(r, key, ...) at /www/perl/libs/WRI/Template.pm line 433. These lines numbers may not be accurate since we have added and deleted debugging code.. Template.pm - handle_cgi: #FIXME - needs error checking. If run CGI fails, $cgi will have #the number 500 instead of a file handle, and will fail later on my $cgi = run_cgi($r, $r-filename(), $r-uri()); line 302: while ($cgi) { #remove the trailing body and html tags from the CGI output #if we are using includes if ($addincs) { s!/(body|html)[^]*!!gio; } #print out the line that we just read $r-print($_); } . . . do { #Quit if this is the end of the headers last if ($_ eq $/); #remove the LF or CRLF chomp; #Give apache the header line unless ($is_sub) { line 433: $r-cgi_header_out(split(/:\s*/,$_,2)); } } while (CGI); - My understanding is that when OK or DECLINED is returned from these modules in the list of fixup handlers, control passes to the next, and when DONE is returned, the remaining are skipped mod_dir regains control and the next default file is requested (index.cgi index.html) Is this correct or is there something I am misunderstanding. Request Outline --- mod_dir sends directory request to Negotiation.pm /products/student/calcwiz/ returns OK from Nego.pm mod_dir then sends index.cgi - index.html Nego.pm negotiates index.cgi and each of available variations then index.html .. when found most appropriate Negotiating: /products/student/calcwiz/index.en.html Template.pm handling request.. /products/student/calcwiz/index.en.html Another Clue This error recurs when the page is reloaded 25 - 30 times MaxRequestsPerChild is 30 Could this be related to our problem. I
server_root question...
Hey all, Maybe its too early or whatever. How would you go about setting $ENV{SERVER_ROOT} without using Perl. I was trying PerlSetEnv SERVER_ROOT Apache::server_root_relative() in perl.conf, but no go. Any ideas? Joe Crotty
Re: Doh; StatINC can't find files?
wm looks like a home directory. The default perms on the home directory are usually 700. Try changing that to something like 755 or even 744 (it may not need execute). Robert Landrum Hi folks, Maybe I'm just rusty after 8 months off, but my StatINC can't find files that exist on the system: wm ~tail ~wm/wm/logs/errorlog Apache::StatINC: Can't locate /home/wm/wm/perl/WM/Class.pm wm ~perl -e '$file="/home/wm/wm/perl/WM/Class.pm"; $mtime = (stat $file)[9]; warn $mtime;' 963258607 at -e line 1. I thought it might be perms, but: wm ~ls -la /home/wm/wm/perl/WM/Class.pm -rwxrwxr-x1 wm wm 10357 Jul 20 2000 /home/wm/wm/perl/WM/Class.pm And the same thing happens with Apache::Reload ... I'm sure I'm missing something obvious; any clues? Thanks -nick
Re: Error reporting mod_perl 1.25 + apache 1.3.17
I compiled perl 5.6 and Apache 1.3.17 using gcc egcs-2.91.66 on a RH Linux 6.1 system. If I compile Apache without modperl it run OK. If i compile it with mod_perl 1.25 I also get the segmentation fault on startup. I looked in ../mod_perl/SUPPORT and didn't see anything obvious about this problem. -Matisse At 4:46 PM + 2/2/01, G.W. Haywood wrote: Hi there, On Fri, 2 Feb 2001, Vasily Petrushin wrote: Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration: Platform: osname=solaris, osvers=2.8, archname=sun4-solaris-thread-multi Options given to mod_perl's Makefile.PL USE_DSO=1 EVERYTHING=1 Have you tried building static? Did you search the mod_perl Mailing List archives for "Solaris"? 73, Ged. -- --- Matisse Enzer TechTv Web Engineering [EMAIL PROTECTED] 415-355-4364 (desk) 415-225-6703 (cellphone)
RE: server_root question...
If you want to use a perl function ( Apache::server_root_relative() ) then you have to use a Perl block. This might work : PerlSetEnv SERVER_ROOT \ Perl Apache::server_root_relative() /Perl But this seems so much easier : Perl $ENV{'SERVER_ROOT'} = Apache::server_root_relative() /Perl Maybe its too early or whatever. How would you go about setting $ENV{SERVER_ROOT} without using Perl. I was trying PerlSetEnv SERVER_ROOT Apache::server_root_relative() in perl.conf, but no go. Any ideas?
Re: Error reporting mod_perl 1.25 + apache 1.3.17
Hi there, On Mon, 5 Feb 2001, Matisse Enzer wrote: I compiled perl 5.6 and Apache 1.3.17 using gcc egcs-2.91.66 on a RH Linux 6.1 system. If I compile Apache without modperl it run OK. If i compile it with mod_perl 1.25 I also get the segmentation fault on startup. I looked in ../mod_perl/SUPPORT and didn't see anything obvious about this problem. The SUPPORT document is intended to help you to provide information which will be helpful to those trying to help you... I hope that's clear. :) I'm sure there must be people on this List who have successfully built mod_perl systems using exactly the packages you have mentioned. Anyone care to confirm that? 73, Ged.
Re: Runaways
Robert Landrum wrote: I have some very large httpd processes (35 MB) running our application software. Every so often, one of the processes will grow infinitly large, consuming all available system resources. After 300 seconds the process dies (as specified in the config file), and the system usually returns to normal. Is there any way to determine what is eating up all the memory? I need to pinpoint this to a particular module. I've tried coredumping during the incident, but gdb has yet to tell me anything useful. First, BSD::Resource can save you from these. It will do hard limits on memory and CPU consumption. Second, you may be bale to register a handler for a signal that will generate a stack trace. Look at Devel::StackTrace (I think) for how to do it. - Perrin
Re: Passing data among handlers
Drew Taylor wrote: I have a slightly different twist on this question. We run Registry scripts on our site for debugging purposes. I would love to have a module for saving variables/data structures on a per-request basis (like the current Apache notes), but internally using pnotes under mod_perl, and some other mechanism (package vars like I'm using now?) under everything else. We do that. It's pretty simple. Just make get and set subs (or methods) that check for exists $ENV{'MODPERL'} and use pnotes or a global hash depending owhich they are running under. - Perrin
Re: Rate limiting in Apache
[EMAIL PROTECTED] wrote: I'm interested in doing rate-limiting with Apache. Basically, I want to give Apache a target bitrate to aim at. When writing to one user, it writes as close to bitrate as the user/network can suck it down. When writing to two users (two connections), it writes to each connection at as close to bitrate/2 as possible... and so on. I've heard this can be controlled by mod_perl. Can anyone point me to some examples? You might want to use mod_throttle for this. There are some similar things in mod_perl if you poke around CPAN for them. I can vouch for the one Randal wrote, but it's not exactly what you're asking for. - Perrin
Re: Error reporting mod_perl 1.25 + apache 1.3.17
On Mon, Feb 05, 2001 at 06:41:00PM +, G.W. Haywood wrote: Hi there, On Mon, 5 Feb 2001, Matisse Enzer wrote: I compiled perl 5.6 and Apache 1.3.17 using gcc egcs-2.91.66 on a RH Linux 6.1 system. If I compile Apache without modperl it run OK. If i compile it with mod_perl 1.25 I also get the segmentation fault on startup. I looked in ../mod_perl/SUPPORT and didn't see anything obvious about this problem. The SUPPORT document is intended to help you to provide information which will be helpful to those trying to help you... I hope that's clear. :) I'm sure there must be people on this List who have successfully built mod_perl systems using exactly the packages you have mentioned. Anyone care to confirm that? I've seen some strange segementation fault problems with mod_perl 1.25. I have not had the time to document these. Environment is similar to others: mod_perl 1.25, apache 1.3.17, perl 5.00503, solaris 2.6... -- Paul Lindner [EMAIL PROTECTED]
Re: [OT] Design Patterns in mod_perl apps?
Gunther Birznieks wrote: GoF did not introduce Model-View-Controller architecture. But it is discussed in Wiley's "A System of Patterns: Pattern-Oriented Software Architecture". MVC is frequently used in mod_perl apps. For example, see Apache::PageKit. - Perrin
Re: Runaways
On Mon, 5 Feb 2001, Perrin Harkins wrote: First, BSD::Resource can save you from these. It will do hard limits on memory and CPU consumption. Second, you may be bale to register a handler for a signal that will generate a stack trace. Look at Devel::StackTrace (I think) for how to do it. Nope, that's not it. I wrote that one and it doesn't talk about that at all. -dave /*== www.urth.org We await the New Sun ==*/
Re: Runaways
Dave Rolsky wrote: On Mon, 5 Feb 2001, Perrin Harkins wrote: First, BSD::Resource can save you from these. It will do hard limits on memory and CPU consumption. Second, you may be bale to register a handler for a signal that will generate a stack trace. Look at Devel::StackTrace (I think) for how to do it. Nope, that's not it. I wrote that one and it doesn't talk about that at all. I meant "for how to generate a stacktrace". Using it with a singal handler was demonstrated on this list about two weeks ago, but I can't recall who did it. It was someone trying to track down a segfault. - Perrin
Re: Apache::SizeLimit MAX UNSHARED patch
Joshua Chamas wrote: Hey, Per Perrin Harkin's advice, and my client's consent, I hacked up Apache::SizeLimit to support MAX_PROCESS_UNSHARED_SIZE config, where instead of limiting by the apparent process size, one limits by the amount of unshared memory being used. I actually did submit our patch for this a couple of weeks ago. I sent it to the guy who's name was in the module, and he told me sent it along to the proper authorities. I'll send it to you if you'd like, and then you could see if there are any extras in it that would help your patch. I did patch all the documentation in our version to include the new option, so that might be a useful addition to yours. - Perrin
Re: Runaways
On Mon, 5 Feb 2001, Perrin Harkins wrote: Nope, that's not it. I wrote that one and it doesn't talk about that at all. I meant "for how to generate a stacktrace". Using it with a singal handler was demonstrated on this list about two weeks ago, but I can't recall who did it. It was someone trying to track down a segfault. Oops, yes, you could use Devel::StackTrace or just use Carp::croak. Devel::StackTrace gives you a finer grained access to the stack trace (you can examine it frame by frame) rather than just dumping a string. For the purposes of dumping a trace to a log, either one will work just fine. -dave /*== www.urth.org We await the New Sun ==*/
Re: Environnement stability and maturity
Hello, RBI've been quite happy with 5.6 in production for quite some time. I used RBthe source provided by activestate because it includes a number of RBpatches but now that 5.6.1rev2 is out it might be better. What is the "official" home of 5.6.1rev2? I can't seem to locate it on CPAN anywhere. The p5p summary on http://www.perl.com/ seems to be under the impression that 5.6.1 isn't going to be out for a while. I remember seeing a pointer to one of the very early patches, but I can't seem to find it again. Thanks in advance-- 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 --
mod_perl failing to interpret bytecode modules
Arguments about open source aside, I have been asked to convert our commercial mod_perl modules into bytecode. I have tried to do this but have encountered various problems as described below. I have also browsed the previous discussion threads on this topic with interest, but they are quite old, and it is not clear that anyone has actually got this working. Any feedback on this issue would be much appreciated. I need to know whether this is a "show stopper" or just something I am doing wrongly. Thanks, Mark Twose (Senior Software Consultant) My experience is as follows: I am using Apache 1.3.12 and Mod Perl 1.24.01 that I have built on Solaris 2.6. Having sucessfully converted and run a simple stand alone perl script I decided to try a simple mod_perl based web page (Hello.pm) attached: (See attached file: Hello.pm) I can successfully convert Apache/Hello.pm into bytcode by doing the following: perlcc -b -o Hello_bc.pm Hello.pm mv Hello.pm Hello_txt.pm cp Hello_bc.pm Hello.pm I then registered this in httpd.conf with the following directives: Location /hello/friend SetHandler perl-script PerlHandler Apache::Hello /Location When I access hello/friend from a browser the following error is logged in apache/logs/error_log: [Mon Feb 5 13:13:41 2001] [notice] child pid 1967 exit signal Bus Error (10) I have also tried encoding Hello.pm using the example "Rot13" source filter. This also fails to interpret under mod_perl. I then tried bytecoding an Apache Perl Module. I pre-loaded this with the following directive: PerlModule Apache::MyModule Apache core dumped on startup as follows: (gdb) where #0 0xef563a08 in byteloader_filter () from /usr/local/lib/perl5/5.6.0/sun4-solaris/auto/ByteLoader/ByteLoader.so #1 0xc7b50 in S_filter_gets () #2 0xc9480 in Perl_yylex () #3 0xdcf98 in Perl_yyparse () #4 0x14b544 in S_doeval () #5 0x14ce9c in Perl_pp_require () #6 0x111b88 in Perl_runops_standard () #7 0xb9670 in perl_eval_sv () #8 0x3ec88 in perl_require_module () #9 0x392e4 in perl_cmd_module () #10 0x82fec in invoke_cmd () #11 0x83680 in ap_handle_command () #12 0x83760 in ap_srm_command_loop () #13 0x83ec4 in ap_process_resource_config () #14 0x84b00 in ap_read_config () #15 0x93428 in main () I am guessing that the problem is related to the perl "eval" function. I have tried running bytecode ( source filtered) modules using "eval" directly from Perl and this also failed. Perhaps this is a limitation of PERL, not mod_perl? Hello.pm
How Stable and The Perfect Combination
Hi People! I have some questions about the usage of mod_perl in an almost embedded environment. We want to put Apache with mod_perl in a FreeBSD 4.2 powered server appliance that has almost no remote admin capabilities. Things need to keep running for months. Our concern is the stability of mod_perl. My last mod_perl project was 1.5 years ago on HP/UX and I remember we had lots of weird crashes and memory leaks. How has this changed? I see that the current version of mod_perl is 1.25, is this considered stable? Is 1.25 with Perl 5.005_03 and Apache 1.3.17 a good proven combination? if not, which versions should I use? Thanks! Stefan
Apache::ASP Best Language to use?
Currently the company I work for is using ASP code running on Windows servers. We'd like to run a web server that isn't microsoft based for obvious reasons. We don't have so much ASP code, so it would be possible to scrap it and start over. What would you guys suggest as the best option: 1. Porting our ASP code to Apache::ASP and continue development in ASP 2. Doing new development in JSP 3. Doing new development in CGI 4. Doing new development in Coldfusion Please reply to my private email, since I'm not a subscriber to the modperl mailing list. Sincerely, Matthew Schroeder PMAI Software Developer Phone: 517-788--8100 ext. 352
Re: modperl + FrontPage Server Extensions
On Mon Feb 5 14:47:22 2001 + Matt Sergeant wrote: On Mon, 5 Feb 2001, Rafael Caceres wrote: Hi Jose: I don't use Apache-ASP, but we have Apache-Sandwich, SSL and FrontPage support in both a Linux and Alpha boxes, and have never seen a conflict. The only tough part was building it, as SSL and Frontpage try to patch the same source files. Hope this helps. There is a project somewhere that implements the frontpage extensions as a Perl CGI script - how would people feel about a pure mod_perl version? It was at http://www.nimh.org/fpse.shtml I don't checked recently if it had made much progress.
[JOB SEEKER] Full Time Telecommuting
Hi all... Well, I think the time has come for me to leave my current position. Most of my formal work stuff for the past year is covered my NDAs, but a brief resume can be seen at http://resumes.dice.com/gost_guru And, of course, there is always my CPAN stuff and list postings to serve as references :) I live outside Philadelphia, PA and really cannot relocate, so telecommuting is preferred. I will, however, consider occasional travel to client sites if the job is a good fit. Anyway, hope this wasn't too obtrusive... --Geoff __ Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Re: Apache::ASP Best Language to use?
Please reply to the mailing list as well, because I'm also interested in the answers this post is likely to get. Matthew Schroeder wrote: Currently the company I work for is using ASP code running on Windows servers. We'd like to run a web server that isn't microsoft based for obvious reasons. We don't have so much ASP code, so it would be possible to scrap it and start over. What would you guys suggest as the best option: 1. Porting our ASP code to Apache::ASP and continue development in ASP 2. Doing new development in JSP 3. Doing new development in CGI 4. Doing new development in Coldfusion Please reply to my private email, since I'm not a subscriber to the modperl mailing list. Sincerely, Matthew Schroeder PMAI Software Developer Phone: 517-788--8100 ext. 352 -- +---V---+ Silvia Dutoit Bogarim *Alcanet voice:2-420.1093 | A L C A T E L | SRD Systems Network * Phone +351.21.485.9093 +---+ Fax +351.21.485.9107 *GSM +351.96.803.9408 PORTUGAL mailto:[EMAIL PROTECTED]
SQL log analyzer for Apache::DBILogger
Sometime in the next month I need to embark on a log analyzer for the logs we've been accumulating for many moons via Apache::DBILogger. Has anyone made any effort to do such a thing already? I've dug around the web for a while and come up with zilch. -- /chris Those who cannot remember the past are doomed to buy Microsoft products.
RE: server_root question...
Interesting, I tried the following in perl.conf: PerlRequire conf/startup.pl PerlFreshRestartOn PerlSetEnv MOD_PERL_TRACE all #Directory Handlers #-- Directory /perl AllowOverride None Options +ExecCGI SetHandler perl-script PerlHandler Apache::Registry PerlSendHeader On /Directory Directory ~ "^/(cgi-bin|htdocs|perl)$" PerlAccessHandler Apache::GateKeeper ErrorDocument 403 /index.html Files ~ "/(index\.html|login\.cgi)$" PerlAccessHandler Apache::OK /Files /Directory Perl $ENV{'SERVER_ROOT'} = Apache::server_root_relative(); /Perl but, the Perl Block Directive issues this error on restart: Syntax error on line 26 of /home/dvlp/jcrotty/apache/conf/perl.conf: Usage: Apache::server_root_relative(rsv, name="") at /home/dvlp/jcrotty/apache/conf/perl.conf line 25. ./apachectl restart: httpd could not be started perl -cx reports syntax is OK Any ideas would be greatly appreciated. -Original Message- From: Stathy Touloumis [mailto:[EMAIL PROTECTED]] Sent: Monday, February 05, 2001 10:51 AM To: Joseph Crotty; [EMAIL PROTECTED] Subject: RE: server_root question... If you want to use a perl function ( Apache::server_root_relative() ) then you have to use a Perl block. This might work : PerlSetEnv SERVER_ROOT \ Perl Apache::server_root_relative() /Perl But this seems so much easier : Perl $ENV{'SERVER_ROOT'} = Apache::server_root_relative() /Perl Maybe its too early or whatever. How would you go about setting $ENV{SERVER_ROOT} without using Perl. I was trying PerlSetEnv SERVER_ROOT Apache::server_root_relative() in perl.conf, but no go. Any ideas?
Re: SQL log analyzer for Apache::DBILogger
Hi there, On Mon, 5 Feb 2001 [EMAIL PROTECTED] wrote: Sometime in the next month I need to embark on a log analyzer for the logs we've been accumulating for many moons via Apache::DBILogger. Has anyone made any effort to do such a thing already? I've dug around the web for a while and come up with zilch. There are certainly such things about, and you might like to have a look at the thread "How to really bang on a script?" about the end of October 2000. 73, Ged.
Re: SQL log analyzer for Apache::DBILogger
On Mon, 5 Feb 2001, G.W. Haywood wrote: On Mon, 5 Feb 2001 [EMAIL PROTECTED] wrote: Sometime in the next month I need to embark on a log analyzer for the logs we've been accumulating for many moons via Apache::DBILogger. Has anyone made any effort to do such a thing already? I've dug around the web for a while and come up with zilch. There are certainly such things about, and you might like to have a look at the thread "How to really bang on a script?" about the end of October 2000. I found the thread ( http://forum.swarthmore.edu/epigone/modperl/binzhimwah ) and there was the mention of a log-related program called Daquiri. This is also mentioned at http://perl.apache.org/guide/download.html#Daquiri_yet_another_webserver . But none of that seems to have anything to do with log analysis. I'm trying to generate the information to keep the marketing types happy - page hits per day and such. -- /chris Those who cannot remember the past are doomed to buy Microsoft products.
Re: SQL log analyzer for Apache::DBILogger
On Mon, 5 Feb 2001 [EMAIL PROTECTED] wrote: Sometime in the next month I need to embark on a log analyzer for the logs we've been accumulating for many moons via Apache::DBILogger. Has anyone made any effort to do such a thing already? I've dug around the web for a while and come up with zilch. the code is impressively gross, but check the "bin" directory in the Apache::DBILogger tar file. :) - ask (who has version 0.94 in the works on ~30th month :-/ ) -- ask bjoern hansen - http://ask.netcetera.dk/
Re: Apache::Session::File
You need to change the locking mechanism on Win32 to not use IPC. I believe there are examples for using Flock based locking but am not sure. If you are using win32 mod_perl, locking is irrelevant anyway because all requests are serialized through one engine. At 03:43 PM 2/5/01 +, harilaos wrote: Hello, I ma trying to use this module to store persident data on file on win32 environment. I use the code: use Apache; use Apache::Session::File; use CGI qw/:standard/; use CGI::Carp qw(fatalsToBrowser); print header(); print start_html; my %global_data; eval { tie %global_data, 'Apache::Session::File', 1, {Directory = '/temp/sessiondata'}; }; if ($@) { die "Global data is not accessible: $@"; } print "hello"; print end_html; I get error in apache logs : Can't locate IPC/SysV.pm in @INC do I need the IPC/SysV.pm module? I have searched the documentation but i don't see a simple clear example to do this. Can you help please? Thanks __ Gunther Birznieks ([EMAIL PROTECTED]) eXtropia - The Web Technology Company http://www.extropia.com/