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 s

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
� 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-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

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

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::H

Re: Many handlers in the same module

2008-03-19 Thread Colin Wetherbee
André Warnier wrote: PerlResponseHandler AM::TestStuff->handler and sub handler { my ($self,$r) = @_; $r->print('$self is a [' . ref($self) . '] and contains [' . $self . "]\n"); [...] and the result is $self is a [] and contains [AM::TestStuff] doesn't seem to be an object. I get the

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: Many handlers in the same module

2008-03-19 Thread Colin Wetherbee
André Warnier wrote: In a similat setup, I successfuly use my ($self, $r) = @_; so, if the undef bothers you .. :) Do you actually use $self for anything? Colin

Many handlers in the same module

2008-03-19 Thread Colin Wetherbee
Greetings. In order to have many handlers in a file, I've put the following lines and other, similar lines in my virtual host configuration: PerlAccessHandler JetSet::Handler->AccessHandler PerlResponseHandler JetSet::Handler->ResponseHandler Then, my handlers look like this: sub ResponseHan

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

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

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 libapache2-m

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: 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

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: Executing CGI programs from within mod_perl

2008-02-28 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 th

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 map

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 mapping

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 i

Re: mp2 and post/get params

2008-02-20 Thread Colin Wetherbee
Kirk wrote: I'm new to mp2 and have a relatively old application that used the mp1 implementation of grabbing get/post params from incoming requests: $r = shift; # grab incoming value my $value = $r->param('name'); ... ... # assign some value $r->param('key' => 'val'); And of course, I need

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 P

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 th

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 Sl

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 chan

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 u

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 th

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 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 browser or a

Re: Refreshing stored data at administrator's signal

2008-01-13 Thread Colin Wetherbee
John ORourke wrote: Colin Wetherbee wrote: John ORourke wrote: Colin Wetherbee wrote: Wouldn't a simpler approach be to just restart Apache when you want to update the lists? You could even have the 'add to list' function send SIGUSR1 to the parent Apache, causing a graceful

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

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 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 generated for a

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 open

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: 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 u

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 u

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

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 so

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: 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: re-factoring 'print' for $r

2007-12-22 Thread Colin Wetherbee
Will Fould wrote: Is this a reasonable approach? Is it typical to refer to the request object by package name rather than try to painfully re-factor all packages and subs to accept $r as a passed reference? I don't know if this will help your re-factoring, but you should note you can always g

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

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 soo

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 be

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

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::

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 a

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 so

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 d

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

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: 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 s

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 Bekma

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 m

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

[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 jus

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("test\n"); # END CODE BLOCK OK, problem solved. I didn't have mod_apreq enabled. For what it's worth, I don't recall see

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
Foo JH wrote: You'd see that Apache2::Request exposes more stuff, which you can (lazily) use. Unless you are looking for some backward compatibility to tradditional CGI programming, why not embrace the entire modperl library? That sounds good to me. I'm not looking for any particular backward

[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 pa

Re: [mp2] PerlSwitches -I not working?

2004-10-18 Thread Colin Wetherbee
Stas Bekman said: > Was the request made to that vhost. I'm sure it works if you move it out > of the container. Indeed, PerlSwitches -I works outside the vhost container. Could cause all sorts of conflicts among vhosts that aren't aware of each other that way, though. :( Colin -- Colin W. We

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 a

[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 -I/var/www/hydr

[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 ?page=error404