Re: mod_perl on specific scripts
David Hodgkinson wrote: Paonia Ezrine [EMAIL PROTECTED] writes: I have a number of scripts in places other then /perl that I want to use mod_perl for. However, I can't turn it on for all scripts in a specific directory or even a certain extension. Is there any way to do this or am I going to need to do a redirect of some sort (anyone have one)? I trust you've set up a thin apache at the front? Then it's easy to pass only the scripts you want back to the mod_perl server. Did I just condemn you to learning mod_rewrite? Ooops :-) Assuming your script is written as a mod_perl handler, and assuming the aforesaid thin Apache in front, try mod_proxy on the front end and Location on the back end. What I do in my httpd-static.conf (cribbed wholesale from the Guide, names changed to protect the innocent): VirtualHost www.xxx.yyy.zzz:ppp ServerName www.foo.com ProxyRequests on ProxyPass/cgi-bin/ http://localhost:8080/bar/baz/ ProxyPassReverse /cgi-bin/ http://localhost:8080/bar/baz/ RewriteRule ^proxy:.* - [F] # keep others from using your proxy ProxyReceiveBufferSize 65536 # buffer more data thru the proxy # put whatever else you need in here too, like SSL configs, root dirs, # and whatnot /VirtualHost and in the httpd-perl.conf: Location /boo/baz/noot.cgi SetHandler perl-script PerlHandler Knights::who::say::Nit # likely more stuff goes in here too, see the Guide for details /Location If your scripts are of type Apache::Registry, instead do Alias /bar/baz/ /your/special/path/to/your/scripts/ Location /bar/baz/ SetHandler perl-script PerlHandler +Apache::Registry Options ExecCGI PerlSendHeader On /Location META Would something like Alias /bar/baz/foo.cgi /your/special/path/to/foo.cgi work? Because then this will work: Location /bar/baz/foo.cgi SetHandler perl-script PerlHandler +Apache::Registry Options ExecCGI PerlSendHeader On /Location and we can mix PerlHandlers and Apache::Registry scripts in the same (virtual) direactory. That would be a win. /META At least this handles the directory problem. The file extension problem really does require mod_rewrite, I believe. The beauty of this is that what the client sees really has nothing to do with where the scripts are on your server. On my box, I used mod_proxy to virtualize the /cgi-bin/ directory. When a request comes in for http://www.foo.com/cgi-bin/noot.cgi, the request gets passed back, the proper PerlHandler gets called, and life goes on. I admit that I've deliberately avoided learning mod_rewrite; I took one look at it and said "I'm doing something else!". So I set up all my sites to avoid using it. God help me if I ever really _have_ to use it, though :) --Christopher Christopher L. Everett [EMAIL PROTECTED]
Re: Apache::SSI problem
On Wed, Nov 01, 2000 at 09:51:38AM +0200, Stanislav Grozev wrote: Hi, I am using Apache 1.3.14, mod_perl 1.24_01, perl 5.6 and Apache::SSI 2.13 in my httpd.conf i have the following: PerlRequire /usr/local/web/perllib/Apache/tSSI.pm Files ~ "\.bozo$" SetHandler perl-script PerlHandler Apache::tSSI /Files AddType text/html .bozo and the tSSI.pm contains: package Apache::tSSI; use strict; use vars qw(@ISA); use Apache::SSI; use Apache::Constants qw(:common OPT_EXECCGI); use Apache::File; @ISA = qw(Apache::SSI); sub ssi_bozo { my($self, $args) = @_; return "blah blah"; } 1; and finaly, one file, named test.bozo contains, among some plain html the !-- #bozo -- ^ The tag should be !--#bozo -- -- Thomas Eibner
Re: Apache::SSI problem
On Wed, Nov 01, 2000 at 09:29:31AM +0100, Thomas von Elling Skifter Eibner wrote: SNIP^ The tag should be !--#bozo -- yeah, sorry... stupid me.;-) works like a charm now, thanks -tacho -- [i don't follow] | [http://daemonz.org/ || [EMAIL PROTECTED]] [everything should be made as simple as possible, but no simpler] 0x44FC3339 || [02B5 798B 4BD1 97FB F8DB 72E4 DCA4 BE03 44FC 3339]
Re: mod_perl on specific scripts
Matthew Byng-Maddick [EMAIL PROTECTED] writes: On 31 Oct 2000, David Hodgkinson wrote: Did I just condemn you to learning mod_rewrite? Ooops :-) You do, of course, know about all the latest patches for this, due to potential security problems ...moving to Apache 1.3.14, right? -- Dave Hodgkinson, http://www.hodgkinson.org Editor-in-chief, The Highway Star http://www.deep-purple.com Apache, mod_perl, MySQL, Sybase hired gun for, well, hire -
Re: Apache::SSI problem
Stanislav Grozev [EMAIL PROTECTED] writes: *snip* the problem is, when I fetch the file, the above remains intact, ie. the SSI doesn't process it? I've tried also with plain Apache::SSI directives (ie. without subclassing it) and it still doesn't work.;-( any suggestions? (this setup sucessfully runs apache::asp and html::embperl, so i don't think it is from the mod_perl/apache/perl combo) any help would be appreciated... Have you got an 'Options +Includes' in there anywhere? Does plain old SSI work at all? -- Dave Hodgkinson, http://www.hodgkinson.org Editor-in-chief, The Highway Star http://www.deep-purple.com Apache, mod_perl, MySQL, Sybase hired gun for, well, hire -
Re: mod_perl on specific scripts
On 1 Nov 2000, David Hodgkinson wrote: Matthew Byng-Maddick [EMAIL PROTECTED] writes: On 31 Oct 2000, David Hodgkinson wrote: Did I just condemn you to learning mod_rewrite? Ooops :-) You do, of course, know about all the latest patches for this, due to potential security problems ...moving to Apache 1.3.14, right? Some are fixed in 1.3.14 but there are an extra set of patches for 1.3.14 to fix the things that weren't fixed. MBM -- Matthew Byng-Maddick Home: [EMAIL PROTECTED] +44 20 8981 8633 (Home) http://colondot.net/ Work: [EMAIL PROTECTED] +44 7956 613942 (Mobile) To err is human, to forgive is against company policy.
(@INC contains: .) Error
I installed win32 apache+perl+ssl but upon trying to start the apache web server i get the following error: Can't locate Cwd.pm in @INC (@INC contains: .) at (eval 1) line 1. i tried the followin to get @INC variables: C:\perl for (@INC) { print "$_\n"; } ^D and got: C:/Perl/5.6.0/lib/MSWin32-x86 C:/Perl/5.6.0/lib C:/Perl/site/5.6.0/lib/MSWin32-x86 C:/Perl/site/5.6.0/lib notice the / is the wrong / for windows. how can i change that to \ ? is that really my problem? thanks guys. asaf
Page contains no data error
I'm moving someone else's CGIs to run under mod_perl, and about 95% of the time they work. The other 5% of the time Netscape gets a "Document contains no data." error and the web page that should have been sent to the brower is written into the apache error log. No other error is given in the error log. This is running on Apache 1.3.12, perl 5.004_04, and mod_perl 1.24. I'm beginning to suspect that mod_perl and perl arn't playing well together, since mod_perl and apache were just upgraded. After a server process gives the error, all mod_perl requests (such as perl-status) that hit that process will get the same error. Any ideas what it might be or a better way to track it down? Steve Cochran
Re: prototype mismatch in Socket.pm
Hi there, On Wed, 1 Nov 2000, Jason Liu wrote: I got the following prototype mismatch error when starting up Apache. Has anyone seen this before? No, but I wonder if you built your Perl as well as your mod_perl? 73, Ged.
Re: Apache Modules in General
"JT" == Jimi Thompson [EMAIL PROTECTED] writes: JT working??? Why is it that no one has ever posted an actual working copy JT of an httpd.conf file for mod_perl in its various incarnations? Could it JT be because one doesn't exist? You haven't looked hard enough. I've posted complete httpd.conf files for mod_perl with a backend/frontend configuration at least twice here on this list. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Vivek Khera, Ph.D.Khera Communications, Inc. Internet: [EMAIL PROTECTED] Rockville, MD +1-301-545-6996 GPG MIME spoken herehttp://www.khera.org/~vivek/
Putting together the TPC mod_perl track
Stas et al, Since its getting towards the end of the year, should we be thinking of putting together a mod_perl track for TPC? Has anyone got any ideas on what they'd like to either a) talk about, or b) hear talks about ? -- Matt/ /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\
RE: Putting together the TPC mod_perl track
Hi Geoff, On Wed, 1 Nov 2000, Geoffrey Young wrote: pretty basic, stuff like that... I think that's what's needed. 73, Ged.
Re: Putting together the TPC mod_perl track
Matt Sergeant writes: Since its getting towards the end of the year, should we be thinking of putting together a mod_perl track for TPC? I've got a room allocated to mod_perl for two days of conference at the next OScon. With this group's blessing I'd like to call it "the mod_perl conference", as nobody else is offering mod_perl this kind of exposure. It'll be mentioned in TPC advertising, but it won't be a Perl or Apache track of the conference: it'll be labelled and promoted as mod_perl only. The low-hanging fruit (obvious topics) will be: * Doug MacEachern on mod_perl 2 * Matt on AxKit (also likely to make an appearance in the XML track) * Brian on AO (please please dark gods let AO come to fruition) * talk(s) on how to do good things with Apache::ASP * mod_perl + backhand = ass-kicking * Tips for developing or tuning HTML::Mason sites * Case studies showing how big companies use mod_perl This latter is an important part of the Perl conference. Many companies who would never 'fess up to using Perl seem quite happy to send employees to speak at conferences. Their talks end up as a big advertisement for Perl, and lets us name-drop the company as a Perl user. I see no reason why the same shouldn't happen with mod_perl. Nat
Re: Putting together the TPC mod_perl track
On Wed, 1 Nov 2000, Matt Sergeant wrote: Has anyone got any ideas on what they'd like to either a) talk about, or b) hear talks about ? I was thinking of giving a talk on Mason unless Jon Swartz wants to (haven't asked him yet). I also have another planned but its not mod_perl specific (technically, Mason isn't either, I guess). -dave /*== www.urth.org We await the New Sun ==*/
Re: ApacheCon report
From: "Perrin Harkins" [EMAIL PROTECTED] To: "Ask Bjoern Hansen" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, October 31, 2000 8:47 PM Subject: Re: ApacheCon report Mr. Llima must do something I don't, because with real world requests I see a 15-20 to 1 ratio of mod_proxy/mod_perl processes at "my" site. And that is serving 500byte stuff. I'm not following. Everyone agrees that we don't want to have big mod_perl processes waiting on slow clients. The question is whether tuning your socket buffer can provide the same benefits as a proxy server and the conclusion so far is that it can't because of the lingering close problem. Are you saying something different? A tcp close is supposed to require an acknowledgement from the other end or a fairly long timeout. I don't see how a socket buffer alone can change this.Likewise for any of the load balancer front ends that work on the tcp connection level (but I'd like to be proven wrong about this). Solaris lets a user-level application close() a socket immediately and go on to do other work. The sockets layer (the TCP/IP stack) will continue to keep that socket open while it delivers any buffered sends - but the user application doesn't need to know this (and naturally won't be able to read any incoming data if it arrives). When the tcp send buffer is empty, the socket will truly close, with all the usual FIN et. al. dialogue. Anyway, since the socket is closed from the mod_perl point of view, the heavyweight mod_perl process is no longer tied up. I don't know if this holds true for Linux as well, but if it doesn't, there's always the source code. The socket buffers on most Unix and Unix-like OSes tend to be 32kB to 64 kB. Some OSes allow these to be tuned (ndd on Solaris). -- Mike -- Michael Blakeley [EMAIL PROTECTED] http://www.blakeley.com/ Performance Analysis for Internet Technologies
Re: Putting together the TPC mod_perl track
I wrote: I've got a room allocated to mod_perl for two days of conference at the next OScon Man, that'll teach me to open my big mouth :-) OScon is O'Reilly's Open Source Convention. Next year it will be in San Diego. See http://conferences.ora.com/ for a link to this year's OScon. OScon has several tracks on things like Apache, Python, PHP, etc., as well as The Perl Conference. I don't have a layout or blurb for this year's convention, because we're still planning it. The layout of tracks is gelling. The CFP is supposed to go out in a week's time, a target that may or may not be reached. Nat
ASP error
Hi, I'm getting an error of: Can't modify constant item in scalar assignment at (eval 70) line 4, at EOF , /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 1740 Line 4 being: 4: ; $main::Response-WriteRef(\(' the .ASP file is for Sendmail and works fine on an NT server... any ideas? -R
Re: a web interface to visualize tables = DIGEST
Hi Geoff, I hope you're getting all this down... On Wed, 1 Nov 2000, Andy Duncan wrote: = http://www.oracletool.com/ = http://phpwizard.net/projects/phpMyAdmin/index.html = http://kenny.itlab.musc.edu/phpSybaseAdmin/ = http://www.php.net/manual/ref.oracle.php 73, Ged.
Re: ASP error
Hi there, On Wed, 1 Nov 2000, Shortley, Rob wrote: Can't modify constant item in scalar assignment at (eval 70) line 4, at EOF , /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 1740 the .ASP file is for Sendmail and works fine on an NT server... any ideas? Sound like one of Perl 5.6.0's amusing little interjections. You just need to assign the read-only whatever to a variable before you tweak it. Did you ever run this on 5.005_03? 73, Ged.
Re: return from nested functions
On Wed, 1 Nov 2000, Paul J. Lucas wrote: If I'm a few levels deep into function calls, I'd liek to be able to do something like "return SERVER_ERROR" and have the entire call stack unwind and the current request stopped. Is there any way to do that? Not that this has anything to do with mod_perl really but ... Use exceptions. There's a section in the guide on them some crazy guy wrote ;) I recommend my Exception::Class module on CPAN. But I would do that, wouldn't I? -dave /*== www.urth.org We await the New Sun ==*/
Re: maximum (practical) size of $r-notes
In continuing my work on this template system, I've run into another problem. Any one or more of the components can be a script, and the problem with the existing system which I'm trying to solve is catching redirects by them. The order in which I'm doing things is now: ( 4 part handler ) Part 1: Get the template set id (int), title, and meta designations from the requested file. Put this list in pnotes. Part 2: Add to that list the header, footer, toolbar, and content files as as designated in the template file. Part 3: Run through the list of components, and execute anything that needs to be executed. Capture the output and put it in pnotes. Part 4: Check for redirects, and send one if it exists. If not, print the template filled in with the output from the list entries. I had previously been executing component scripts like this: ($file is an entry in the list from Parts 12. All entries in that list are full pathnames. $args is a list of parameters set up previously in the handler.) if ( -x $file ) { $file =~ s/\/www\/html//o; $file = $file .'?'.$args if $args; my $subr = $r-lookup_uri($file); $subr-handler('cgi-script'); $subr-run(); return; } This doesn't work especially well anymore, as $subr-run outputs to the browser. I've looked through past list messages, and from what I've read there's no way to suppress that. Is there a reason that no one has come up with a method for doing this? It seems like a few people have asked about it, are we all going about things the wrong way? I'm not a C guy, so I'd probably need a little guidance, but I'd be happy to work a patch if no else wants to. Barring that, what's the best way to do what I need to do? exec'ing (and it's cousins) the scripts doesn't sound pretty, but I'm at a loss on what else to try. thanks, Todd At 12:29 AM 10/30/00, Todd Finney wrote: This is a follow-up on a question that I asked a couple of months ago. The subject was "executing a cgi from within a handler (templating redux)", dated 8/23/00. The gist of the matter is that we need a handler which will serve html pages ('content files') inside of other html files ('template files'), while sticking other files and scripts ('component files') into the template at the same time. Quasi-frames, if you will. We've already covered why we didn't pick one of the readily-available packages to do this. We've had a working handler that does _almost_everything it needs to do. When the user requests a page, it figures out which template to use (based on the page requested), which component set to use (based on the user and the page), rolls the whole thing together and sends it along. The wrapper can handle both static files and scripts as components or content files, and works really well most of the time. However, we've run into a problem when a page needs to redirect after execution, such as a login page. The problem is that when a component or content file is a script, the server executes that script when it encounters it in the template, a'la - hey, the user wants foo.html - the user is a member of group 'coders', and their component path is /www/htdocs/components/coders/ - foo.html wants template set 1, - go get /www/htdocs/components/coders/tmpl_1, and open - begin printing the template file to the browser. As the file goes by, watch for [tags] containing insertion points. - hey, there's [head], print or execute /www/htdocs/components/coders/head_1 - hey, there's [tool], print or execute /www/htdocs/components/coders/tool_1 - hey, there's [cont], print or execute foo.html - hey, there's [foot], print or execute /www/htdocs/components/coders/foot_1 - finish printing /www/htdocs/components/coders/tmpl_1 and close If /www/htdocs/components/coders/tool_1 has a redirect call in it, it's too late for the browser to actually do anything about it. I managed to corner Nathan in New York (thanks, Nathan!). He recommended a two-stage handler, one that processes the components and content, and another that actually handles the printing. Using $r-notes, the second handler could be aware of what it needed to do before printing anything. This is a really good idea, but it's turning out to be more difficult than I anticipated. The only way I can think of doing this is adding a third handler, in the middle, that executes any scripts and stores the output somewhere. Then it would check the output for a Location: header and set something like $notes-{'redirect'} if it finds anything. The third handler would then check that value before printing anything. If it's there, do it; if not, grab the output and the static files and print them to the user. I'm concerned about putting large amounts of data into $r-notes. Some of our script output can be pretty heavy. If $r-notes can only take simple strings, how large of a simple string is it safe
Re: Putting together the TPC mod_perl track
what is AO? thanks marc - Original Message - From: "Nathan Torkington" [EMAIL PROTECTED] To: "Matt Sergeant" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, November 01, 2000 12:14 PM Subject: Re: Putting together the TPC mod_perl track Matt Sergeant writes: Since its getting towards the end of the year, should we be thinking of putting together a mod_perl track for TPC? I've got a room allocated to mod_perl for two days of conference at the next OScon. With this group's blessing I'd like to call it "the mod_perl conference", as nobody else is offering mod_perl this kind of exposure. It'll be mentioned in TPC advertising, but it won't be a Perl or Apache track of the conference: it'll be labelled and promoted as mod_perl only. The low-hanging fruit (obvious topics) will be: * Doug MacEachern on mod_perl 2 * Matt on AxKit (also likely to make an appearance in the XML track) * Brian on AO (please please dark gods let AO come to fruition) * talk(s) on how to do good things with Apache::ASP * mod_perl + backhand = ass-kicking * Tips for developing or tuning HTML::Mason sites * Case studies showing how big companies use mod_perl This latter is an important part of the Perl conference. Many companies who would never 'fess up to using Perl seem quite happy to send employees to speak at conferences. Their talks end up as a big advertisement for Perl, and lets us name-drop the company as a Perl user. I see no reason why the same shouldn't happen with mod_perl. Nat
Re: return from nested functions
On Wed, 1 Nov 2000 11:37:00 -0800 (PST), "Paul J. Lucas" wrote: If I'm a few levels deep into function calls, I'd liek to be able to do something like "return SERVER_ERROR" and have the entire call stack unwind and the current request stopped. Will something like this do what you need? ~Ben eval { get as many levels deep into functions as you want ... ... ... die("SERVER_ERROR"); ... ... ... }; $the_error = $@; if ($the_error) { warn("Unwound stack because of $the_error"); }
Re: return from nested functions
Hi there, On Wed, 1 Nov 2000, Paul J. Lucas wrote: If I'm a few levels deep into function calls, I'd liek to be able to do something like "return SERVER_ERROR" and have the entire call stack unwind and the current request stopped. Is there any way to do that? It's called a 'goto' (and real programmers don't use it:). Or you could call a function which does the business and then calls mod_perl's exit() function, page 464 Eagle Book. Don't use an ordinary exit() from a mod_perl process because that abruptly kills the child, which is Bad News. 73, Ged.
Re: return from nested functions
On Wed, 1 Nov 2000, G.W. Haywood wrote: Or you could call a function which does the business and then calls mod_perl's exit() function, page 464 Eagle Book. I tried exit: the status code isn't preserved to downstream stacked handlers. - Paul
Re: return from nested functions
On Wed, 1 Nov 2000, Dave Rolsky wrote: On Wed, 1 Nov 2000, Paul J. Lucas wrote: If I'm a few levels deep into function calls, I'd liek to be able to do something like "return SERVER_ERROR" and have the entire call stack unwind and the current request stopped. Is there any way to do that? Not that this has anything to do with mod_perl really but ... Actually it does because the status code should be preserved to downstream stacked handlers (and, my testing, it apparantly isn't): sub some_nested_function { $r-status( SERVER_ERROR ); Apache-exit( 0 ); } # in downstream.pm handler sub handler { # $r-status() is NOT SERVER_ERROR here } - Paul
Re: return from nested functions
On Wed, 1 Nov 2000, Paul J. Lucas wrote: If I'm a few levels deep into function calls, I'd liek to be able to do something like "return SERVER_ERROR" and have the entire call stack unwind and the current request stopped. Is there any way to do that? Definitely use exceptions. I prefer Error.pm for this (sorry, Dave!), which allows your handler to simply be: sub handler { return try { ... } catch Exception::RetCode with { my $E = shift; return $E-{code}; } other exceptions ; } And then anywhere within your code you can go: throw Exception::RetCode ( code = SERVER_ERROR ); Of course there's a bit of setup to do beyond that, which I intend to rewrite the section of the guide to detail real soon now (tm). -- Matt/ /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\
Re: Seg Fault Issues- mod_perl and XML::Parser
On Wed, 1 Nov 2000, Tom Harper wrote: Hi-- Having a problem with modperl/xml-parser. Aren't we all :-) Try http://axkit.org/faq.xml Also, there is a patch for this (finally!) in http://axkit.org/download/ - the mod_dav-shared-expat patch. I've sent this to Greg Stein (but not heard any response yet). -- Matt/ /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\
Re: Putting together the TPC mod_perl track
On Wed, 1 Nov 2000, Marc Spitzer wrote: what is AO? A port of the servlets architecture to mod_perl. -- Matt/ /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\
Re: prototype mismatch in Socket.pm
At 6:22 AM -0800 11/1/00, Jason Liu wrote: Hi, I got the following prototype mismatch error when starting up Apache. Has anyone seen this before? Prototype mismatch: sub Socket::INADDR_ANY vs () at /usr/local/lib/perl5/5.6.0/sun4-solaris/Socket.pm line 328. Prototype mismatch: sub Socket::INADDR_BROADCAST vs () at /usr/local/lib/perl5/5.6.0/sun4-solaris/Socket.pm line 329. Prototype mismatch: sub Socket::INADDR_LOOPBACK vs () at /usr/local/lib/perl5/5.6.0/sun4-solaris/Socket.pm line 330. Prototype mismatch: sub Socket::INADDR_LOOPBACK vs () at /usr/local/lib/perl5/5.6.0/sun4-solaris/Socket.pm line 331. [Wed Nov 1 13:05:26 2000] [notice] Apache/1.3.14 (Unix) mod_perl/1.24_01 configured -- resuming normal operations Jason I get this on my system as well (RH linux 6.1/perl 5.6.0/Apache 1.3.12/mod_perl 1.24). Perl, Apache, and mod_perl are all non-RPM versions, built by me. I haven't spent much time trying to track down the cause of it, since it seems to mostly work. I guess I assumed it had to do with perl 5.6.0, which I was planning to downgrade in order to eliminate some odd behaviors with Mason. Bill
Apache::Scoreboard returns incomplete information to Apache::Watchdog::RunAway.
I am setting up Apache::Watchdog::RunAway and have come across a problem with Apache::Scoreboard that breaks Watchdog. The broken thing is access_count which is always 0 (my $count = $process-my_access_count;). This causes process running time to continue to increase until the Apache::Watchdog::RunAway timeout is reached and the process is marked as hung and killed. Sample debug output from Watchdog: OK 3 25345 W 0 30 0 OK 8 25383 W 0 24 0 OK 7 25411 W 0 18 0 OK 11 25421 W 0 15 0 OK 2 25408 W 0 3 0 OK 2 25408 W 0 6 0 OK 3 25345 W 0 33 0 [Tue Oct 31 11:37:11 2000] Apache::Watchdog::RunAway: child proc 25345 seems to hang -- it is running longer than limit of 30 secs ($Apache::Watchdog::RunAway::TIMEOUT). Killing proc 25345. OK 7 25411 W 0 21 0 OK 11 25421 W 0 18 0 From conversation with the author of Watchdog correct output: OK 2 13377 W 2 0 1 OK 0 13374 W 8 0 7 OK 2 13377 W 3 0 2 OK 0 13374 W 9 0 8 OK 2 13377 W 4 0 3 OK 2 13377 W 5 0 4 -- col 1 23 4 5 6 See the columns above: column 5 is the time the process is running, column 4 is the count of requests served by the child and col6 is the last request served. So the killing rule triggers when: col 4 and 6 has the same value and col 5 is bigger than TIMEOUT value. Finally here is some info on the environment this is running under. Output from perl-status: Embedded Perl version 5.00503 for Apache/1.3.12 (Unix) AuthMySQL/2.20 mod_perl/1.24 PHP/3.0.16 mod_ssl/2.6.4 OpenSSL/0.9.5a process 16288, running since Tue Oct 31 16:34:26 2000 Everything is compiled from tar balls on a RH 6.2 base install. Below are my compile time options for apache and mod_perl: Apache compile time options: SL_BASE=SYSTEM \ EAPI_MM=SYSTEM \ CC="egcs" \ OPTIM="-O9 -funroll-loops -ffast-math -malign-double -mcpu=pentiumpro -march=pentiumpro -fomit-frame-pointer -fno-exceptions" \ CFLAGS="-DDYNAMIC_MODULE_LIMIT=0 -DSINGLE_LISTEN_UNSERIALIZED_ACCEPT -DBUFFERED_LOGS" \ ./configure \ --with-layout=GNU \ --add-module=src/modules/experimental/mod_mmap_static.c \ --add-module=src/modules/standard/mod_auth_dbm.c \ --enable-module=ssl \ --enable-rule=SSL_SDBM \ --disable-rule=SSL_COMPAT \ --activate-module=src/modules/php3/libphp3.a \ --enable-module=php3 \ --activate-module=src/modules/perl/libperl.a \ --enable-module=perl \ --activate-module=src/modules/auth_mysql/libauth_mysql.a \ --disable-module=negotiation \ --disable-module=autoindex \ --disable-module=asis \ --disable-module=imap mod_perl compile time options: EVERYTHING=1 \ APACHE_SRC=../apache-1.3.12/src \ USE_APACI=1 \ PREP_HTTPD=1 \ DO_HTTPD=1 Thanks again for the help. Jayme Frye Senior System Administrator Inventive Comm. [EMAIL PROTECTED]
Re: Putting together the TPC mod_perl track
On Wed, 1 Nov 2000, Nathan Torkington wrote: * Case studies showing how big companies use mod_perl This latter is an important part of the Perl conference. Many companies who would never 'fess up to using Perl seem quite happy to send employees to speak at conferences. Their talks end up as a big advertisement for Perl, and lets us name-drop the company as a Perl user. I see no reason why the same shouldn't happen with mod_perl. I may be able to offer something on how we use mod_perl at eToys. We recently rewrote our codebase to take better advantage of mod_perl and are using some fun OO stuff, as well as a bunch of scalability tricks. I was also thinking about presenting a comparison of templating methods and modules. - Perrin
Re: return from nested functions
On Wed, 1 Nov 2000, Matt Sergeant wrote: Definitely use exceptions. I prefer Error.pm for this (sorry, Dave!), which allows your handler to simply be: That's no reason not to use Exception::Class. They are largely orthogonal. If you want to be able to declare your exception hierarchy at compile time and have it enforced (this is a good thing!) then check out Exception::Class. If you want Try/Catch syntax get Error.pm. Both of them come with Exception object implementations. I don't know about Error but with Exception::Class you don't have to use it (you could even use Error's, I think). -dave /*== www.urth.org We await the New Sun ==*/
RE: memory leak under WinNT - fixed
Hi again, We managed to fix the problem described below. The issue was the win32 porting code in perl. In the file perl-5.6.0/win32/win32.h commenting out the line: #define ENV_IS_CASELESS fixes the memory leak problem. -harshy -Original Message- From: Harshy Wanigasekara Sent: Wednesday, October 25, 2000 3:11 PM To: [EMAIL PROTECTED] Subject: memory leak under WinNT Hi All, I've looked through the maillist archives, and FAQs and guides and docs, with no help. I've got a memory leak problem running embedded perl under Apache on Windows NT. I've reduced the problem set as much as I can, to the following Apache::Registry script: --- # Filename: test.pl print("html head titleApache test/title /head /body Hello world. script LANGUAGE=\"JavaScript\" function ReloadPageFunc() { var newloc = \"test.pl\"; window.location.href = newloc; } var myTimeOut = setTimeout(\"ReloadPageFunc()\", 1); /script /body /html\n"); The script just generates a page which causes the browser to reload the same page every 10 seconds. The browser has no complaints about the page it receives. When I leave this page running I get memory leaks in the apache process. If I remove the enclosing print(""); statement so I just have the HTML code in a test.html file (ie: Apache::Registry handler is NOT called), there are no memory leaks. In the above example, the apache process' memory usage keeps increasing continuously until all virtual memory is exhausted (~1 GByte). I see 32K byte jumps for about every 100 reloads, it's worse for more complicated scripts. Since this is Windoze, I can't limit the number of requests a child can handle. My setup: Windows NT 4.0 SP 5 Apache 1.3.12 Perl 5.6.0 Modperl 1.24 (also embperl 1.3b5, but not used in above example) All source code compiled with VC++ 6.0 I ran BoundsChecker on the apache executable in the hopes of finding a single culprit, but found a multitude of perl core routines allocate memory using win32_malloc() in /perl5.6.0/win32/win32.c and don't free it. Anyone seen this before? -harshy -- Harshy Wanigasekara, Omneon Video Networks.
Error during mod_perl installation
After my recent problems with Apaxhe::ASP, I decided to re-install mod perl, just to see if it actually installed the last time around. Now, I've gotten through the 1st step (Makefile.PL), but the make process seems to fail with the following error: from regcomp.c:5: /usr/include/bits/local_lim.h:27: linux/limits.h: No such file or directory It seems to me as though make can't find limits.h... Where can I tell it where limits.h can be found? Or how would I go about solving this problem otherwise? Thanks. Bye, Fabio Albertin [EMAIL PROTECTED]
Re: Seg Fault Issues- mod_perl and XML::Parser
Matt-- I wish it were this easy to fix. I don't think i have a conflict with mod_dav (i never installed mod_dav)- never installed another conflicting expat- and I already compiled with Expat=no. Maybe i missed something, but I think there is some other problem here. Tom At 08:09 PM 11/1/00 +, Matt Sergeant wrote: On Wed, 1 Nov 2000, Tom Harper wrote: Hi-- Having a problem with modperl/xml-parser. Aren't we all :-) Try http://axkit.org/faq.xml Also, there is a patch for this (finally!) in http://axkit.org/download/ - the mod_dav-shared-expat patch. I've sent this to Greg Stein (but not heard any response yet). -- Matt/ /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\
Re: Putting together the TPC mod_perl track
On Wed, 1 Nov 2000, Matt Sergeant wrote: On Wed, 1 Nov 2000, Marc Spitzer wrote: what is AO? A port of the servlets architecture to mod_perl. from the original announcement i sent on 4 sept 2000: README snip-- AO is a servlet engine for Perl. It provides an application environment with such features as session tracking and persistence, security (authentication and authorization), simple configuration, and customizable logging. It also eventually will implement a Perl version of the (Java) Servlet API, providing applications with a well known model for application construction that abstracts the process model and deployment environment away from the developer. -- AO integrates out of the box with Apache::Session and Mason. i'm hoping others will add integration with AxKit, HTML::Template, Embperl, ASP, etc. the plugin architecture allows for us to provide even more implementations of session tracking and persistence, credential checking, role authorization, etc, or even to replace the core subsystems themselves. the adapter architecture will eventually allow us to run AO apps in either an external perl process or using today's in-process model - without modifications either way. the addition of the Servlet API will add a featureful, robust interface to the web application environment provided by the servlet engine. this is my first release of AO to the outside world. it's a pre-pre-pre-developer release; much is unfinished or in need of rework, altho i am using the engine as is for several projects today. i'm interested in feedback on both the general goals of the software as well as on its architecture and implementation. there's no mailing list, so please either send mail to me directly or to the modperl mailing list (preferred). PLEASE read the README before you do anything else.
Re: return from nested functions
On Wed, 1 Nov 2000, Matt Sergeant wrote: On Wed, 1 Nov 2000, Paul J. Lucas wrote: If I'm a few levels deep into function calls, I'd liek to be able to do something like "return SERVER_ERROR" and have the entire call stack unwind and the current request stopped. Is there any way to do that? Definitely use exceptions. It's rather cumbersome. Ideally, I want to be able to do: sub foo { if ( $serious_problem ) stop_now_dammit( SERVER_ERROR ); } anywhere in the code like: sub bar { foo(); } and I do *NOT* have to "catch" anything after the point of call, i.e., every call of foo() is similar to an "assertion" in C, i.e., if you get to the line of code after it, it worked; if it didn't work, you never get to the line after it. I suppose I want to do something like Apache-exit() but preserve the response code so the normal Apache error handling mechanism kicks in and handles the error. - Paul
Re: Putting together the TPC mod_perl track
Perrin Harkins writes: I may be able to offer something on how we use mod_perl at eToys. We recently rewrote our codebase to take better advantage of mod_perl and are using some fun OO stuff, as well as a bunch of scalability tricks. I was also thinking about presenting a comparison of templating methods and modules. That'd be really cool. We'll post a CFP as soon as we know exactly what's going on. The CFP will explain just what information we want (probably title, brief description, outline, and author information). Thanks, Nat
Extreme Newbie Question
Let me apologize in advance if this is covered on a FAQ somewhere, or if this is the wrong place for this question. I've looked on the Apache web sites and in "Administering Apache" by Arnold, Almeida, and Miller but no luck. I'm just trying to get started with Apache and Perl on WinNT. I've been using IIS (with Perl), and would like to switch to Apache. I'm having trouble with getting Perl CGIs to run. I was able to get a basic "Hello world" (compiled C) CGI working, but not a simple "Hello world" Perl script. When I try the script's URL I get: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. In the error log I get: (2)No such file or directory: couldn't spawn child process: g:/apache group/apache/cgi-bin/test.pl The file's there, and since a missing file generates a "Not found" message, something else is going on. I suspect that Apache is trying to execute test.pl as an executable, and doesn't know it should send test.pl to Perl.exe. So is there some sort of "Set Interpretter" function in httpd.cnf I need to use? The only changes I made to httpd.cnf was to set the admin email to my email. I decommented #AddModule mod_perl.c but that caused Apache to refuse to start. Any help would be greatly appreciated, Gaf
Re: return from nested functions
On Wed, 1 Nov 2000, Matt Sergeant wrote: Definitely use exceptions. I prefer Error.pm for this (sorry, Dave!), which allows your handler to simply be: sub handler { return try { ... } catch Exception::RetCode with { my $E = shift; return $E-{code}; } other exceptions ; } Be very careful with nested try/catch blocks. Error.pm uses prototypes to make these into anonymous subs, which is usually fine, but this leaks memory like mad: my $foo; try { something(); try { $foo++; }; } otherwise { handle_error(); }; It's not Graham Barr's fault; that's just a byproduct of Perl's support for closures (I think). - Perrin
Extreme Newbie Question
Nevermind, after searching on altavista for a couple hours I found a page that explained I had to use the #! notation (its not just for Unix anymore!) The test script works fine now. Gaf
Re: return from nested functions
On Wed, 1 Nov 2000, Paul J. Lucas wrote: Ideally, I want to be able to do: sub foo { if ( $serious_problem ) stop_now_dammit( SERVER_ERROR ); } anywhere in the code like: sub bar { foo(); } and I do *NOT* have to "catch" anything after the point of call, i.e., every call of foo() is similar to an "assertion" in C, i.e., if you get to the line of code after it, it worked; if it didn't work, you never get to the line after it. I figured out that I can do this by having stop_now_dammit() use $r-notes() to set a note of the status code, call Apache-exit(), and have the downstream handler check the note. If it's anything but OK, simply return that value and the normal Apache error handline mechanism kicks in. :) - Paul
Re: Putting together the TPC mod_perl track
On Wed, 1 Nov 2000, Nathan Torkington wrote: * Case studies showing how big companies use mod_perl This latter is an important part of the Perl conference. Many companies who would never 'fess up to using Perl seem quite happy to send employees to speak at conferences. Their talks end up as a big advertisement for Perl, and lets us name-drop the company as a Perl user. I see no reason why the same shouldn't happen with mod_perl. At the last US ApacheCon I did a talk on how we do XML/modperl related stuff for our publishing model at MP3.com, Inc. I have since then changed companies, so I can't really talk about that anymore (still got slides on my personal site though). The only thing I can really talk about is my current experiences in regards to i18n with the mailing list archives at http://archive.covalent.net/, but that would be pretty boring I would think. Cheers, -- Sander van Zoest [[EMAIL PROTECTED]] Covalent Technologies, Inc. http://www.covalent.net/ (415) 536-5218 http://www.vanzoest.com/sander/
Re: how to really bang on a script?
Perrin Harkins wrote: On Sat, 28 Oct 2000, Matthew Byng-Maddick wrote: On Sat, 28 Oct 2000, Matt Sergeant wrote: exactly the same thing (changing server logs into a benchmark tool) at ApacheCon, only I can't for the life of me remember who it was. Theo, during the mod_backhand talk, or at lunch just before, I can't remember. It was during the talk. The tool is called Daquiri, and he said it was available in the mod_backhand CVS tree. I have also found httperf and http_load pretty useful for this stuff, although they don't support logfile playback. Hey, I went by http://www.mod_backhand.org/, and found no mention of anything called Daquiri, nor any description of how to access the mod_backhand CVS tree, not even an email address to ask for information. I downloaded the mod_backhand source, and I found nothing there either. Does anyone have a clue about where to start getting my hands on this neat and nifty tool? --Christopher
Re: ApacheCon report
According to Michael Blakeley: I'm not following. Everyone agrees that we don't want to have big mod_perl processes waiting on slow clients. The question is whether tuning your socket buffer can provide the same benefits as a proxy server and the conclusion so far is that it can't because of the lingering close problem. Are you saying something different? A tcp close is supposed to require an acknowledgement from the other end or a fairly long timeout. I don't see how a socket buffer alone can change this.Likewise for any of the load balancer front ends that work on the tcp connection level (but I'd like to be proven wrong about this). Solaris lets a user-level application close() a socket immediately and go on to do other work. The sockets layer (the TCP/IP stack) will continue to keep that socket open while it delivers any buffered sends - but the user application doesn't need to know this (and naturally won't be able to read any incoming data if it arrives). When the tcp send buffer is empty, the socket will truly close, with all the usual FIN et. al. dialogue. Anyway, since the socket is closed from the mod_perl point of view, the heavyweight mod_perl process is no longer tied up. I don't know if this holds true for Linux as well, but if it doesn't, there's always the source code. I still like the idea of having mod_rewrite in a lightweight front end, and if the request turns out to be static at that point there isn't much point in dealing with proxying. Has anyone tried putting software load balancing behind the front end proxy with something like eddieware, balance or ultra monkey? In that scheme the front ends might use an IP takeover failover and/or DNS load balancing and would proxy to what they think is a single back end server - then this would hit a tcp level balancer instead. Les Mikesell [EMAIL PROTECTED]
Re: return from nested functions
even better: Apache-exit(SERVER_ERROR);. or die SERVER_ERROR;. this is documented in the eagle book: ch9 - The Apache::Constants Class "... While the HTTP constants are generally used as return codes from handler subroutines, it is also possible to use the builtin die() function to jump out of a handler with a status code that will be propagated back to Apache. Example: unless (-r _) { die FORBIDDEN; } " sterling On Wed, 1 Nov 2000, Paul J. Lucas wrote: On Wed, 1 Nov 2000, Paul J. Lucas wrote: Ideally, I want to be able to do: sub foo { if ( $serious_problem ) stop_now_dammit( SERVER_ERROR ); } anywhere in the code like: sub bar { foo(); } and I do *NOT* have to "catch" anything after the point of call, i.e., every call of foo() is similar to an "assertion" in C, i.e., if you get to the line of code after it, it worked; if it didn't work, you never get to the line after it. I figured out that I can do this by having stop_now_dammit() use $r-notes() to set a note of the status code, call Apache-exit(), and have the downstream handler check the note. If it's anything but OK, simply return that value and the normal Apache error handline mechanism kicks in. :) - Paul
Re: ApacheCon report
On Wed, 1 Nov 2000, Leslie Mikesell wrote: I still like the idea of having mod_rewrite in a lightweight front end, and if the request turns out to be static at that point there isn't much point in dealing with proxying. Or if the request is in the proxy cache... Has anyone tried putting software load balancing behind the front end proxy with something like eddieware, balance or ultra monkey? In that scheme the front ends might use an IP takeover failover and/or DNS load balancing and would proxy to what they think is a single back end server - then this would hit a tcp level balancer instead. We use that setup with a hardware load balancer. It works very well. - Perrin
Re: status_line() empty
On Wed, 1 Nov 2000, Paul J. Lucas wrote: OK, so, from within a custom ErrorDocument handler, $r-status() is the status code as I expect; however, $r-status_line() is blank. Any ideas why? It turns out that status_line() isn't populated until after send_http_header() is called. - Paul
Re: return from nested functions
On Wed, 1 Nov 2000, Paul J. Lucas wrote: On Wed, 1 Nov 2000, John K. Sterling wrote: even better: Apache-exit(SERVER_ERROR); The documentation for exit() deosnt' explicitly say you can do that. It mentions only "0" and "DONE" (see pp. 464-465). it works though, Apache.xs:exit() passes the status value to perl_util.c:perl_call_halt(), which checks: int is_http_code = ((status = 100) (status 600) ERRSV_CAN_BE_HTTP); ... if(is_http_code) { croak("%d\n", status); } the croak() call is caught the same way 'die SERVER_ERROR' is. or die SERVER_ERROR; But that works. Thanks! :) - Paul
Re: Seg Fault Issues- mod_perl and XML::Parser
Hi there, On Wed, 1 Nov 2000, Tom Harper wrote: Having a problem with modperl/xml-parser. mod perl 1.23 linux 6.2 apache 1.39 XML::Parser 2.29 and evidently Perl 5.6.0! No idea what might be the trouble, but I'd say get the latest of everything *except* Perl. I'd use 5.005_03 and compile everything with debugging symbols. Apach 1.3.9 is a bit old now, isn't it, but I'm still using it somewhere (I forget exactly where, so it must be fairly stable:). Though I've never used XML::Parser so all this is completely out of my hat. Is that Red Hat Linux 6.2? I had some problems in the summer with that choking on certain hardware ('Gateway' 750MHz PentiumII), when 6.1 was fine. So I used 6.1. 73, Ged.
Re: return from nested functions
On Wed, 1 Nov 2000, Dave Rolsky wrote: On Wed, 1 Nov 2000, Paul J. Lucas wrote: If I'm a few levels deep into function calls, I'd liek to be able to do something like "return SERVER_ERROR" and have the entire call stack unwind and the current request stopped. Is there any way to do that? Not that this has anything to do with mod_perl really but ... Use exceptions. There's a section in the guide on them some crazy guy wrote ;) I recommend my Exception::Class module on CPAN. But I would do that, wouldn't I? I'll second that recommendation, at citysearch we are using Exception::Class very successfully. We are able to trap all sorts of errors and the overhead is fairly small. Craig
Re: Putting together the TPC mod_perl track
I'd be curious to know how this is working out as we already have something similar and have been working on it for a couple years in evolution where Java Servlet compatibility was a key (but I'll admit -- not a #1) component to our design process. The stuff we've done emulates servlet architecture as greatly as we felt was possible without (A) forcing anyone to use a particular templating language (ie JSP style) although I have to say that I really liked Matt Sergeant's Perl-style XSP layer in AxKit at the conference. We've really started growing used to the JSP template model and so, seeing it implemented in Perl (Albeit more powerful for XML) was very interesting. (B) performance (this is a key component that Perl doesn't do well if forced to do everything servlet-style etc. (C) Not forcing Perl users to use a method call convention that is inconsistent with Perl. eg It's making our session wrappers around Apache::Session that emulate the Java Servlet Session API was OK because it's an external class. But IMHO emulating an event driven doPost and doGet method that needs to be overridden is a bit of overkill and we found confusing to our community of developers that are used to CGI.pm syntax. Why force them to switch? It emulates the architecture so closely that it took us only a couple months this summer to port nearly all the object interfaces, some significant drivers and have converted one of the hardest apps in Perl into Java Servlets - Perl. In Perl we have many apps in production, but in Java, we have one app (which we felt was the most representative to convert first). Now that we have the Java Servlet behind us, we believe every subsequent Perl app we do in our current architecture will take very little time (days to weeks depending on complexity) to switch over to Java based on real-world experience. And vice versa. With most of the work being the Views (which are View objects in our Perl architecture and JSPs in Java)... Ultimately we'd like to move to View objects just being taglib controllers for a template language. Not surprisingly, things that were easy in Perl, we had write stuff for in Java. So actually the same thing could be said of Java -- that Java people would really enjoy a Perl way of doing things if given classes to do so. eg in Perl, Perl Code can = Config File. But in Java, you really need something nicer like an XML based config because no one wants to download an app and have to recompile a Java class to set it up. Setting properties in a servlet engine sucks because there are effectively over 300 properties we allow setting (with many defaults) in WebDB. And placing them in a singleton sucks because you want people to be able to run different apps on the same web server without having to have multiple copies of the app. Both our Perl and Java use a framework similar to those discussed in the two main Apache.org Java servlet framework projects: http://java.apache.org/turbine/model2+1.html and http://jakarta.apache.org/struts/index.html At 01:33 PM 11/1/00 -0800, brian moseley wrote: On Wed, 1 Nov 2000, Matt Sergeant wrote: On Wed, 1 Nov 2000, Marc Spitzer wrote: what is AO? A port of the servlets architecture to mod_perl. from the original announcement i sent on 4 sept 2000: README snip-- AO is a servlet engine for Perl. It provides an application environment with such features as session tracking and persistence, security (authentication and authorization), simple configuration, and customizable logging. It also eventually will implement a Perl version of the (Java) Servlet API, providing applications with a well known model for application construction that abstracts the process model and deployment environment away from the developer. -- AO integrates out of the box with Apache::Session and Mason. i'm hoping others will add integration with AxKit, HTML::Template, Embperl, ASP, etc. the plugin architecture allows for us to provide even more implementations of session tracking and persistence, credential checking, role authorization, etc, or even to replace the core subsystems themselves. the adapter architecture will eventually allow us to run AO apps in either an external perl process or using today's in-process model - without modifications either way. the addition of the Servlet API will add a featureful, robust interface to the web application environment provided by the servlet engine. this is my first release of AO to the outside world. it's a pre-pre-pre-developer release; much is unfinished or in need of rework, altho i am using the engine as is for several projects today. i'm interested in feedback on both the general goals of the software as well as on its architecture and implementation. there's no mailing list, so please either send mail to me directly or to the modperl mailing list (preferred). PLEASE read the README before you do anything else.
RE: Apache 1.3.14 and Apache::RegistryLoader
More info on the problem for some kind soul: When I run the server under gdb in single server mode it produces the following output: [New LWP2] [New LWP3] Program received signal SIGSEGV, Segmentation fault. 0xff3b9c64 in ?? () (gdb) i thread 6 Thread 3 0xfe3ce64c in _reap_wait () from /usr/lib/libthread.so.1 5 Thread 2 (LWP 2) 0xff2174bc in _signotifywait () from /usr/lib/libc.so.1 * 4 Thread 1 (LWP 1) 0xff3b9c64 in ?? () 3 LWP3 0xff215094 in door_restart () from /usr/lib/libc.so.1 2 LWP2 0xff2174bc in _signotifywait () from /usr/lib/libc.so.1 1 LWP1 0xff3b9c64 in ?? () (gdb) bt #0 0xff3b9c64 in ?? () #1 0xff3be3a8 in ?? () #2 0xff3bd4a0 in ?? () #3 0xff3bd4fc in ?? () #4 0x4bed4 in ap_os_dso_unload (handle=0xfeed19a4) at os.c:133 #5 0xfedc1864 in unload_xs_so (librefs=0xb18d0) at mod_perl.c:480 #6 0xfedc18a4 in mp_dso_unload (data=0x7cb90) at mod_perl.c:512 #7 0x1c2c8 in run_cleanups (c=0x92738) at alloc.c:1946 #8 0x19a04 in ap_clear_pool (a=0x7cb90) at alloc.c:689 #9 0x3298c in standalone_main (argc=6, argv=0xffbefac4) at http_main.c:4741 #10 0x337a4 in main (argc=6, argv=0xffbefac4) at http_main.c:5123 (gdb) frame 4 #4 0x4bed4 in ap_os_dso_unload (handle=0xfeed19a4) at os.c:133 (gdb) The last frame for which I have symbols shows the following: void ap_os_dso_unload(void *handle) { #if defined(HPUX) || defined(HPUX10) || defined(HPUX11) shl_unload((shl_t)handle); #elif defined(HAVE_DYLD) NSUnLinkModule(handle,FALSE); #else = dlclose(handle); #endif return; } Again, can I ask if anyone out there is doing the following: using 1.3.14 under Solaris 2.7 using DSO's using Perl 5.6.0 built w/o threading options Is this a no-no? By the way, I have simplified my startup script to only make a single call to Apache::RegistryLoader::handler for a particular file. Same result. Without the call to Apache::RegistryLoader::handler the server seems to perform flawlessly. -Paul -Original Message- From: Paul G. Weiss Sent: Tuesday, October 31, 2000 3:37 PM To: '[EMAIL PROTECTED]' Subject: Apache 1.3.14 and Apache::RegistryLoader I tried using Apache::RegistryLoader with my Apache 1.3.14/mod_perl 1.24_2 installation. I put this in a file that I PerlRequire: use Apache::RegistryLoader (); my $perl_dir = Apache-server_root_relative."docs"; my $cmd = qq{find $perl_dir -follow \\( -name "*.pl" -o -name "*.cgi" \\) -print}; my $output = `$cmd`; my @files = split /\s+/, $output; my $rl = Apache::RegistryLoader-new; foreach my $file (@files) { print "pre-loading $file\n"; $file =~ /$perl_dir(.*)/; my $status = $rl-handler($1, $file); unless($status == 200) { warn "pre-load of `$url' failed, status=$status\n"; } } (In other words, I load every .cgi or .pl file found under a certain directory. I've also coded it with File::Find instead of running find as a separate process with the same results.) The results were not good. This appeared in error_log: [Tue Oct 31 15:26:32 2000] [notice] caught SIGTERM, shutting down signal fault in critical section signal number: 11, signal code: 1, fault address: 0x1a5c, pc: 0xff3b9c64, sp: 0xffbef530 libthread panic: fault in libthread critical section (PID: 19927 LWP 1) stacktrace: ff3b9c30 ff3be3a0 ff3bd498 ff3bd4f4 4bfd8 fedc185c fedc189c 1c2c4 199fc 329f0 33808 18e98 0 This is under Solaris 2.7. The perl that I used for mod_perl was not built with any threading options. Is this now required, given that Apache 1.3.14 appears to be using threads? -Paul
Re: a web interface to visualize tables
On Wed, 1 Nov 2000, Louis-David Mitterrand wrote: I need a tool to interactively visualize DB tables from a web interface. Ideally this tool would let me: - rename column headers, - set cell alignments, widths, background colors, - reorder columns, - save all these visualisation settings in a DB, - it would be written in perl (even better: mod_perl), Does such a beast exist? I am in the process of writing one, so I thought I'd check first... My Alzabo project includes a (fairly lame right now) data browser that is a set of Mason components. Alzabo right now only supports MySQL but I'm going to start working on Postgres support sometime 'real soon now' (i.e. I'm real busy so I don't know when). The data browser does at least some of what you want, though its not nearly as customizable as what you mentioned above. Alzabo is at alzabo.sourceforge.net -dave /*== www.urth.org We await the New Sun ==*/
Re: a web interface to visualize tables
Hi all, On Wed, 1 Nov 2000, Thomas von Elling Skifter Eibner wrote: I need a tool to interactively visualize DB tables from a web interface. Which Database are you thinking of? DBM files? SQL database? For SQL databases there is phpMyAdmin (for MySQL) and phpPgAdmin (Postgresql), but those are written in PHP. The functionality should be pretty easy to transfer if you look at php**Admin as an example. Maybe it could even be a whole lot better by allowing 'plugins' like the way DBI has database drivers.. I would be able to spend some time help testing/developing on a project like this, so if you want help just email me. You might want to have a look at ViLib (www.vilib.utac.net) which doesn't do quite what you want but it will give you a flying start. It uses mod_perl, works with MySQL for sure and maybe Oracle. 73, Ged.
RE: a web interface to visualize tables
As a part of further research into this area I am going to seriously look into Oracle WebDB. Other users in my shop have had great success with it. And the output is *very* high quality. I would appreciate hearing more about it from any users here that have experience with it. Also there is a product that seems to be a cross platform version of what you want called "DatiLink". It hooks up natively to all the major databases. It's a bit pricy but the output seems to be high quality. http://datigen.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Louis-David Mitterrand Sent: Wednesday, November 01, 2000 7:58 AM To: dbi-users; [EMAIL PROTECTED] Subject: a web interface to visualize tables Hello, I need a tool to interactively visualize DB tables from a web interface. Ideally this tool would let me: - rename column headers, - set cell alignments, widths, background colors, - reorder columns, - save all these visualisation settings in a DB, - it would be written in perl (even better: mod_perl), Does such a beast exist? I am in the process of writing one, so I thought I'd check first... Thanks in advance, -- Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.org "Kill a man, and you are an assassin. Kill millions of men, and you are a conqueror. Kill everyone, and you are a god." -- Jean Rostand -- DBI HOME PAGE AND ARCHIVES: http://www.symbolstone.org/technology/perl/DBI/ To unsubscribe from this list, please visit: http://www.isc.org/dbi-lists.html If you are without web access, or if you are having trouble with the web page, please send mail to [EMAIL PROTECTED] with the subject line of: 'unsubscribe'. --
Re: a web interface to visualize tables
I would try Data-Table-1.16.tar.gz from CPAN... I'm not sure it's the right thing but I remember reading something like you want to do about that package. Thanks, MC Louis-David Mitterrand wrote: Hello, I need a tool to interactively visualize DB tables from a web interface. Ideally this tool would let me: - rename column headers, - set cell alignments, widths, background colors, - reorder columns, - save all these visualisation settings in a DB, - it would be written in perl (even better: mod_perl), Does such a beast exist? I am in the process of writing one, so I thought I'd check first... Thanks in advance, -- Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.org "Kill a man, and you are an assassin. Kill millions of men, and you are a conqueror. Kill everyone, and you are a god." -- Jean Rostand -- DBI HOME PAGE AND ARCHIVES: http://www.symbolstone.org/technology/perl/DBI/ To unsubscribe from this list, please visit: http://www.isc.org/dbi-lists.html If you are without web access, or if you are having trouble with the web page, please send mail to [EMAIL PROTECTED] with the subject line of: 'unsubscribe'. -- -- Martin Charbonneau [EMAIL PROTECTED] E-Commerce system analyst (514) 356-1611 x 2176
Re: a web interface to visualize tables
Hi Louis-David, I need a tool to interactively visualize DB tables from a web interface. Ideally this tool would let me: - rename column headers, - set cell alignments, widths, background colors, - reorder columns, - save all these visualisation settings in a DB, - it would be written in perl (even better: mod_perl), Does such a beast exist? I am in the process of writing one, so I thought I'd check first... You might want to take a look at OracleTool for some ideas, particularly if you're working with Oracle: = http://www.oracletool.com/ Alternatively Thomas Eibner's idea of adapting PhpMyAdmin sounds good. You can find out more about that here: = http://phpwizard.net/projects/phpMyAdmin/index.html There is a Sybase version too, here: = http://kenny.itlab.musc.edu/phpSybaseAdmin/ If you do write an Oracle driver and create phpOracleAdmin, can you let me know! :-) You can find some interesting stuff on connecting php to Oracle here: = http://www.php.net/manual/ref.oracle.php HTH a bit 8-) Rgds, AndyD __ Do You Yahoo!? From homework help to love advice, Yahoo! Experts has your answer. http://experts.yahoo.com/
a web interface to visualize tables
Hello, I need a tool to interactively visualize DB tables from a web interface. Ideally this tool would let me: - rename column headers, - set cell alignments, widths, background colors, - reorder columns, - save all these visualisation settings in a DB, - it would be written in perl (even better: mod_perl), Does such a beast exist? I am in the process of writing one, so I thought I'd check first... Thanks in advance, -- Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.org "Kill a man, and you are an assassin. Kill millions of men, and you are a conqueror. Kill everyone, and you are a god." -- Jean Rostand
Re: a web interface to visualize tables
On Wed, Nov 01, 2000 at 04:57:59PM +0100, Louis-David Mitterrand wrote: Hello, I need a tool to interactively visualize DB tables from a web interface. Ideally this tool would let me: - rename column headers, - set cell alignments, widths, background colors, - reorder columns, - save all these visualisation settings in a DB, - it would be written in perl (even better: mod_perl), Does such a beast exist? I am in the process of writing one, so I thought I'd check first... Which Database are you thinking of? DBM files? SQL database? For SQL databases there is phpMyAdmin (for MySQL) and phpPgAdmin (Postgresql), but those are written in PHP. The functionality should be pretty easy to transfer if you look at php**Admin as an example. Maybe it could even be a whole lot better by allowing 'plugins' like the way DBI has database drivers.. I would be able to spend some time help testing/developing on a project like this, so if you want help just email me. regards, -- Thomas Eibner
Re: a web interface to visualize tables
Hi Guys, The technology called Datilink has just been bought out by a new company called Inshift Technologies. If you are interested I can get you a killer price on a copy right now since I have connections with both companies. We have been using it for several years now and really like its flexibility and ease of use. Let me know and I will send you a win32 demo version. Steve Lloyd 801 318-0591 Tim Harsch wrote: As a part of further research into this area I am going to seriously look into Oracle WebDB. Other users in my shop have had great success with it. And the output is *very* high quality. I would appreciate hearing more about it from any users here that have experience with it. Also there is a product that seems to be a cross platform version of what you want called "DatiLink". It hooks up natively to all the major databases. It's a bit pricy but the output seems to be high quality. http://datigen.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Louis-David Mitterrand Sent: Wednesday, November 01, 2000 7:58 AM To: dbi-users; [EMAIL PROTECTED] Subject: a web interface to visualize tables Hello, I need a tool to interactively visualize DB tables from a web interface. Ideally this tool would let me: - rename column headers, - set cell alignments, widths, background colors, - reorder columns, - save all these visualisation settings in a DB, - it would be written in perl (even better: mod_perl), Does such a beast exist? I am in the process of writing one, so I thought I'd check first... Thanks in advance, -- Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.org "Kill a man, and you are an assassin. Kill millions of men, and you are a conqueror. Kill everyone, and you are a god." -- Jean Rostand -- DBI HOME PAGE AND ARCHIVES: http://www.symbolstone.org/technology/perl/DBI/ To unsubscribe from this list, please visit: http://www.isc.org/dbi-lists.html If you are without web access, or if you are having trouble with the web page, please send mail to [EMAIL PROTECTED] with the subject line of: 'unsubscribe'. -- -- DBI HOME PAGE AND ARCHIVES: http://www.symbolstone.org/technology/perl/DBI/ To unsubscribe from this list, please visit: http://www.isc.org/dbi-lists.html If you are without web access, or if you are having trouble with the web page, please send mail to [EMAIL PROTECTED] with the subject line of: 'unsubscribe'. --