Re: Apache2::Request undefined symbol

2008-07-09 Thread Colin Wetherbee
Mark Hedges wrote: That's a normal thing. All installed modules put their config into mods-available. Then you use `a2enmod` to manage those symlinks and turn them on or off in mods-enabled. +1 I believe all Debian-based distributions have done this with Apache 2 for a few years now. It

Re: Apache configuration question - restrict folder access to local machine only

2008-04-11 Thread Colin Wetherbee
John ORourke wrote: Expertly brought back on topic there, Torsten... if I ask about the price of beans and how it relates to global warming can you give me a mod_perl related answer? :) Price of beans increases due to fuel costs, driven by the economy, affected by global warming... um... all

Re: Many handlers in the same module

2008-03-31 Thread Colin Wetherbee
Jonathan Vanasco wrote: On Mar 28, 2008, at 3:11 PM, Colin Wetherbee wrote: Care to add one, just to see what happens? :) You know you've been working too much on the Business Side when you stop testing stuff like that automatically. sigh... Indeed. :) ok... it works if i have [snip

Re: Many handlers in the same module

2008-03-31 Thread Colin Wetherbee
� wrote: Just for the rest of us : does anyone care to summarise what works and works not (inasfar as not necessarily documented and/or intuitive) ? And maybe what the original point of this interesting thread was ? Sure, but I don't think we're finished quite yet. ;) Colin

Re: Many handlers in the same module

2008-03-28 Thread Colin Wetherbee
Jonathan Vanasco wrote: On Mar 27, 2008, at 8:43 PM, Colin Wetherbee wrote: Hm. Yep. ResponseHandler can interpret the ::ResponseHandler part as being a function within Handler.pm, but that does *not* work for InitHandler. i have it set up using PerlFixupHandler

Re: Many handlers in the same module

2008-03-27 Thread Colin Wetherbee
Jonathan Vanasco wrote: On Mar 26, 2008, at 9:47 AM, Colin Wetherbee wrote: We seem to have solved the problem, but for the sake of conversation... When I've tried that in the past, mod_perl would always look for handler() within JetSet::Handler::AccessHandler.pm. Wow. I've got 5 sites

Re: Many handlers in the same module

2008-03-26 Thread Colin Wetherbee
Jonathan Vanasco wrote: On Mar 19, 2008, at 2:22 PM, Colin Wetherbee wrote: PerlAccessHandler JetSet::Handler-AccessHandler PerlResponseHandler JetSet::Handler-ResponseHandler sub ResponseHandler { my (undef, $r) = @_; # ... } what about... PerlAccessHandler JetSet::Handler

Re: Many handlers in the same module

2008-03-19 Thread Colin Wetherbee
John ORourke wrote: The only down-side is that (AFAICR) it is creating a new object for each request - my handler is quite expensive to set up, so I have a persistent object and use method handlers like this: Ah, that's quite neat. I might give that a shot. Thanks for the suggestion. Colin

Re: troubleshooting

2008-03-17 Thread Colin Wetherbee
Beginner wrote: dpkg -l libapache2-mod-perl2 shows: ii libapache2-mod-perl2 2.0.2-2.4 It doesn't mention etch but I think this is the correct version. FYI, here are the versions I get for Debian testing (I believe that's etch at the moment?). [EMAIL PROTECTED]:~$ dpkg -l

Re: troubleshooting

2008-03-17 Thread Colin Wetherbee
Colin Wetherbee wrote: Beginner wrote: dpkg -l libapache2-mod-perl2 shows: ii libapache2-mod-perl2 2.0.2-2.4 It doesn't mention etch but I think this is the correct version. FYI, here are the versions I get for Debian testing (I believe that's etch at the moment?). [EMAIL PROTECTED

Re: troubleshooting

2008-03-17 Thread Colin Wetherbee
Colin Wetherbee wrote: Beginner wrote: dpkg -l libapache2-mod-perl2 shows: ii libapache2-mod-perl2 2.0.2-2.4 It doesn't mention etch but I think this is the correct version. FYI, here are the versions I get for Debian testing (I believe that's etch at the moment?). I'm making lots

Re: Custom Object-Oriented Module using HTML::Template

2008-03-12 Thread Colin Wetherbee
Roberto � wrote: On Wed, Mar 12, 2008 at 11:02:27PM +, xyon wrote: Hey everyone, Firstly, I apologize I sent the previous email under an incorrect subject line. Yes, but you still hijacked another thread. = In-Reply-To: [EMAIL PROTECTED] Please don't do that. Start a new thread by

Re: return DECLINED or OK?

2008-02-29 Thread Colin Wetherbee
Ronald Dai. wrote: I learned what is RTFM here which is very interesting :)...I like the Ubuntu Forums policy though...but I always think reading is helpful to any developer...that's why I like both perl and java because I think they are very well documented generously somewhere within my reach

Re: return DECLINED or OK?

2008-02-29 Thread Colin Wetherbee
Ronald Dai. wrote: Actually RTFM would not be a problem for people from academic background (meaning MS or PHD educated) at all since they have to do it all the timebut for people with more team work background these days, it might not be politically very correct... I disagree. Granted, I

Executing CGI programs from within mod_perl

2008-02-27 Thread Colin Wetherbee
Greetings. I use a program called MapServer to generate images. It's a C binary, and most people seem to run it (essentially) directly as a CGI program. By essentially, I mean the binary is typically requested by JavaScript or Flash or other things like that. I'm doing some dynamic

Re: Executing CGI programs from within mod_perl

2008-02-27 Thread Colin Wetherbee
Michael Peters wrote: Colin Wetherbee wrote: Basically, I'd like to run the 'mapserv' binary from within mod_perl Why? Don't you just want to sanitize the data? If so you can do that in a FixUpHandler or even in a separate handler that does an internal_redirect to the mapserv's url. I also

Re: apache process size

2008-02-22 Thread Colin Wetherbee
John ORourke wrote: Might be showing off my lack of unix admin knowledge here but using 'top', it's the value of the 'virt' column - ie. the biggest possible process size if the whole thing was resident. I've been using it to work out how many clients I should limit apache to, but looking at

Re: mod_perl / Perl5.10 / Win32 ?

2008-02-20 Thread Colin Wetherbee
Dami Laurent (PJ) wrote: I don't know where to find answers to the following questions, so better ask the list : - 1) is modperl2 currently compatible with Perl 5.10 ? If not, are some people working on it ? For which target date ? - 2) if the answer is YES, then did anybody compile it into a

Re: Problem running Perl scripts with mod_perl from Alias directory

2008-02-19 Thread Colin Wetherbee
Billeb, Andrew (ATS, IT) wrote: The result is that when I click on a URL like the following (i.e. missing the the /cgi-bin/): _http://localhost/ridhwan/script_name.pl_ the script displays fine….but clicking the submit button doesn't do anythingit just redisplays the same page. But it's

Re: mod_perl's make test fails.

2008-02-01 Thread Colin Wetherbee
Zakk wrote: For the last few days, I've been trying to install mod_perl for my server. It's running Slackware 12.0 with Apache 2.2.8 (with APR 1.2.12) and Perl 5.10.0. I'm under the impression we're still under the don't use Perl 5.10 with mod_perl yet directive. A number of internal

Re: mod_perl's make test fails.

2008-02-01 Thread Colin Wetherbee
Zakk wrote: Date: Fri, 1 Feb 2008 22:21:12 -0500 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: modperl@perl.apache.org Subject: Re: mod_perl's make test fails. Zakk wrote: For the last few days, I've been trying to install mod_perl for my server. It's running Slackware

Re: Printing for debugging

2008-01-14 Thread Colin Wetherbee
Raful Mr Mitchell H wrote: I have my code pasted below. My module, loaded with Location directive in Apache2, works well. However, sometimes switches don't respond correctly to bulk queries of fdbPorts object. What I want to do is to be able print the value of my variables either to the

Re: Refreshing stored data at administrator's signal

2008-01-14 Thread Colin Wetherbee
Scott Gifford wrote: Colin Wetherbee [EMAIL PROTECTED] writes: [...] At the moment (and not in a production environment), every time the drop-down list is generated for a web page, the script queries the database to retrieve the entire list of aircraft. I would prefer to retrieve the list

Re: Refreshing stored data at administrator's signal

2008-01-14 Thread Colin Wetherbee
Clinton Gormley wrote: I'm not sure what you're suggesting. The first few pages of cache on CPAN have some modules for caching data in memory and on disk and so forth, but I don't see how they relate to my problem. Which is that of notifying all of my application's perl processes when an

Refreshing stored data at administrator's signal

2008-01-13 Thread Colin Wetherbee
Greetings. I have an application that accesses some relatively static database tables to create drop-down select lists. As an example, one of these tables is a list of common commercial aircraft. At the moment (and not in a production environment), every time the drop-down list is

Re: Refreshing stored data at administrator's signal

2008-01-13 Thread Colin Wetherbee
John ORourke wrote: Colin Wetherbee wrote: At the moment (and not in a production environment), every time the drop-down list is generated for a web page, the script queries the database to retrieve the entire list of aircraft. I would prefer to retrieve the list of aircraft when each Perl

Re: MinQueueAge

2008-01-11 Thread Colin Wetherbee
Tyler Bird wrote: Hi folks I know this is off topic and hopefully if anybody knows the sendmail mailing list address please reply. Yeah, that's pretty off-topic. http://www.sendmail.org/misc/usenet.php http://groups.google.com/group/comp.mail.sendmail/topics Colin

Re: restrict virtual hosts programs

2008-01-11 Thread Colin Wetherbee
Jeff Pang wrote: I met a strange requirement that, given Apache has two virtual hosts, vhA and vhB, vhA's document root is: /path/a/; vhB's document root is: /path/b/. vhA's programs are running under /path/a/cgi-bin, but actually, the programs of vhA can access vhB's directory (ie,they can

Re: Un-baking a baked cookie

2008-01-08 Thread Colin Wetherbee
Peter Haworth wrote: On Sat, 05 Jan 2008 00:56:49 -0500, Colin Wetherbee wrote: On Jan 4, 2008 9:47 PM, Colin Wetherbee [EMAIL PROTECTED] wrote: From the Apache2::Cookie documentation, bake() adds a Set- Cookie header to the outgoing headers table. Is there a way to undo this without

Re: Un-baking a baked cookie

2008-01-05 Thread Colin Wetherbee
Perrin Harkins wrote: On Jan 5, 2008 12:56 AM, Colin Wetherbee [EMAIL PROTECTED] wrote: Well, I don't mind editing the headers, but I'd rather use standardized API calls (i.e. through Apache2::Cookie and friends) so that I don't have to worry about what's going on under the hood, updating my

Un-baking a baked cookie

2008-01-04 Thread Colin Wetherbee
Good evening. Is it possible to un-bake a baked cookie? From the Apache2::Cookie documentation, bake() adds a Set-Cookie header to the outgoing headers table. Is there a way to undo this without manually editing the headers, preferably with Apache2::Cookie methods? (As an aside, would

Re: Un-baking a baked cookie

2008-01-04 Thread Colin Wetherbee
Perrin Harkins wrote: On Jan 4, 2008 9:47 PM, Colin Wetherbee [EMAIL PROTECTED] wrote: From the Apache2::Cookie documentation, bake() adds a Set-Cookie header to the outgoing headers table. Is there a way to undo this without manually editing the headers, preferably with Apache2::Cookie

Re: segfault

2008-01-02 Thread Colin Wetherbee
Raful Mr Mitchell H wrote: My script looks like this use Apache2::Request (); my $req = Apache2::Request- new($r) my $data = req-{/param-name}/ // It causes a segfault error. Any ideas? Hello. Please send us a bit more of your script. This snippet doesn't say much. Colin

Re: segfault

2008-01-02 Thread Colin Wetherbee
Raful Mr Mitchell H wrote: Here is the complete script Is this the script that was causing segfaults? It doesn't look anything like what you originally posted. #!/usr/bin/perl package Handlers::Devices; use DBI; use HTML::Template; use Apache2::RequestRec (); use APR::Request::Param

Re: Find the values of Apache2::Const

2007-12-22 Thread Colin Wetherbee
Boysenberry Payne wrote: I found that $r-status() required something other than Apache2::Const in one of my modules and it got me wondering what the Constant values actually were. Now I could go through and print each one I suppose, but I thought looking at them in Apache2::Const.pm would be

Re: Find the values of Apache2::Const

2007-12-22 Thread Colin Wetherbee
Boysenberry Payne wrote: I only ask because I tried a $r-status(Apache2::Const::OK) and got a 500 returned in the header even though my handler returned with Apache::Const::OK also... To avoid the 500 header I had to do $r-status(200); I imagine the status code isn't going to change too

Re: Find the values of Apache2::Const

2007-12-22 Thread Colin Wetherbee
Adam Prime wrote: Boysenberry Payne wrote: I only ask because I tried a $r-status(Apache2::Const::OK) and got a 500 returned in the header even though my handler returned with Apache::Const::OK also... To avoid the 500 header I had to do $r-status(200); I imagine the status code isn't going

Perl 5.10

2007-12-20 Thread Colin Wetherbee
Have any of you used mod_perl with Perl 5.10 yet? Are there any gotchas to consider? I'm still waiting on the release of the Debian packages. Colin

Re: Can output filter return page not found?

2007-12-15 Thread Colin Wetherbee
Marc M. Adkins wrote: Can I not return Apache2::Const::NOT_FOUND from handler()? I've never used filters for this, but you can certainly return NOT_FOUND from a handler. Colin

No log() in Apache2::RequestRec?

2007-12-14 Thread Colin Wetherbee
Based on some documentation I read [0] [1], I am trying to use the following function to write messages to my virtual host's error log. 30 sub Debug(@) 31 { 32 my $r = Apache2::RequestUtil-request; 33 $r-log-debug(@_); 34 } I have tried several variations of this, restarting the server as

Re: No log() in Apache2::RequestRec?

2007-12-14 Thread Colin Wetherbee
Fred Moyer wrote: Colin Wetherbee wrote: [Fri Dec 14 23:57:52 2007] [error] [client 192.168.171.80] Can't locate object method log via package Apache2::RequestRec at /home/cww/sites/js.iron.denterprises.org/htdocs/jet-set/JetSet/Debug.pm line 33.\n use Apache2::Log (); should take care

Re: modperl on Win32 is still happening

2007-12-13 Thread Colin Wetherbee
Foo JH wrote: 3. Fast to cook, good to eat That's my favorite part of mod_perl. It goes down well with cookies, too, but tastes awful with Java. ;) And, you know, to keep this on topic, I like the idea that mod_perl on Windows can be a springboard of sorts for people who may eventually be

Re: Using dtrace to determine which modules aren't loaded at startup time

2007-12-13 Thread Colin Wetherbee
Fred Moyer wrote: I've been having fun with dtrace, and I most recently used it to see what files are being accessed by mod_perl during requests. I've preloaded all the modules in my application that I know about into startup.pl, but when I startup my httpd server and make a request, I got

Unqualified segmentation fault from Apache2::Request-new()

2007-12-05 Thread Colin Wetherbee
Greetings. I accidentally made the mistake of calling Apache2::Request-new() without passing $r, and it turns out that causes Apache to segfault and not return anything to the browser. I'm only pointing this out because it seems like there should be a more graceful way of handling this.

Re: Unqualified segmentation fault from Apache2::Request-new()

2007-12-05 Thread Colin Wetherbee
Colin Wetherbee wrote: use Apache2::RequestRec; use Apache2::Const -compile = qw(OK); To be clear, this also occurs with 'use Apache2::Request' at the top. :) Colin

Re: Connection Pooling

2007-11-24 Thread Colin Wetherbee
Mag Gam wrote: Is it possible to do database connection pooling with mod_perl? Currently, all of my source code has a my $dbh. Is it possible to have my database stuff in a pool, and I just include it somehow? DBI::Pool is a partially complete module for doing this. Tim Bunce and Stas

Re: Connection Pooling

2007-11-24 Thread Colin Wetherbee
Perrin Harkins wrote: If you have a reverse proxy, and still have too many connections, you can look at either SQL Relay or the DBI::Gofer stuff in the latest DBI releases. DBI::Gofer was created to solve the issue of too many connections for Shopzilla.com. DBD::Gofer looks like an excellent

Re: Internal Server Error

2007-08-21 Thread Colin Wetherbee
Jeff Pang wrote: Try change the codes to: sub handler { my $r = shift; ... If his handler is called as a method, $class is an appropriate first variable to shift out of @_. Using ($class, $r) = @_ is a perfectly legitimate way of taking care of that. Colin

Re: Can't install mod_perl

2007-07-16 Thread Colin Wetherbee
Raymond Wan wrote: I'm not an expert on this, but looked into this briefly as I was worried about the level of support. From asking around, it seems that you can install 32-bit Linux on a 64-bit machine, but of course, you lose all the benefits of the 64 bits (access to larger disks and more

[mp2] Apache2::Reload doesn't reload

2007-06-27 Thread Colin Wetherbee
It seems like I've tried everything, and I can't get Apache2::Reload to reload my modules. I have a handler in a module called JetSet::Handler. That module depends on a number of other modules, which I've tried to include with 'use', with limited success. It seems, sometimes, symbols act

Re: [mp2] Apache2::Reload doesn't reload

2007-06-27 Thread Colin Wetherbee
Jonathan Vanasco wrote: sub handler { $page= myapp::Page-new(); $page-whatever; } So, Page.pm defines an object... do you have Page.pm including other Exporter-style modules? And, do those work properly? Thanks. Colin

Re: [mp2] The right way to use CGI parameters in a handler

2007-06-11 Thread Colin Wetherbee
Jonathan Vanasco wrote: As I said in my original post, I tried to use Apache2::Request, but after creating that object, I couldn't print anything anymore. Perhaps someone could give me a hint on how to implement it? could you print beforehand? 'print' might not be tied to the same output.

Re: [mp2] The right way to use CGI parameters in a handler

2007-06-11 Thread Colin Wetherbee
Colin Wetherbee wrote: # BEGIN CODE BLOCK my $req = Apache2::Request-new($r); $r-content_type('text/html'); $r-print(testbr /\n); # END CODE BLOCK OK, problem solved. I didn't have mod_apreq enabled. For what it's worth, I don't recall seeing anything about enabling mod_apreq

[mp2] The right way to use CGI parameters in a handler

2007-06-10 Thread Colin Wetherbee
Hello! It's been about four years since I've used mod_perl to any great extent, and I'm afraid I'm somewhat rusty. I'm trying to create a handler that can parse CGI parameters, but I'm unsure of the most modern way of doing that. I know Apache2::Request is supposed to be able to grab CGI

[mp2] PerlSwitches -I not working?

2004-10-16 Thread Colin Wetherbee
Greetings. Following reading Stas's last email to Scot, I poked around on the configuration directives page and saw that PerlSwitches -I/foo is a convenient replacement for 'use lib'. I removed 'use lib' from a script and put the following in my virtual host section: PerlSwitches

Re: Whats wrong in HTML::TableExtract with modperl

2004-10-16 Thread Colin Wetherbee
Siyad Ahmed Naina said: ModPerl::Registry: HTML::Parser object version 3.35 does not match bootstrap parameter 3.34 at This is a module version mismatch. Perhaps you have an old (but still recent, from the looks of it) version of mod_perl in your path somewhere? My suggestion is to upgrade

[mp2] HTTP status code w/ ModPerl::Registry

2004-10-15 Thread Colin Wetherbee
Greetings. Seems I'm confused about how to get mod_perl to send status codes other than 200 OK. I want to have my Perl script, upon getting the wrong CGI parameters, to give a status 404. Then, the ErrorDocument for 404 goes back to that same Perl script but with the CGI parameter