mod-perl2

Does Devel::Cover work under mod_perl2 on Perl 5.10 for Windows?

大兔子大兔子 提交于 2019-12-25 00:26:08
问题 The mod_perl2 and Perl 5.10 two are playing nicely together, but I can't seem to find any positive information about Devel::Cover working with mod_perl2 under Win32. I'm currently using ActiveState's Perl 5.10, but I would be open to switching to Strawberry Perl if it meant this combination could work. Also, Devel::Cover PPDs don't seem to be available for Perl 5.10 from ActiveState, Bribes, UWinnipeg, or Trouchelle, so if you have been able to get it to work, what steps did you go through to

Getting the body of an http POST request, using mod-perl 2

半腔热情 提交于 2019-12-22 11:37:30
问题 I am writing a quick script to munge a submitted file, and return that content to the user. My test code looks like this: #!/path/to/bin/perl use strict; use warnings; use utf8; use Apache2::RequestRec; use Apache2::RequestIO; my ( $xmlin, $accepts ) = (q{}, q{}); my $format = 'json'; # read the posted content while ( Apache2::RequestIO::read($xmlin, 1024) ) {}; { no warnings; $accepts = $Apache2::RequestRec::headers_in{'Accepts'}; } if ($accepts) { for ($accepts) { /application\/xml/i && do

Should I disconnect() if I'm using Apache::DBI's connect_cached()?

大憨熊 提交于 2019-12-19 12:06:00
问题 My mod_perl2-based intranet app uses DBI->connect_cached() which is supposedly overridden by Apache::DBI 's version of the same. It has normally worked quite well, but just recently we started having an issue on our testing server--which had only two users connected--whereby our app would sometimes, but not always, die when trying to reload a page with 'FATAL: sorry, too many clients already' connecting to our postgres 9.0 backend, despite all of them being <IDLE> if I look at the stats in

PSGI: What is it and what's the fuss about?

寵の児 提交于 2019-12-18 10:41:40
问题 I have been trying to decide if my web project is a candidate for implementation using PSGI, but I don't really see what good it would do for my application at this stage. I don't really understand all the fuss. To me PSGI seems like a framework that provides a common interface between different Apache modules which lets you move your application between them. e.g Easily move your application from running on mod_perl to fastcgi, and provide the application support for running on both options.

Why second request do not finish output?

≡放荡痞女 提交于 2019-12-13 04:47:38
问题 The browser wait for some data from server and logging is done only after server restart. Also I see may childs are forked. $ah{ $r->hostname } ||= HTML::Mason::ApacheHandler->new ( .. ) sub handle{ eval{ $ah{ $r->hostname }->handle_request($r); }; if( $@ ) { $r->filename( $r->document_root . '/errors/500.html' ); $ah{ $r->hostname }->handle_request($r); }; $r->log_error( 'ERROR' ); } } What I do wrong so they are not finished? UPD I have found only one note about same problem: http:/

Error when installing mod_perl2

試著忘記壹切 提交于 2019-12-12 04:22:58
问题 I am trying to install mod_perl2 with below configuration: OS: CentOS release 5.5 (Final) Uname -a result: x86_64 x86_64 x86_64 GNU/Linux Perl version: v5.8.8 built for x86_64-linux-thread-multi apache version: Apache/2.2.3 I have downloaded mod_perl2 from Cpan site when I try to run the "perl Makefile.PL MP_APXS=/usr/local/httpd/bin/apxs" it gives below output: Subroutine set_version redefined at ./Makefile.PL line 137. [ info] generating script t/TEST [ info] generating script ./t/cgi-bin

No coverage for runtime with Devel::Cover and ModPerl::Registry

爱⌒轻易说出口 提交于 2019-12-10 20:03:35
问题 When I'm running Devel::Cover with ModPerl::Registry , I get no coverage info except for BEGIN blocks. When I'm running the same script with Devel::Cover from command line or as a CGI, everything works alright (obviously). How can I make Devel::Cover "see" my code being executed in the runtime? Here's Devel::Cover related stuff in my httpd.conf : MaxClients 1 PerlSetEnv DEVEL_COVER_OPTIONS -db,/tmp/cover_db,-silent,1 PerlRequire /var/www/project/startup.pl Here's startup.pl : #!/usr/bin/perl

How do I suppress the default apache error document in mod_perl?

安稳与你 提交于 2019-12-08 07:51:00
问题 I'm developing a RESTful API and I wrote a mod_perl2 handler that takes care of the request. My handler deals with error codes by setting $r->status($http_code) and return $http_code; Everything is fine, except a little problem: when my http_code is different than 200 (for instance 404), apache appends a default HTML error document to my own generated response. For instance: GET /foo Gives: $VAR1 = bless( { 'status' => 404, 'data' => {}, 'message' => 'Resource not found for foo' }, 'My:

IPC::Open3 Fails Running Under Apache

ぃ、小莉子 提交于 2019-12-07 02:56:39
问题 I have a module that uses IPC::Open3 (or IPC::Open2, both exhibit this problem) to call an external binary (bogofilter in this case) and feed it some input via the child-input filehandle, then reads the result from the child-output handle. The code works fine when run in most environments. However, the main use of this module is in a web service that runs under Apache 2.2.6. And under that environment, I get the error: Cannot fdopen STDOUT: Invalid argument This only happens when the code

How do I suppress the default apache error document in mod_perl?

跟風遠走 提交于 2019-12-06 16:38:00
I'm developing a RESTful API and I wrote a mod_perl2 handler that takes care of the request. My handler deals with error codes by setting $r->status($http_code) and return $http_code; Everything is fine, except a little problem: when my http_code is different than 200 (for instance 404), apache appends a default HTML error document to my own generated response. For instance: GET /foo Gives: $VAR1 = bless( { 'status' => 404, 'data' => {}, 'message' => 'Resource not found for foo' }, 'My::Response' ); <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> <